On 11/9/2020 8:47 PM, Scott Andrews via blfs-support wrote:
LSB-Tools will fails to create symlinks properly in the following layout:
Every instance that I've seen that used that layout rc.d contained symlinks to ../<name> (so '../init.d' works). I was looking at both old RedHat and old Debian, where you had:

/etc/{init,rc{sysinit,0,1,2,3,4,5,6}}.d
and
/etc/rc.d/{init,rc{sysinit,0,1,2,3,4,5,6}}.d -> ../{init,rc{sysinit,0,1,2,3,4,5,6}}.d

<Snip>

The error is in install_initd.py line 396

That's the same error as the original. That said, even if it works in former instances, it's an error depending on being relative by one (or two) path elements. There should be no technical reason that initdDir could't be /lib/lsb/my/init/d/dir/init.d/ (I'd have to add an environment variable or config file to allow that, but that's pretty far outside the norm, so I'm not doing that). You can change all three instances of

target = os.path.join("../../init.d", sname)

to

target = os.path.join(os.path.relpath(initdDir, rldir), sname)


You can run with '-v -d' to keep from trashing your working setup. Also need to actually print the link targets, so all of the

print("Adding", spath)

need to be

print("Adding", spath, "->", target)


I'll get these into git in just a few.

Thanks for all the testing and the feedback. While it works for LFS, that isn't its only purpose. Bugs can't get fixed using only one configuration. :-) lsbinstall is going to be delayed again anyway, that one does quite a bit more and I just haven't had the time to finish it yet. Your other catch has already been addressed (/etc/rc.d./init.d).

--DJ

--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to