Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 28 Nov 2014, 12:03
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
A better way to link with paths in /etc and /var ?
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [1 Post]  
Author Message
sunburnt


Joined: 08 Jun 2005
Posts: 5042
Location: Arizona, U.S.A.

PostPosted: Mon 14 Jan 2013, 20:06    Post subject:  A better way to link with paths in /etc and /var ?  

I`m designing AppPkg no-install apps.
I need to make links in /etc and /var pointing to the AppPkg /etc and /var.
The problem is that the links may go into preexisting paths in /etc and /var.
Most likely these paths are only 1 dir. deep, but that can`t be counted upon.

It`s easy enough to make the needed full paths and links in them.
I want to remove the "created" paths and links without removing preexisting ones.
This probably means a list of all the newly created /path/link is needed.
And only the new part of the path/link, no preexisting /etc/path.

This is code I have now to make the path/links:
Code:
   [ -d etc ]&&                                 ### Links in:  /etc
      find etc -type f 2>/dev/null |while read T
      do mkdir -p ${T%/*} ; ln -s $T /$T ;done


# Can anyone think of a better way to do this and remove it afterwards?

# This is why it`d be real nice to have a junction link ( acts like a simple union ).
Newly created paths, files, and links would go in a dir. linked with /etc or /var.
When it`s time to cleanup, only newly created ones not in /etc are removed.
.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [1 Post]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0508s ][ Queries: 11 (0.0145s) ][ GZIP on ]