|
From: Jamie C. <jca...@we...> - 2006-06-08 17:28:50
|
On 8/Jun/2006 08:49 and...@fr... wrote ..
> I performed the following steps:
> cd /etc/init.d
> cp aaa bbb
> vi bbb in order to modify occurrencies of aaa in bbb and other minor
> issues:
>
> sogeaste01:/etc/init.d # cat bbb
> #!/bin/sh
> ### BEGIN INIT INFO
> # Provides: bbb
> # Required-Start: $network
> # Required-Stop: $network
> # Default-Start: 2 3 5
> # Description: start dummy bbb
> ### END INIT INFO
>
> case "$1" in
> 'start')
> /bin/echo "contents of dummyfile made by bbb on start" >
> /tmp/dummybbb
> ;;
> 'stop')
> /bin/echo "contents of dummyfile made by bbb on stop" >
> /tmp/dummybbb
> ;;
> *)
> echo "Usage: $0 { start | stop }"
> ;;
> esac
> exit 0
>
> at this point:
> dir /etc/init.d/rc3.d -rt
> .....
> lrwxrwxrwx 1 root root 6 Jun 7 09:25 S07aaa -> ../aaa
> lrwxrwxrwx 1 root root 6 Jun 7 09:25 K15aaa -> ../aaa
>
> sogeaste01:/etc/init.d # chkconfig --add bbb
> bbb 0:off 1:off 2:on 3:on 4:off 5:on 6:off
>
> sogeaste01:/etc/init.d # chkconfig add on
> add: unknown service
Shouldn't the command have been chkconfig aaa on
> (perhaps a mispelled command ??????)
>
> at this point:
> dir /etc/init.d/rc3.d -rt
> ....
> lrwxrwxrwx 1 root root 6 Jun 7 09:25 S07aaa -> ../aaa
> lrwxrwxrwx 1 root root 6 Jun 7 09:25 K15aaa -> ../aaa
> drwxr-xr-x 11 root root 2536 Jun 8 15:31 ..
> lrwxrwxrwx 1 root root 6 Jun 8 15:31 S07bbb -> ../bbb
> lrwxrwxrwx 1 root root 6 Jun 8 15:31 K15bbb -> ../bbb
>
> dir /etc/init.d -rt
>
> ...
> drwxr-xr-x 57 root root 4944 Jun 7 09:27 ..
> -rwxr-xr-x 1 root root 451 Jun 7 09:35 aaa
> -rwxr-xr-x 1 root root 450 Jun 8 15:31 bbb
> drwxr-xr-x 11 root root 2536 Jun 8 15:31 .
> drwxr-xr-x 2 root root 1616 Jun 8 15:31 rc5.d
> drwxr-xr-x 2 root root 1440 Jun 8 15:31 rc3.d
> drwxr-xr-x 2 root root 992 Jun 8 15:31 rc2.d
> -rw-r--r-- 1 root root 1619 Jun 8 15:31 .depend.stop
> -rw-r--r-- 1 root root 1561 Jun 8 15:31 .depend.start
> -rw-r--r-- 1 root root 1216 Jun 8 15:31 .depend.boot
>
> so .depend files where actually modified; rc3 links appear relative not
> absolute; S and K were created;
>
> on reboot the /tmp/dummybbb file exists and is properly populated (contents
> of dummyfile made by bbb on start)
>
> So everything seems to be OK
>
> Running around webmin, I tried to enter into module config (of bootup and
> shutdown) and I saw:
> Use chkconfig command to enable actions? 0
> what does it mean ? perhaps chkconfig is not used to anable actions ?
Ok, that is very useful information. It seems that on SuSE linux, the chkconfig
command can and should be used to enable actions, even though the SuSEE format
form init scripts is slighly different to Redhat. I will make this change in
the next Webmin release.
- Jamie
|