]> granicus.if.org Git - fcron/commitdiff
Allow user to specify a fcron.conf file in check_system_crontabs.sh
authorthib <thib@berseker.(none)>
Mon, 5 Apr 2010 18:59:44 +0000 (19:59 +0100)
committerthib <thib@berseker.(none)>
Mon, 5 Apr 2010 18:59:44 +0000 (19:59 +0100)
doc/en/changes.sgml
script/check_system_crontabs.sh

index cfbaaea982ce657bddd44df629713c05335a36c5..aa68cba9357297fe47eb7fa80add9bbd3c6907ed 100644 (file)
@@ -13,6 +13,19 @@ A copy of the license is included in gfdl.sgml.
    <sect1 id="changes">
       <title>Changes</title>
 
+      <itemizedlist>
+        <title>From version 3.0.5 to 3.0.6</title>
+        <listitem>
+           <para>Fixed bug preventing normal user from running fcrontab -l if fcron's uid!=gid</para>
+        </listitem>
+        <listitem>
+           <para>Fixed fcrontab's PAM initialization when working on the systab user.</para>
+        </listitem>
+        <listitem>
+           <para>Added check_system_crontabs.sh which is to replace the less portable check_system_crontabs.bash.</para>
+        </listitem>
+      </itemizedlist>
+
       <itemizedlist>
         <title>From version 3.0.4 to 3.0.5</title>
         <listitem>
index 8f27fe86da01f57678f51202778ed41a7891a08a..f49ca399368d9e101a79c60da3440beee8052fef 100755 (executable)
@@ -65,6 +65,7 @@
 #                                + bug fixes and enhancement.
 # 2005/04/27  Daniel Himler      Security enhancements and cleanups.
 # 2005/09/14  Damon Harper       Command lines options, cleanups.
+# 2008/07/23  Wolfram Schlich    Patch to allow to specify a fcron.conf file
 # 2010/03/10  Michal Gorny       Removed bashisms for better portability.
 #
 
@@ -76,6 +77,7 @@ DEFAULT_CROND_DIR=/etc/cron.d
 DEFAULT_CRONTAB_FILE=/etc/crontab
 DEFAULT_FCRONTAB_FILE=/etc/fcrontab
 
+DEFAULT_FCRON_CONFIG_FILE=/etc/fcron/fcron.conf
 FCRONTAB_PROG=/usr/bin/fcrontab
 FCRONTABS_DIR=/var/spool/fcron
 
@@ -117,6 +119,7 @@ Usage: check_system_crontabs [options]
     -i          Interactive use with no delay; same as -s 0.
     -p PATHNAME Full path to or filename of the fcrontab binary; use this
                 only if it cannot be found automatically.
+    -c FILE     Full path to fcron config file (default $DEFAULT_FCRON_CONFIG_FILE).
     -F FILE     System fcrontab file (default $DEFAULT_FCRONTAB_FILE).
     -C FILE     System crontab file (default $DEFAULT_CRONTAB_FILE).
     -D DIR      System crontab directory (default $DEFAULT_CROND_DIR).
@@ -127,6 +130,7 @@ _EOF_
 
 SLEEP_TIME_BEFORE_REBUILD="$DEFAULT_SLEEP_TIME_BEFORE_REBUILD"
 CROND_DIR="$DEFAULT_CROND_DIR"
+FCRON_CONFIG_FILE="$DEFAULT_FCRON_CONFIG_FILE"
 CRONTAB_FILE="$DEFAULT_CRONTAB_FILE"
 FCRONTAB_FILE="$DEFAULT_FCRONTAB_FILE"
 FCRONTAB_PROG=
@@ -153,6 +157,10 @@ while [ $# -gt 0 ]; do
     FCRONTAB_PROG="$2"
     shift
     ;;
+  -c)
+    FCRON_CONFIG_FILE="$2"
+    shift
+    ;;
   -F)
     FCRONTAB_FILE="$2"
     shift
@@ -257,7 +265,7 @@ _EOF_
   sed -i -e "s/@yearly/0 0 1 1 */g" -e "s/@annually/0 0 1 1 */g" -e "s/@monthly/0 0 1 * */g" -e "s/@weekly/0 0 * * 0/g" -e "s/@daily/0 0 * * */g" -e "s/@midnight/0 0 * * */g" -e "s/@hourly/0 * * * */g" "$FCRONTAB_FILE_TMP"
 
   # notify fcron about the updated file
-  "$FCRONTAB_PROG" "$FCRONTAB_FILE_TMP" -u systab
+  "$FCRONTAB_PROG" -c "$FCRON_CONFIG_FILE" "$FCRONTAB_FILE_TMP" -u systab
 }
 
 NEED_REBUILD=0