|
From: <and...@fr...> - 2006-06-07 08:02:49
|
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.......
Do you want to know which is the first line of the chkconfig perl script ?
The first lines of /sbin/chkconfig are:
#!/usr/bin/perl
use strict;
use Getopt::Long;
use File::Temp 'tempfile';
my $initdir = '/etc/init.d';
my $inetddir = '/etc/inetd.d';
my $xinetddir = '/etc/xinetd.d';
my %to_d = (
'0' => 'rc0.d', '1' => 'rc1.d', '2' => 'rc2.d', '3' => 'rc3.d',
'4' => 'rc4.d', '5' => 'rc5.d', 'S' => 'rcS.d', 'B' => 'boot.d'
);
# which files to skip in $initdir
my %skips_rc = map {$_ => 1} qw {rc rx skeleton powerfail boot halt reboot
single boot.local halt.lo
cal};
.......727 lines total
thanks in advance,
Andrea
Chi ricevesse questa mail per errore e' gentilmente pregato di cancellarla.
Visitate il sito http://www.frameweb.it
|