From: Christian Kastner Date: Thu, 28 Jul 2011 11:07:40 +0200 Subject: Manpage and typo fixes Correct some errors or clarify sections in the manpages; fix some typos --- man/cron.8 | 37 +++++++++++++++++-------------------- man/crontab.1 | 2 +- man/crontab.5 | 14 +++++++------- src/cron.c | 4 ++-- 4 files changed, 27 insertions(+), 30 deletions(-) diff --git a/man/cron.8 b/man/cron.8 index 36006ca..e20455e 100644 --- a/man/cron.8 +++ b/man/cron.8 @@ -27,7 +27,7 @@ crond \- daemon to execute scheduled commands .SH SYNOPSIS .B crond -.RB [ -n " | " -p " | " -s " | " -c " | " -m \fP\fI\fP ] +.RB [ -n " | " -i " | " -p " | " -s " | " -c " | " -m \fP\fI\fP ] .B crond .B -x @@ -35,18 +35,15 @@ crond \- daemon to execute scheduled commands .br .SH DESCRIPTION .I Cron -is started from -.I /etc/rc.d/init.d -or -.I /etc/init.d -It returns immediately, thus, there is no need to need to start it with the '&' parameter. +is automatically started at boot time. .PP .I Cron searches .I /var/spool/cron -for crontab files which are named after accounts in -.I /etc/passwd; -The found crontabs are loaded into the memory. +for crontab files which are named after user accounts; +together with the system crontab +.IR /etc/crontab , +the found crontabs are loaded into the memory. .I Cron also searches for any files in the @@ -65,10 +62,10 @@ Any job output can also be sent to syslog by using the option. .PP There are two ways how changes in crontables are checked. The first -method is checking the modtime of a file. The second method is using the inotify support. -Using of inotify is logged in the -.I /var/log/cron -log after the daemon is started. The inotify support checks for changes in all crontables and accesses the +method is checking the modtime of a file. The second method +is using inotify support, which is only available on Linux. +When the daemon uses inotify, it logs this fact to syslog on startup. +The inotify support checks for changes in all crontables and accesses the hard disk only when a change is detected. .PP When using the modtime option, @@ -89,13 +86,9 @@ for more details. directory that contains system cronjobs stored for different users. .IR /var/spool/cron directory that contains user crontables created by the -.IR crontab +.BR crontab (1) command. -Note that the -.BR crontab (1) -command updates the modtime of the spool directory whenever it changes a -crontab. .PP .SS Daylight Saving Time and other time changes Local time changes of less than three hours, such as those caused @@ -135,16 +128,20 @@ This command must accept a fully formatted mail message (with headers) on standa as a mail message to the recipients specified in the mail headers. Specifying the string .I "off" -(i.e. crond -m off) +(i.e. crond \-m off) will disable the sending of mail. .TP .B "\-n" Tells the daemon to run in the foreground. This can be useful when starting it out of init. .TP +.B "\-i" +Disables inotify support (if present) +.TP .B "\-p" Allows .I Cron -to accept any user set crontables. +to accept any user set crontables (read: lift owner, type and mode +restrictions) .TP .B "\-c" This option enables clustering support, as described below. diff --git a/man/crontab.1 b/man/crontab.1 index d35331a..c1c8bae 100644 --- a/man/crontab.1 +++ b/man/crontab.1 @@ -86,7 +86,7 @@ or modify system cron jobs in the .IR /etc/cron.d/ directory. .PP -The temporary directory can be set in an environment variable. If it is not set +The temporary directory can be set using the environment variable $TMPDIR. If it is not set by the user, the .I /tmp directory is used. diff --git a/man/crontab.5 b/man/crontab.5 index 6853b73..03c034f 100644 --- a/man/crontab.5 +++ b/man/crontab.5 @@ -35,7 +35,7 @@ their own crontabs, eliminating the need for explicitly running as part of a cron command. .PP Blank lines, leading spaces, and tabs are ignored. Lines whose first -non-white space character is a pound-sign (#) are comments, and are note processed. +non-white space character is a pound-sign (#) are comments, and are not processed. Note that comments are not allowed on the same line as cron commands, since they are considered a part of the command. Similarly, comments are not allowed on the same line as environment variable settings. @@ -235,7 +235,7 @@ CRON_TZ=Japan # run at 2:15pm on the first of every month -- output mailed to paul 15 14 1 * * $HOME/bin/monthly # run at 10 pm on weekdays, annoy Joe -0 22 * * 1-5 mail -s "It's 10pm" joe%Joe,%%Where are your kids?% +0 22 * * 1-5 mail \-s "It's 10pm" joe%Joe,%%Where are your kids?% 23 0-23/2 * * * echo "run 23 minutes after midn, 2am, 4am ..., everyday" 5 4 * * sun echo "run at 5 after 4 every sunday" .fi @@ -255,7 +255,7 @@ MAILTO=root * * * * * root touch /tmp/file .fi .SH SELinux with multi level security (MLS) -In a crontab, it is important to specify a security level by \fIcrontab\ -s\fR or specifying +In a crontab, it is important to specify a security level by \fIcrontab\ \-s\fR or specifying the required level on the first line of the crontab. Each level is specified in \fI/etc/selinux/targeted/seusers\fR. When using crontab in the MLS mode, it is especially important to: .br @@ -265,13 +265,13 @@ in \fI/etc/selinux/targeted/seusers\fR. When using crontab in the MLS mode, it i .SH EXAMPLE FOR SELINUX MLS .nf # login as root -newrole -r sysadm_r +newrole \-r sysadm_r mkdir /tmp/SystemHigh -chcon -l SystemHigh /tmp/SystemHigh -crontab -e +chcon \-l SystemHigh /tmp/SystemHigh +crontab \-e # write in crontab file MLS_LEVEL=SystemHigh -0-59 * * * * id -Z > /tmp/SystemHigh/crontest +0-59 * * * * id \-Z > /tmp/SystemHigh/crontest .fi .SH FILES .I /etc/crontab diff --git a/src/cron.c b/src/cron.c index 7dc2958..760bafe 100644 --- a/src/cron.c +++ b/src/cron.c @@ -137,8 +137,8 @@ static void usage(void) { const char **dflags; fprintf(stderr, "usage: %s [-h] print this message \n \ - [-i] deamon runs without inotify support \n \ - [-m ] off or specify prefered client for sending mails \n \ + [-i] daemon runs without inotify support \n \ + [-m ] off or specify preferred client for sending mails \n \ [-n] run in foreground \n \ [-p] permit any crontab \n \ [-c] enable clustering support \n \ --