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 Sat 31 Jan 2015, 15:16
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects
snapmergepuppy and rc.shutdown messages
Moderators: Flash, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [1 Post]  
Author Message

Joined: 02 Aug 2013
Posts: 19

PostPosted: Mon 27 Oct 2014, 11:09    Post subject:  snapmergepuppy and rc.shutdown messages
Subject description: updates including unionfs whiteout files

the following is a patch for snapmergepuppy
< SFSPoints=$( grep -o "/initrd/pup_ro[1-9]" /proc/mounts |sort -u ) #110206 Dougal: get a list of the sfs mountpoints
> echo Indexing Whiteouts... >/dev/console
<  rm -rf "$BASE/$N"
<  #110206 Dougal: speedup and refine the search...
<  for P in $SFSPoints
<  do
<    if [ -e "$P/$N" ] ; then
<      [ ! -d "${BASE}/${DN}" ] && mkdir -p "${BASE}/${DN}"
<      touch "${BASE}/${DN}/.wh.${BN}"
<      break
<    fi
<  done #110206 End Dougal.
>  if [ ! -h "${BASE}/$N" -a ! -e "${BASE}/$N" ] ; then
>    [ ! -d "${BASE}/${DN}" ] && mkdir -p "${BASE}/${DN}"
>    touch "${BASE}/${DN}/.wh.${BN}"
>  else
>   rm -rf "$BASE/$N"
>  fi
>  BN="`basename "$N"`" #111229 rerwin: bugfix for jemimah code (110212).
>  DN="`dirname "$N"`" #111229  "
>  if [ -e "$BASE/$DN/.wh.${BN}" ] ; then
>   rm "$BASE/$DN/.wh.${BN}" #110212 jemimah bugfix again in case the directory exists on a different layer and was already deleted and saved - else the directory remains hidden
>   touch "${BASE}/${DN}/.wh..wh..opq" 2>/dev/null #also make it opaque since if you delete a directory and don't save it then create it it is opaque
>  fi
> echo Indexing Files... >/dev/console
< do
> do count=$((count+1));echo $count$'\033[1A' >/dev/console
> echo Sync... >/dev/console

removed Dougal code. "if file exists on a lower layer, have to save the whiteout file..."
also added simple status messages
interesting notes about snapmergepuppy:
it uses cp -u
it checks for "$DN" = "." so wont delete any files at file system base forcing you to manually delete or save files in some scenarios
i actually think it would be useful to have whiteout files always visible in the combined filesystem since they are 1. not always present 2. hidden anyway. then you could hide files you dont want by replacing them with a zero size file and restore the lower one easily.
whiteout opaque files make the whole directory act like a file instead of merging directories
added more shutdown status messages to rc.shutdown to make shutdown more interesting
  [ -x $service_script ] && { echo -n 'Stopping... ';basename $service_script;} >/dev/console

slight bug install cairo save2flash uninstall cairo sfs_load Comics_image_viewer.sfs link doesnt work for mcomix until you save2flash again then sfs_load. maybe because i am using $RAMSAVEINTERVAL = 0
both sfs_load and petget removepreview.sh installpkg.sh scripts do something strange with whiteout files that i think i had a problem with before but maybe not. sfs_load has two options WIPEWHITEONLOAD WIPEWHITEUNLOAD. installpkg.sh installs directly to ro1.
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 » Advanced Topics » Puppy Projects
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.0464s ][ Queries: 11 (0.0041s) ][ GZIP on ]