Your message dated Mon, 14 Feb 2011 11:22:27 -0700
with message-id <[email protected]>
and subject line Re: Bug#613422: cron can't run /sbin/shutdown command
has caused the Debian Bug report #613422,
regarding cron can't run /sbin/shutdown command
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
613422: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=613422
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: cron
Version: 3.0pl1-116
Severity: normal


(Excuse me for my bad English)

I try to use cron for turn off my computer at specified time.

I have the shutdown command:
root@fc3:/var/log# whereis shutdown
shutdown: /sbin/shutdown /usr/share/man/man2/shutdown.2.gz 
/usr/share/man/man8/shutdown.8.gz

I wrote it into /etc/crontab:
00 21   * * * root      /sbin/shutdown

I get an error message in system log in place of turning off machine:
Feb 14 21:00:01 fc3 /usr/sbin/cron[1668]: (*system*) RELOAD (/etc/crontab)
Feb 14 21:00:01 fc3 /USR/SBIN/CRON[2941]: (root) CMD (/sbin/shutdown)
Feb 14 21:00:01 fc3 /USR/SBIN/CRON[2939]: (CRON) error (grandchild #2941 failed
 with exit status 1)
Feb 14 21:00:01 fc3 /USR/SBIN/CRON[2939]: (CRON) info (No MTA installed, discar
ding output)

It is very possible that I am not understand something in GNU/Linux.
But IMHO such things should just work without additional tricks and magic.


-- Package-specific info:
--- EDITOR:
not set

--- usr/bin/editor:
/bin/nano

--- /usr/bin/crontab:
-rwxr-sr-x 1 root crontab 30248 Dec 19 02:46 /usr/bin/crontab

--- /var/spool/cron
drwxr-xr-x 5 root root 4096 Feb  5 17:48 /var/spool/cron

--- /var/spool/cron/crontabs
drwx-wx--T 2 root crontab 4096 Dec 19 02:46 /var/spool/cron/crontabs


-- System Information:
Debian Release: 6.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-2-686 (SMP w/1 CPU core)
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages cron depends on:
ii  adduser                 3.112+nmu2       add and remove users and groups
ii  debianutils             3.4              Miscellaneous utilities specific t
ii  dpkg                    1.15.8.10        Debian package management system
ii  libc6                   2.11.2-10        Embedded GNU C Library: Shared lib
ii  libpam-runtime          1.1.1-6.1        Runtime support for the PAM librar
ii  libpam0g                1.1.1-6.1        Pluggable Authentication Modules l
ii  libselinux1             2.0.96-1         SELinux runtime shared libraries
ii  lsb-base                3.2-23.2squeeze1 Linux Standard Base 3.2 init scrip

Versions of packages cron recommends:
pn  exim4 | postfix | mail-transp <none>     (no description available)
ii  lockfile-progs                0.1.15     Programs for locking and unlocking

Versions of packages cron suggests:
ii  anacron                       2.3-14     cron-like program that doesn't go 
pn  checksecurity                 <none>     (no description available)
ii  logrotate                     3.7.8-6    Log rotation utility

Versions of packages cron is related to:
pn  libnss-ldap                   <none>     (no description available)
pn  libnss-ldapd                  <none>     (no description available)
pn  libpam-ldap                   <none>     (no description available)
pn  libpam-mount                  <none>     (no description available)
pn  nis                           <none>     (no description available)
pn  nscd                          <none>     (no description available)

-- Configuration Files:
/etc/crontab changed:
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
17 *    * * *   root    cd / && run-parts --report /etc/cron.hourly
25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts 
--report /etc/cron.daily )
47 6    * * 7   root    test -x /usr/sbin/anacron || ( cd / && run-parts 
--report /etc/cron.weekly )
52 6    1 * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts 
--report /etc/cron.monthly )
00 21   * * * root      /sbin/shutdown


-- no debconf information



--- End Message ---
--- Begin Message ---
Shutdown requires a "time" argument; just "shutdown" probably fails
from crontab the same way it fails from an interactive shell:

$ sudo shutdown
Usage:    shutdown [-akrhHPfnc] [-t secs] time [warning message]
[...]
$ echo $?
1

Justin

On Mon, Feb 14, 2011 at 09:13:58PM +0300, sergey wrote:
> Package: cron
> Version: 3.0pl1-116
> Severity: normal
> 
> 
> (Excuse me for my bad English)
> 
> I try to use cron for turn off my computer at specified time.
> 
> I have the shutdown command:
> root@fc3:/var/log# whereis shutdown
> shutdown: /sbin/shutdown /usr/share/man/man2/shutdown.2.gz 
> /usr/share/man/man8/shutdown.8.gz
> 
> I wrote it into /etc/crontab:
> 00 21   * * * root      /sbin/shutdown
> 
> I get an error message in system log in place of turning off machine:
> Feb 14 21:00:01 fc3 /usr/sbin/cron[1668]: (*system*) RELOAD (/etc/crontab)
> Feb 14 21:00:01 fc3 /USR/SBIN/CRON[2941]: (root) CMD (/sbin/shutdown)
> Feb 14 21:00:01 fc3 /USR/SBIN/CRON[2939]: (CRON) error (grandchild #2941 
> failed
>  with exit status 1)
> Feb 14 21:00:01 fc3 /USR/SBIN/CRON[2939]: (CRON) info (No MTA installed, 
> discar
> ding output)
> 
> It is very possible that I am not understand something in GNU/Linux.
> But IMHO such things should just work without additional tricks and magic.


--- End Message ---

Reply via email to