Skip to content

Commit

Permalink
Merge pull request #479 from JakeSFR/sfr
Browse files Browse the repository at this point in the history
drop unionfs, always assume aufs
  • Loading branch information
JakeSFR committed Jun 22, 2014
2 parents e87a8c2 + 40d485f commit 478050a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 26 deletions.
10 changes: 1 addition & 9 deletions woof-code/rootfs-skeleton/bin/initrd_layer_test
@@ -1,19 +1,11 @@
#!/bin/sh

LAYERFS="unionfs"
[ "`lsmod | grep '^aufs'`" != "" ] && LAYERFS="aufs"

mkdir /pup_rw
mkdir /pup_ro1
mkdir /pup_new

mount -o ro,rbind / /pup_ro1

if [ "$LAYERFS" = "aufs" ];then
mount -t aufs -o br:/pup_rw:/pup_ro1 aufs /pup_new
else
mount -t unionfs -o dirs=/pup_rw:/pup_ro1 unionfs /pup_new
fi
mount -t aufs -o br:/pup_rw:/pup_ro1 aufs /pup_new

echo '#!/bin/sh' > /pup_new/etc/rc.d/rc.sysinit

Expand Down
20 changes: 7 additions & 13 deletions woof-code/rootfs-skeleton/usr/local/petget/installpkg.sh
Expand Up @@ -173,14 +173,11 @@ elif [ $PUPMODE -eq 3 -o $PUPMODE -eq 7 -o $PUPMODE -eq 13 ];then
[ -f /var/local/petget/install_mode ] && IMODE="`cat /var/local/petget/install_mode`" || IMODE="savefile"
if [ "$IMODE" != "tmpfs" ]; then
FLAGNODIRECT=1
[ "`lsmod | grep '^unionfs' `" != "" ] && FLAGNODIRECT=0
#100426 aufs can now write direct to save layer...
if [ "`lsmod | grep '^aufs' `" != "" ];then
#note: fsnotify now preferred not inotify, udba=notify uses whichever is enabled in module...
busybox mount -t aufs -o remount,udba=notify unionfs / #remount aufs with best evaluation mode.
FLAGNODIRECT=$?
[ $FLAGNODIRECT -ne 0 ] && logger -s -t "installpkg.sh" "Failed to remount aufs / with udba=notify"
fi
#note: fsnotify now preferred not inotify, udba=notify uses whichever is enabled in module...
busybox mount -t aufs -o remount,udba=notify unionfs / #remount aufs with best evaluation mode.
FLAGNODIRECT=$?
[ $FLAGNODIRECT -ne 0 ] && logger -s -t "installpkg.sh" "Failed to remount aufs / with udba=notify"
if [ $FLAGNODIRECT -eq 0 ];then
#note that /sbin/pup_event_frontend_d will not run snapmergepuppy if installpkg.sh or downloadpkgs.sh are running.
while [ "`pidof snapmergepuppy`" != "" ];do
Expand Down Expand Up @@ -501,12 +498,9 @@ if [ "$DIRECTSAVEPATH" != "" ];then
fi
done
#now re-evaluate all the layers...
if [ "`lsmod | grep '^aufs' `" != "" ];then #100426
busybox mount -t aufs -o remount,udba=reval unionfs / #remount with faster evaluation mode.
[ $? -ne 0 ] && logger -s -t "installpkg.sh" "Failed to remount aufs / with udba=reval"
else
mount -t unionfs -o remount,incgen unionfs /
fi
busybox mount -t aufs -o remount,udba=reval unionfs / #remount with faster evaluation mode.
[ $? -ne 0 ] && logger -s -t "installpkg.sh" "Failed to remount aufs / with udba=reval"

sync
fi

Expand Down
6 changes: 2 additions & 4 deletions woof-code/rootfs-skeleton/usr/sbin/snapmergepuppy
Expand Up @@ -202,10 +202,8 @@ done
touch /tmp/flagnextpassthru

# SFR: fix for .wh files not being created (in some cases) in pup_rw
if [ "`lsmod | grep "^aufs" `" != "" ]; then
# force re-evalution of all the layers
busybox mount -t aufs -o remount,udba=reval unionfs /
fi
# force re-evalution of all the layers
busybox mount -t aufs -o remount,udba=reval unionfs /

sync
cd "$WD"
Expand Down

0 comments on commit 478050a

Please sign in to comment.