openSUSE Forums > Archives > SF Archives > ARCHIVES - Programming & Scripting » How To Make My Directory Links Persist After Reboot?

Go Back   openSUSE Forums > Archives > SF Archives > ARCHIVES - Programming & Scripting
Forums FAQ Members List Search Today's Posts Mark Forums Read


ARCHIVES - Programming & Scripting A place to discuss website design, programming, shell scripts, etc

 
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 13-Jan-2008, 13:02
pofadda
Guest
 
Posts: n/a
Default

I have done my first 'ln' to make for easy access to my /windows/Data-W/docs directory (ntfs, elsewhere on the disk). There seem to be a number of ways to make this link permanent-ish:
1. write a small script with the ln command in it
2. modify/create a udev script in /etc/init.d
3. something else related to the initial mapping of directories to partitions...???

I am unsure of the correct dir/file location to use in 1. Woulld it run if non-root user logs in?
The udev route is daunting - new syntax, new pitfalls - although it seems the most 'professonal'. Reading http://www.reactivated.net/writing_u...s.html#builtin was interesting but I'm still not confident.

This seems such a basic issue but no SuSE 10.3 solutions reward my searching.
  #2 (permalink)  
Old 16-Jan-2008, 14:01
AndrewTheArt
Guest
 
Posts: n/a
Default

You could place the command to start ln in the /etc/profile.local file. It should then run that command at login for every user.

Just create and open up the file as root -

Get root access

Code:
su
Create the file, as it is not there by default. There is a "profile" file in the /etc/ folder, but it could possibly get overwritten during system updates, so that's why were not using it and opting for profile.local instead. /etc/profile is for options defined by SUSE itself, and shouldn't be modified. /etc/profile actually detects whether there is a profile.local file, and if there is, it executes it.

Code:
touch /etc/profile.local
Open up the new file in gedit or kate

Code:
gedit /etc/profile.local
Code:
kate /etc/profile.local
At this point, just add your command as the first line and save the file.

There are doubtlessly countless ways to start up a script in SUSE - Linux is dauntingly and endlessly configurable - but this is the way I would personally do it and which seems to be the most popular option. If /etc/profile.local doesn't work for you, /etc/profile certainly will, but could possibly be overwritten in the future.

EDITL Might want to research /etc/initscript as well.
  #3 (permalink)  
Old 16-Jan-2008, 21:37
blwest
Guest
 
Posts: n/a
Default

Say you have a directory called /export/mass/music and you want to see this in your home area.
Code:
 cd
Code:
ln -s /export/mass/music
now you have a symbolc link that makes /home/username/music look like it's in your home area instead of having to type /export/mass/music. The link is permanent, even if you reboot.
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2