Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update sfs_load.overlay: Workarounds for /etc, /run, and /var #4264

Open
wants to merge 1 commit into
base: testing
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions woof-code/rootfs-skeleton/usr/sbin/sfs_load.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,28 @@ if [ $# -ne 0 ]; then
done < <(find "$MNT" -mindepth 1 | cut -f 4- -d / | sort -r)
[ $PUPMODE -eq 12 ] && sync "$LIST"

cp -asn "$MNT"/* /
#link anything except /etc, /run, and /var
for fld1 in $(ls $MNT 2>/dev/null | grep -vE '\/etc|\/run|\/var')
do
if [ "$fld1" != "" ]; then
if [ ! -d "/$fld1" ] && [ ! -L "/$fld1" ]; then
mkdir -p "/$fld1"
fi
cp -rasn "$MNT/$fld1"/* "/$fld1"/
fi
done

#copy files in /etc, /run, and /var
for fld1 in etc run var
do
if [ "$fld1" != "" ]; then
if [ ! -d "/$fld1" ] && [ ! -L "/$fld1" ]; then
mkdir -p "/$fld1"
fi
cp -ran "$MNT/$fld1"/* "/$fld1"/
fi
done

/etc/rc.d/rc.update w
pidof -s jwm > /dev/null && jwm -reload
[ $CLI -eq 0 ] && kill $PID
Expand Down Expand Up @@ -312,4 +333,4 @@ export DIALOG='<window title="SFS-Load" default_width="400">
</vbox>
</window>'

exec gtkdialog -p DIALOG
exec gtkdialog -p DIALOG