Symlink USB drive in home.

Using applications, configuring, problems
Post Reply
Message
Author
moonskin
Posts: 38
Joined: Sat 18 Oct 2008, 05:25
Location: Wollongong, Australia

Symlink USB drive in home.

#1 Post by moonskin »

Hi

I've remastered Precise 5.5 for a specific task that involves a java application and I have a small problem that I need some advice about. (I need this to run from a live CD.)

Basically, the java application loads an XML file which describes a pipe organ. That's fine if the organ file has been mastered in to the CD, but if it is just sitting on a USB drive, the user has to navigate to the mount point to see the files on the USB drive - and most users will not know how to do this.

What I'm thinking about is the feasibility of having pup_event_frontend_d create a symlink in /home to the usb drive mount point when it creates the pinboard entry and remove the symlink when the pinboard entry is removed. This means the users will see the symlink when they use the open function in the application and can go straight to the drive.

I guess my questions are:
1. Is this a reasonable idea?
2. Is this the best place to handle it?
3. Is there an existing solution for this?
4. Am I mad?

Regards
Graham

moonskin
Posts: 38
Joined: Sat 18 Oct 2008, 05:25
Location: Wollongong, Australia

#2 Post by moonskin »

I've got this working now for a frugal install. Just need to work out what to do for a live CD.

In /sbin/pup_event_frontend_d following the code that creates the pinborard entry (add_pinboard_func())

Code: Select all

...</env:Envelope>"  | rox -R 
I added

Code: Select all

ln -s /mnt/${ONEDRVNAME} /root   #create symlink in /root to drive's mount point
mv /root/${ONEDRVNAME} /root/Extrnl_Drive_${ONEDRVNAME}  #rename the link
There is also

Code: Select all

rm -f /root/Extrnl_Drive_${ONEDRVNAME}
added at the end of remove_pinboard_func()

Regards
Graham

Post Reply