Other Help Topics :: Make appear a file in /opt to be in /usr/sbin
Hi,
I have an executable in /opt, e.g. /opt/exec1
But some other program need it to be in /usr/sbin, which is write protected.
How can I make /opt/exec1 to appear to be /usr/sbin/exec1 WITHOUT
loading a small *.dsl extension or
add write to the bootparameters ( ie dsl write ) or
call /etc/init.d/mkwriteable in /opt/bootlocal.sh or
remaster the KNOPPIX file using 'mkwriteable'?
E.g. using ln ?
Thanks
magicpio
It depends on WHY you , or it, wants it to be seen in /usr/sbin.
If you are looking for it to be in your default path, like it would be
if it WAS in /usr/bin, you can add that location to your PATH.
If some function of the program, say some support files,
really NEED to see the exec located in /usr/sbin, then you could
recompile the program, to work from the /opt/exec1 directory,
rather than the default /usr/sbin it was compiled to work from originally.
We would need more details about the app, to suggest to you the use
of a wrapper, or other means, to have other support files follow a
particular path or location. ( libs, etc.. )
If this is an extension you want to load , or install, and have
it automatically run with all support files found by the app,
recompiling it is the best method, combined with a wrapper,
to link back into the filesystem for other lib/file support
already present in the distro.
73
ke4nt
I could possibly get the source of the app, but recompiling can be quite a big effort as well.
It´s ddclient btw. (dynamic dns client), and it looks in the path for its config file. But itself seems to need itself in /usr/sbin, at least I did not find any option to change this.
However, I´ve used mkwriteable just to try, whether that works, and - yes, it starts, but then fails for some perl module it doesn´t find.
But generally speaking, you sound as if there is no other easy solution to my original question?!
Can you use symbolic links?
Something like "ln -s /opt/exec1 /usr/sbin/exec1" as root.
This could be written in /opt/bootlocal.sh
"Write protected" even for root? Even if this is frugal all the files in /usr/sbin are symbolic links to something like /KNOPPIX/usr/sbin/<program>.
If you are trying to overwrite a file, you have to remove the links first ( If it is a link) and then you can make de symbolic link...
HTH.,
Remco
If you haven't run mkwriteable, the sbin directory itself is a symlink, so you can't add to it (not positive about that, but pretty sure).
There's a good possibility that if it can't find a specific perl module, then that module isn't in DSL
Next Page...
original here.