[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FW: During system shutdown a user-defined K script doesn't work
- To: "'linux-il(at-nospam)linux.org.il'" <linux-il(at-nospam)linux.org.il>
- Subject: FW: During system shutdown a user-defined K script doesn't work
- From: "Koski, Avi" <Avi.Koski(at-nospam)comverse.com>
- Date: Wed, 6 Jun 2001 14:42:43 +0300
- Delivered-To: linux-il-linux-il@linux.org.il
- Sender: linux-il-bounce(at-nospam)cs.huji.ac.il
> -----Original Message-----
> From: Koski, Avi
> Sent: Wednesday, June 06, 2001 11:27 AM
> To: 'linux-il@linux.org.il'
> Cc: Koski, Avi
> Subject: During system shutdown a user-defined K script doesn't work
>
> O.K. I solved the problem and this is the modified script.
>
> Notes: Use the "chkconfig" , "ntsysv" & "tksysv" utilities and...
> \
> 1. The header has a very definitive format.
> 2. It's a must to add the "touch" command in the start) case, in
> order to create a lock file.
> Without this file, the stop) would not work.
>
> ====================================================================
> #!/bin/sh
> #
> # avi5 Test script
> #
> #
> # chkconfig: - 60 20
> # description:
> #
> #
> # probe: true
> # Source function library.
> #
> . /etc/rc.d/init.d/functions
>
> # See how we were called.
> case "$1" in
> start)
> # Start daemons.
> echo
> echo -n "Starting avi5 : "
> echo "Starting avi5 : " >> /home/AVI5
> echo
> touch /var/lock/subsys/avi5
> ;;
> stop)
> # Stop daemons.
> echo
> echo -n "Shutting down avi5 : "
> echo "Shutting down avi5 : " >> /home/AVI5
> echo
> rm -f /var/lock/subsys/avi5
> ;;
> esac
>
> exit 0
>
> ====================================================================
> Hi friends,
>
> I put the following script in /etc/rc.d/init.d/avi .
>
> There are links from /etc/rc.d/rc2.d & /etc/rc.d/rc6.d as follows:
>
> K99avi -> ../init.d/avi
>
> There are also links from /etc/rc.d/rc3.d & /etc/rc5.d as follows:
>
> S99avi -> ../init.d/avi
>
>
> Problem:
>
> When a system is rebooted with the "reboot" or "shutdown -r now" commands,
> the K99avi links are NOT executed, and there is no warnings in the
> /var/log/messages file.
>
> THe S99avi links work fine upon startup of the system.
>
> I tested it in RedHat 6.2 (Kernels 2.2.14-5.0, 2.2.16, ...)
>
> Any help is appreciated!
>
> Thanks,
> Avi
>
> ==========================================================
> #!/bin/sh
> #
> # Source function library.
> . /etc/rc.d/init.d/functions
> # See how we were called.
> case "$1" in
> start)
> echo "Starting avi..... : "
> echo "Starting avi..... : " >> /home/AVI
> ;;
> stop)
> echo "Shutting down avi..... : "
> echo "Shutting down avi..... : " >> /home/AVI
> ;;
> esac
>
=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il