s243a icon

run_sandbox.sh (wary #2)

s243a | PRO | 12/13/20 03:29:52 AM UTC | 0 ⭐ | 1638 👁️ | Never ⏰ | []
Bash |

1.84 KB

|

None

|

0 👍

/

0 👎

#!/bin/bash
rm ./sandbox.out #For now I don't want to use the previous config. 
SB_PREFIX=$(realpath ./psandbox)
OS_HOME=$(realpath .)
PSUBDIR=${OS_HOME#/mnt/*/}
MP=${OS_HOME%"$PSUBDIR"}
mkdir -p "$MP"
#OS_HOME="$MP/$PSUBDIR"
LOGFILE="$OS_HOME/sandbox.log" #don't use realpath because busybox doesn't support the -m option. 
RW_LAYER="$OS_HOME/warrysave"
#B1_source="/aufs/devsave/Dropbox (Maestral)/s243a Personal"
#B1_target=/Remote/jobs #Sometimes I might get this folder via samaba isntead of a bind. 
B1_source=/samba
B1_target=/samba  
rev_B1_source=/
rev_B1_target='$FAKEROOT/samba' 
mkdir -p "$RW_LAYER"
#if [ -f ./sandbox.out ]; then
#  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"
#
#else
  #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"
  
  #don't use --no-exit --copy-Xauth for now. 
  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"
  
#/etc/init.d/rc.samba start || /etc/init.d/rc.samba restart

Comments