[Gllug] Getting a script to run at boot time on Debian Squeeze
John Winters
john at sinodun.org.uk
Sat Feb 19 16:16:10 UTC 2011
I have a SheevaPlug running Debian and I've recently updated it from
Lenny to Squeeze. This has led to a problem.
The system has its root fs on an SDHC card and then various data
directories on an external USB HDD with the space being managed by lvm.
At boot time, the external drive takes a few seconds to be noticed and
ready, so when I first set it up I put a little script called "dosleep"
in /etc/init.d and linked it from /etc/rcS.d. It sleeps for 5 seconds
and is in the boot sequence just before the lvm stuff. Like this:
john at sheeva:/etc/init.d$ ls /etc/rcS.d
README S20module-init-tools S40networking
S02hostname.sh S24dosleep S43portmap
S02mountkernfs.sh S25mdadm-raid S44nfs-common
S03udev S26lvm2 S45mountnfs.sh
S04mountdevsubfs.sh S30checkfs.sh S46mountnfs-bootclean.sh
S05bootlogd S30procps S47lm-sensors
S07hdparm S35mountall.sh S48console-screen.sh
S08hwclockfirst.sh S36mountall-bootclean.sh S55bootmisc.sh
S10checkroot.sh S36udev-mtab S55urandom
S11hwclock.sh S37mountoverflowtmp S70screen-cleanup
S12mtab.sh S38pppd-dns S70x11-common
S18ifupdown-clean S39ifupdown S99stop-bootlogd-single
This used to work fine, but since the upgrade to Squeeze, my little
script doesn't seem to get called at all. The boot sequence has not
been converted to dependency based booting - largely because of the
existence of this script.
Looking at the Debian policy manual, it says one now can't rely on just
having the symbolic link there, but it doesn't say what the mechanism
actually is.
I'm intending to add the necessary headers to my script to allow
dependency based booting, just as soon as I work out why it doesn't get
called.
Incidentally, the dosleep script currently contains:
#!/bin/sh
/usr/bin/logger "Sleeping for 5 seconds"
/bin/sleep 5
/usr/bin/logger "Finished sleeping"
I know this is horribly out of date, but I don't see why it doesn't get
called at all.
Any ideas?
John
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list