initscripts hacking needed
Jasper Huijsmans
jasper at lunar-linux.org
Thu Oct 30 00:43:18 GMT 2003
On Wed, 29 Oct 2003 12:20:03 +0100
Jasper Huijsmans <jasper at lunar-linux.org> wrote:
...
> * rc.sysinit calls '/sbin/pidof'; we have it in /bin.
I changed it to /bin in the script. This is the default location fr the
sysvinit module, and I couldn't find a reference in LSB or FHS that
stated otherwise. This is the only change I committed to CVS.
>
> * doesn't work with devfs. We probably should just let the kernel
> mount it automatically. This is what the script seems to expect.
>
This fixed the problem for me, but is probably not the real solution.
===
# If we're using devfs, start devfsd now - we need the old device names
-[ -e /dev/.devfsd -a -x /sbin/devfsd ] && /sbin/devfsd /dev
+[ -e /dev/.devfsd -a -x /sbin/devfsd ] && {
+ mount -t devfs devfs /dev
+ /sbin/devfsd /dev
+}
===
> * fails to bring up loopback device
> - ethtool is called which first wasn't installed, but also fails
> when called with a non-ethernet device.
> - arping was called. I don't have that and don't know what package
> installs it
> - bringing up lo should be simpler than that, shouldn't it? So, I'm
> guessing there is something missing, perhaps an ifup-lo ?
>
Ok, after installing iputils things work. But still ethtool gets called
and I get a log message of the failure. This is wrong IMO: why would
the loopback device depend on anything but net-tools?
The old initscript simply does this:
===
if [ ! $(route -n | grep 127.0.0.0 | wc -l) -ge 1 ]; then
echo -n " * Starting lo: "
/sbin/ifconfig lo 127.0.0.1 netmask 255.0.0.0;
/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 dev lo;
echo -e $RESULT_OK
fi;
===
I encountered three more errors:
rc.sysinit insists on modprobing keyboarddev and mousedev. I don't have
either, probably because I run a 2.6 kernel. This gives fatal kernel
messages. No real problems are caused.
rc.sysinit also mounts usbdevfs and I have in my /etc/fstab, so mount
complains. No big deal.
rc.sysinit calls swapon -a twice, I think, causing mount warnings.
Oh, and somehow hostname is not set, although it worked previously. I
believe it may be something I did, so forget it for now.
That's it. Everything else seems to work fine. I replace sysklogd with
metalog and that works fine as well; I adapted the RH syslog script to
call metalog.
Jasper
More information about the lunar-dev
mailing list