Advertisement
s243a

intallpkg.sh (tahpup) LN# 181-206 bypass tmpfs

Apr 22nd, 2018
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.33 KB | None | 0 0
  1. # LN# 181-206 of /usr/local/petget/installpkg.sh (tahpup) - http://www.pearltrees.com/s243a/installpkg-sh-usr-local-petget/id20402080
  2. #boot from flash: bypass tmpfs top layer, install direct to pup_save file...
  3. elif [ $PUPMODE -eq 3 -o $PUPMODE -eq 7 -o $PUPMODE -eq 13 ];then
  4.     # SFR: let user chose...
  5.     if [ -f /var/local/petget/install_mode ] ; then
  6.      IM="`cat /var/local/petget/install_mode`"
  7.     else
  8.      IMODE="savefile"
  9.     fi
  10.     [ "$IM" = "true" ] && IMODE="tmpfs" || IMODE="savefile"
  11.     if [ "$IMODE" != "tmpfs" ]; then
  12.      FLAGNODIRECT=1
  13.      #100426 aufs can now write direct to save layer...
  14.      #note: fsnotify now preferred not inotify, udba=notify uses whichever is enabled in module...
  15.      busybox mount -t aufs -o remount,udba=notify unionfs / #remount aufs with best evaluation mode.
  16.      FLAGNODIRECT=$?
  17.      [ $FLAGNODIRECT -ne 0 ] && logger -s -t "installpkg.sh" "Failed to remount aufs / with udba=notify"
  18.      if [ $FLAGNODIRECT -eq 0 ];then
  19.       #note that /sbin/pup_event_frontend_d will not run snapmergepuppy if installpkg.sh or downloadpkgs.sh are running.
  20.       while [ "`pidof snapmergepuppy`" != "" ];do
  21.        sleep 1
  22.       done
  23.       DIRECTSAVEPATH="/initrd${SAVE_LAYER}" #SAVE_LAYER is in /etc/rc.d/PUPSTATE.
  24.       rm -f $DIRECTSAVEPATH/pet.specs $DIRECTSAVEPATH/pinstall.sh $DIRECTSAVEPATH/puninstall.sh $DIRECTSAVEPATH/install/doinst.sh
  25.      fi
  26.     fi
  27. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement