Advertisement
s243a

initrd/init:replace_dir() (Tahrpup)

Apr 15th, 2018
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.58 KB | None | 0 0
  1. replace_dir() { #SAVE_LAYER=/pup_rw #Line 690 of initrd/init
  2.  #setup empty /tmp on tmpfs for in stack
  3.  rm -rf ${SAVE_LAYER}/tmp
  4.  #adjust stack
  5.  echo "mount -o remount,prepend:${SAVE_LAYER}=rw,mod:/mnt/tmpfs/pup_rw=ro,del:/mnt/tmpfs/pup_rw /pup_new" #debug
  6.  mount -o remount,prepend:${SAVE_LAYER}=rw,mod:/mnt/tmpfs/pup_rw=ro,del:/mnt/tmpfs/pup_rw /pup_new
  7.  if [ $? -eq 0 ];then
  8.   rm -rf /mnt/tmpfs/pup_rw
  9.   KEEPMOUNTED="${KEEPMOUNTED}${SAVEPART} "
  10.   [ "$SAVE_NAME" ] && NEWUNIONRECORD="$SAVE_NAME $NEWUNIONRECORD"
  11.  else
  12.   printf "${L_ADDING_SAVE_LAYER_FAILED}\n" "$SAVE_LAYER"
  13.  fi
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement