On Tue, 10 Nov 2020 21:37:25 -0600 DJ Lucas via blfs-support <blfs-support@lists.linuxfromscratch.org> wrote:
> On 11/10/2020 8:53 PM, Scott Andrews via blfs-support wrote: > > > > I'll have to look at the target = > > os.path.join(os.path.relpath(initdDir, rldir), sname) to see if I > > think it will solve this. > Python is really easy to learn. To see how the variable work > together, start up a python3 shell and do these one by one: > > import os.path > script = "/etc/init.d/reboot" > startid = "99" > scriptname = os.path.basename(script) > initdDir = "/etc/init.d" > scriptpath = os.path.join(initdDir, scriptname) > print(scriptpath) > sname = os.path.basename(scriptpath) > print(sname) > gname = "S" + startid + sname > print(gname) > rldir = "/etc/rc.d/rc6.d" > print("os.path.relpath determines the relative path between", > initdDir, "and", rldir+":") > print(os.path.relpath(initdDir, rldir)) > spath = os.path.join(rldir, gname) > print(spath) > target = os.path.join(os.path.relpath(initdDir, rldir), sname) > print ("Adding", spath, "->", target) > exit() > > --DJ > Yes I will need to learn python, after the project I am working on currently -- http://lists.linuxfromscratch.org/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page