# #query modifying executable|shared system files.
# if [ "`pidof X | tr "\n" "z"`" = "z" ];then
# dialog --title "PupSafe security system" --yesno "An attempt is being made to modify system file\n/${N}\nDo you want to allow this?" 0 0
# else
# Xdialog --display :0 --title "PupSafe security system" --left --icon "/usr/local/lib/X11/pixmaps/pupsafe80.xpm" --yesno "An attempt has being made to modify system file\n/${N}\nDo you want to allow this?" 0 0
# fi
# if [ ! $? -eq 0 ];then
# SNAPMERGE="bad"
# echo "$N" >> /tmp/pupsafebadlist.txt
# fi
# fi
# fi
# fi
# if [ "$SNAPMERGE" = "ok" ];then
# cp -a --remove-destination "$N" "$BASE/$N"
# echo "$N" >> /tmp/pupsafesaved.txt
# fi
# fi
# fi
#for now, above removed, just save it...
cp -a --remove-destination "$N" "$BASE/$N"
done
# Handle Whiteouts
# adding -mount here also...
find . -mount \( -regex '.*/\.wh\.[^/]*' -type f \) | sed -e 's/\.\///;s/\.wh\.//' |
while read N
do
rm -rf "$BASE/$N"
done
cd $WD
shift
done
#BK no, cannot figure out how to flush tmpfs...
##BK
##have merged pup_rw back to pup_ro1, however all the dirs and files are still in pup_rw.
##Probably the proper way to empty pup_rw would be to:
## 1. unattach pup_rw branch
## ...but can only do this if all files in pup_rw are closed.
## 2. delete everything in pup_rw/
## 3. reattach pup_rw branch.
##Or, maybe this nasty way works...
#sync
##need to be careful not to delete pup_xxx.sfs file...
##(which got loaded into ramdisk at bootup and must stay there)