LSB-Tools will fails to create symlinks properly in the following layout
mv /etc/rc.d/init.d /etc
layout as follows
/etc/init.d
/etc/rc.d/
rc0.d rc1.d rc2.d rc3.d rc4.d rc5.d rc6.d rcS.d
init script header....
head -12 fake-hwclock
#!/bin/bash
### BEGIN INIT INFO
# Provides: fake-hwclock
# Required-Start: $local_fs
# Should-Start:
# Required-Stop:
# Should-Stop: $local_fs
# Default-Start: S
# Default-Stop: 0 6
# Short-Description: Restores clock to shutdown time
# Description: Restores clock to shutdown time
### END INIT INFO
install_init fake-hwclock
Results in......
/etc/rc.d/rcS.d:
S91fake-hwclock -> ../init.d/fake-hwclock
Notice the symlink is created incorrectly as it should be
S91fake-hwclock -> ../../init.d/fake-hwclock
LSB-Tools tests for the init.d directory in __init__.py but does the
wrong thing as it should create the symlinks relative to the detected
init.d directory, from the /etc/rc.d/rcXd directory. If you follow
waht I am saying
The error is in install_initd.py line 396,
for s in stopdict[str(runlevel)]:
sname = s[hindex["name"]]
if sid < 10:
strsid = "0" + str(sid)
else:
strsid = str(sid)
gname = "K" + strsid + sname
spath = os.path.join(rldir, gname)
target = os.path.join("../init.d", sname)
^^^^^^^^^^^
if debug == 1 or dryrun == 1:
print("Adding", spath)
if dryrun == 0:
os.symlink(target, spath)
sid += increment
target = os.path.join("../init.d", sname)
^^^^^^^^^^^
should be relative to the detected init.d path and not hard
coded relative to /etc/rc.d/rcX.d directory
Making that line as this
target = os.path.join("../../init.d", sname)
in the case the init.d directory is /etc/init.d as it
should be in the LSB specs.
I actually would have used a variable and construct the variable
contents relative to the correct directory and remove the hard coded
path.
I am NOT a python programmer or I would have submitted a patch to do so.
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page