Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Can anyone tell me how i can 'export' a directory to use another via programs - I will be extremely grateful.
I will explain.
I am testing some software on a ppc device that has software already on it which i don't want to remove. Its kernel runs, then proprietry interface (similar to nano-x runs), I want to kill the nano-x and run my software.
I have my software in another folder and want to use my share folder instead of the one in the one in the rom. I can run my app, by killing rcS and the interface, then run mine, but its looking for files in /share and i dont want it to. Its not a matter of recoding my app because it uses lots of shared libraries that also look in /share.
I have all other files working fine but instead of the machine reading /share (which is read only) I want to tell the machine that /share is located /mmc_card/share. I cannot backup the folder and symlinking it because its read only (the only user is root so its not a matter of running chown - the hardware is read only)
I can find lots of information of exporting environment variables such as:
EXPORT myfile=`/home/user/app.so'
but i want to
EXPORT /share=`/mmc_media/share'
so that all systems see /mmc_media/share as if its actually /share.
Did you try it?
I think you will find that the statement "export /share=....." simply creates and exports a variable named "/share", and not an entry in the filesystem tree.
I missed why you cannot make a link---root can create symlinks regardless of how permissions are set (I'm pretty sure......)
Did you try it?
I think you will find that the statement "export /share=....." simply creates and exports a variable named "/share", and not an entry in the filesystem tree.
I missed why you cannot make a link---root can create symlinks regardless of how permissions are set (I'm pretty sure......)
Yeah I agree with that, but the filesystem is in a rom (read only memory) , it cannot be changed with chown or chmod without changing on the pc, creating new firmware and flashing the device. So no i cannot be linked directly.
export /share=`.....`
gives error:209 .. I cant remember exactly (as im not connected to the device at the moment) but it says the syntax is wrong. I think i cannot use '/' there on the left of the brackets.
Its the filesystem tree i want to "dummy" as /mmc_media/share..
A bash variable name must conform to the OpenGroup's definition of "name" which is a word consisting solely of underscores, digits, and alphabetics from the portable character set. The first character of a name is not a digit. This does not include "/".
... but its looking for files in /share and i dont want it to. Its not a matter of recoding my app because it uses lots of shared libraries that also look in /share.
Perhaps you might consider flashing a more capable version of busybox. (Unless space considerations preclude it.)
The version of busybox on my Fedora 11 system (busybox.anacondia) implements both ln and chroot, which leads me to suspect that your busybox capabilities depend on the options you select when you compile it.
Note that the above is speculation on my part, not actual knowledge.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.