Advertisement
s243a

psandbox.sh (wary #3)

Dec 13th, 2020 (edited)
523
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.84 KB | None | 0 0
  1. #!/bin/bash
  2. rm ./sandbox.out #For now I don't want to use the previous config.
  3. SB_PREFIX=$(realpath ./psandbox)
  4. OS_HOME=$(realpath .)
  5. PSUBDIR=${OS_HOME#/mnt/*/}
  6. MP=${OS_HOME%"$PSUBDIR"}
  7. mkdir -p "$MP"
  8. #OS_HOME="$MP/$PSUBDIR"
  9. LOGFILE="$OS_HOME/sandbox.log" #don't use realpath because busybox doesn't support the -m option.
  10. RW_LAYER="$OS_HOME/warrysave"
  11. #B1_source="/aufs/devsave/Dropbox (Maestral)/s243a Personal"
  12. #B1_target=/Remote/jobs #Sometimes I might get this folder via samaba isntead of a bind.
  13. B1_source=/samba
  14. B1_target=/samba  
  15. rev_B1_source=/
  16. rev_B1_target='$FAKEROOT/samba'
  17. mkdir -p "$RW_LAYER"
  18. #if [ -f ./sandbox.out ]; then
  19. #  bash -x "$SB_PREFIX"/usr/bin/psandbox.sh --logfile "$LOGFILE" -f "$OS_HOME"/sandbox.out -o "$OS_HOME"/sandbox.out --pdrv #"$MP" --maybe-psubdir "$PSUBDIR" -e "devx_fossapup64_9.5.sfs" --no-exit --rw-layer "$RW_LAYER" --copy-Xauth --bind-X11-#sockets --copy-resolv_conf --bind "$B1_source" "$B1_target"
  20. #
  21. #else
  22.   #bash -x "$SB_PREFIX"/usr/bin/psandbox.sh --trace --logfile "$LOGFILE" -o "$OS_HOME"/sandbox.out --pdrv "$MP" --maybe-psubdir "$PSUBDIR" -e "devx_fossapup64_9.5.sfs" --no-exit --rw-layer "$RW_LAYER" --copy-Xauth --bind-X11-sockets --copy-resolv_conf --rev_bind "$B1_source"--rev_bind "$B1_target" --bind "$B1_source" --bind  "$B1_target" ----before-chroot "/etc/init.d/rc.samba start || /etc/init.d/rc.samba restart"
  23.  
  24.   #don't use --no-exit --copy-Xauth for now.
  25.   bash -x "$SB_PREFIX"/usr/bin/psandbox.sh --trace --logfile "$LOGFILE" -o "$OS_HOME"/sandbox.out --pdrv "$MP" --maybe-psubdir "$PSUBDIR" --no-exit --rw-layer "$RW_LAYER" --bind-X11-sockets --copy-resolv_conf --rev-bind "$B1_source" --rev_bind "$B1_target" --bind "$B1_source" --bind  "$B1_target" --before-chroot "/etc/init.d/rc.samba start || /etc/init.d/rc.samba restart"
  26.  
  27. #/etc/init.d/rc.samba start || /etc/init.d/rc.samba restart
  28.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement