Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ [1] 2 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Make appear a file in /opt to be in /usr/sbin< Next Oldest | Next Newest >
magicpio Offline





Group: Members
Posts: 20
Joined: Sep. 2004
Posted: Sep. 25 2005,19:43 QUOTE

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
Back to top
Profile PM 
ke4nt1 Offline





Group: Members
Posts: 2329
Joined: Oct. 2003
Posted: Sep. 25 2005,19:58 QUOTE

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
Back to top
Profile PM 
magicpio Offline





Group: Members
Posts: 20
Joined: Sep. 2004
Posted: Sep. 26 2005,20:14 QUOTE

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?!
Back to top
Profile PM 
NotTheMama Offline





Group: Members
Posts: 42
Joined: April 2005
Posted: Sep. 27 2005,06:49 QUOTE

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
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Sep. 27 2005,14:31 QUOTE

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


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
6 replies since Sep. 25 2005,19:43 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ [1] 2 >/
reply to topic new topic new poll
Quick Reply: Make appear a file in /opt to be in /usr/sbin

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code