Hi,

I just reproduced this bug on a Debian lenny machine. For some silly reason I decided to do the following:

# apt-get install insserv

# insserv
insserv: warning: current start runlevel(s) (0) of script `halt' overwrites defaults (empty). insserv: warning: current start runlevel(s) (0 6) of script `umountfs' overwrites defaults (empty). insserv: warning: current start runlevel(s) (6) of script `reboot' overwrites defaults (empty). insserv: warning: current start runlevel(s) (0 6) of script `sendsigs' overwrites defaults (empty). insserv: warning: current start runlevel(s) (0 6) of script `umountroot' overwrites defaults (empty). insserv: warning: current start runlevel(s) (0 6) of script `umountnfs.sh' overwrites defaults (empty).

# ls /etc/rc0.d
K01acct
K01apcupsd
K01arpwatch
K01atd
K01edac
K01etc-setserial
K01exim4
K01fancontrol
K01ipmievd
K01mdadm
K01mrd6
K01nfs-kernel-server
K01ntp
K01openbsd-inetd
K01radvd
K01rng-tools
K01rsync
K01setserial
K01smartmontools
K01tftpd-hpa
K01vz
K01watchdog
K01wd_keepalive
K01xinetd
K02nfs-common
K03rsyslog
K03syslog-ng
K04hwclock.sh
K05mountoverflowtmp
README
S01halt
S01sendsigs
S01umountfs
S01umountnfs.sh
S01umountroot
S07mdadm-raid
S09cryptdisks-early
S10ifupdown
S10lvm2
S11cryptdisks
S16networking
S16urandom
S17portmap


It's lucky I checked to see what the result was of running insserv, before rebooting or shutting down the machine. I suspect it would have caused a RAID desync followed by a fsck and who knows what else.

Adding Required-Start: $all to /etc/init.d/{halt,reboot} and re-running insserv *appeared* to fix the most obvious issue. But I think I know why that's wrong; the other initscripts should instead have the appropriate Required-Stop entries to make sure they get run before their dependencies (eg. local/remote filesystems, syslog). And then it would be *implied* that 'halt' or 'reboot' must run last.

But some initscripts in lenny perhaps predate dependency-based booting so not all of them have the appropriate entries there. This means that the ordering of my startup scripts is probably messed up now too. Fortunately I keep backups.

I checked, and upgrading to the squeeze versions of insserv, sysvinit, sysv-rc and initscripts does correctly rename the contents of /etc/rc{0,6}.d from S* to K*. To completely fix the mess I made by running 'insserv' without arguments on a lenny system, I think a full 'apt-get dist-upgrade' to squeeze might work. In fact it may be a good time for me to upgrade to squeeze anyway.

I think the advice here would be 'DON'T RUN INSSERV WITHOUT ARGUMENTS! At least on a lenny install'. But how many Linux commands ultimately lead to data loss / filesystem corruption by running them without any arguments, especially without using something like a '--force' option?

Regards,
--
Steven Chamberlain
ste...@pyro.eu.org



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to