[rhn-users] adding a task for shutdown

Jesse Becker jbecker at northwestern.edu
Thu Apr 7 16:49:25 UTC 2005


On Thu, Apr 07, 2005 at 12:42:29PM -0400, spiv007 wrote:
> I create the script and put it in /etc/init.d/foo
> for there i link the following
> 
> /etc/init.d/foo -> /etc/rc.d/rc0.d/K01foo
> /etc/init.d/foo -> /etc/rc.d/rc6.d/K01foo

Shouldn't those point the other way?  You want K01foo to be a symlink to
../init.d/foo.

> So after that if i do a shutdown -r or shutdown -h the script does not
> run on those runlevel.

Make sure that /etc/init.d/foo is executable.

> The way im testing this is by making a log file to echo to /tmp/foo.log

Make sure you aren't cleaning /tmp on each system boot.  Probably the easiest
thing to do it write the log somehwere else (perhaps /var/log/shutdown.log) as a test.

-- 
Jesse Becker
GPG-fingerprint: BD00 7AA4 4483 AFCC 82D0  2720 0083 0931 9A2B 06A2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/rhn-users/attachments/20050407/bc3ed305/attachment.sig>


More information about the rhn-users mailing list