|
From: Jamie C. <jca...@we...> - 2006-06-07 16:55:57
|
On 7/Jun/2006 03:02 and...@fr... wrote ..
> If I create a new job aaa via webmin, a new file /etc/init.d/aaa is
> created;
>
> sogeaste01:/etc/init.d # cat aaa
> #!/bin/sh
> ### BEGIN INIT INFO
> # Provides: aaa
> # Required-Start: $network
> # Required-Stop: $network
> # Default-Start: 2 3 5
> # Description: start dummy aaa
> ### END INIT INFO
>
> case "$1" in
> 'start')
> /bin/echo "contents of dummyfile made by aaa on start" >
> /tmp/dummyfile
> ;;
> 'stop')
> /bin/echo "contents of dummyfile made by aaa on stop" >
> /tmp/dummyfile
> ;;
> *)
> echo "Usage: $0 { start | stop }"
> ;;
> esac
> exit 0
>
> an absolute link in /etc/init.d/rc3.d directory is created:
> S99aaa a -> /etc/init.d/aaa
>
> on reboot, the script doesn't start, and no /tmp/dummyfile is created:
>
> using yast; entering system services runlevel editor, disabling aaa from
> runlevel 2 3 5 and saving; and re-entering and re-enabling aaa in runlevel
> 2 3 5;
> the script /etc/init.d/aaa is not altered at all; into the directory
> /etc/init.d/rc3.d two new links are created:
> S07aaa -> ../aaa
> K15aaa -> ../aaa
>
> on reboot, the script starts and /tmp/dummyfile shows the proper contents
> sogeaste01:/etc/init.d # cat /tmp/dummyfile
> contents of dummyfile made by aaa on start
>
> other considerations:
>
> in the init.d directory, the file .depend.start | stop boot are not
> altered by webmin on aaa process creation;
>
> on the other side, when the process is disabled and re-enabled by yast,
> these 3 files are altered; the aaa appears in that files;
>
> cat .depend.start | grep aaa (before using yast)
> no lines shown
>
> cat .depend.start | grep aaa (after using yast)
>
> TARGETS = kbd nfs fbset earlykbd mysql network alsasound resmgr syslog
> earlysyslog amportal webmin apache2 boot.clock postfix running-kernel
> boot.udev cron powersaved dbus haldaemon acpid portmap nfsboot nscd sshd
> slpd xdm gpm aaa atd raw halt pcscd svnserve autoyast SuSEfirewall2_setup
> rpasswdd mdadmd openct random reboot single joystick saslauthd
> rpmconfigcheck
>
> aaa: network
>
> SuSEfirewall2_setup: apache2 kbd fbset mysql alsasound network syslog
> amportal random resmgr webmin apache2 running-kernel boot.udev cron
> powersaved acpid nfs portmap nfsboot dbus nscd sshd postfix postfix
> haldaemon earlykbd xdm earlysyslog aaa atd gpm raw slpd slpd pcscd svnserve
> autoyast rpasswdd mdadmd openct joystick saslauthd rpmconfigcheck
>
> so now aaa appears in 3 lines of .depend.start; the same behaviour in the
> other files depend.stop
>
> sogeaste01:/etc/init.d # cat .depend.stop | grep aaa (after using yast)
>
> TARGETS = kbd nfs fbset earlykbd mysql network alsasound resmgr syslog
> earlysyslog amportal webmin apache2 postfix running-kernel boot.udev cron
> powersaved dbus haldaemon acpid portmap nfsboot nscd sshd slpd xdm gpm
> aaa
> atd raw halt pcscd svnserve autoyast SuSEfirewall2_setup rpasswdd mdadmd
> openct random reboot single joystick saslauthd rpmconfigcheck
>
> network: mysql syslog amportal webmin apache2 nfs portmap nfsboot nscd
> sshd
> postfix aaa slpd autoyast saslauthd
>
> pcmcia: mysql amportal webmin apache2 nfs portmap nfsboot nscd sshd postfix
> aaa slpd autoyast saslauthd
>
> hotplug: mysql amportal webmin apache2 nfs portmap nfsboot nscd sshd
> postfix aaa slpd pcscd autoyast saslauthd
>
> ********************
> >I think that the underlying problem may be the way Webmin creates the
> >init.d script. What does the chkconfig: line at the top of the script
> >contain on your system?
>
> Sorry for my english, but I didn't understand the question about chkconfig
> line.......
Thanks for the debugging info ..
Actually, what I was really wondering is if the commands :
chkconfig --add aaa
chkconfig add on
when run as root from the command line creates the same symlinks and
.depend file entries as when you use YaST.
- Jamie
|