Add remount_run to uth.

This commit is contained in:
Syahrial Agni Prasetya 2021-03-06 12:39:59 +07:00
parent 399d717bc4
commit 5a7b37a14b
No known key found for this signature in database
GPG Key ID: 46F88749C8C79383
5 changed files with 22 additions and 28 deletions

View File

@ -104,12 +104,12 @@ case $1 in
;; ;;
--remount-run) --remount-run)
storeenv storeenv
$PRIV $PREFIX/share/archbox/bin/remount_run $PRIV $PREFIX/share/archbox/bin/uth remountrun
exit $? exit $?
;; ;;
--mount-runtime-only) --mount-runtime-only)
storeenv storeenv
$PRIV $PREFIX/share/archbox/bin/remount_run runtimeonly $PRIV $PREFIX/share/archbox/bin/uth runtimeonly
exit $? exit $?
;; ;;
-h|--help) -h|--help)

View File

@ -3,4 +3,4 @@
source /etc/archbox.conf source /etc/archbox.conf
startx startx
$PRIV $PREFIX/share/archbox/bin/remount_run killxdg $PRIV $PREFIX/share/archbox/bin/uth killxdg

View File

@ -7,7 +7,6 @@ install -v -D -m 755 ./archbox.bash $PREFIX/bin/archbox
install -v -D -m 755 ./archbox-desktop.bash $PREFIX/bin/archbox-desktop install -v -D -m 755 ./archbox-desktop.bash $PREFIX/bin/archbox-desktop
[[ ! -e /etc/archbox.conf ]] && install -v -D -m 755 ./archbox.conf /etc/archbox.conf [[ ! -e /etc/archbox.conf ]] && install -v -D -m 755 ./archbox.conf /etc/archbox.conf
install -v -D -m 755 ./archboxcommand.bash $PREFIX/share/archbox/bin/archbox install -v -D -m 755 ./archboxcommand.bash $PREFIX/share/archbox/bin/archbox
install -v -D -m 755 ./remount_run.bash $PREFIX/share/archbox/bin/remount_run
install -v -D -m 755 ./chroot_setup.bash $PREFIX/share/archbox/chroot_setup.bash install -v -D -m 755 ./chroot_setup.bash $PREFIX/share/archbox/chroot_setup.bash
install -v -D -m 755 ./archboxinit.bash $PREFIX/share/archbox/bin/archboxinit install -v -D -m 755 ./archboxinit.bash $PREFIX/share/archbox/bin/archboxinit
install -v -D -m 755 ./uth.bash $PREFIX/share/archbox/bin/uth install -v -D -m 755 ./uth.bash $PREFIX/share/archbox/bin/uth

View File

@ -1,24 +0,0 @@
#!/usr/bin/env bash
source /etc/archbox.conf
source /tmp/archbox_env
case $1 in
killxdg)
umount -l $CHROOT/run
fuser -km $XDG_RUNTIME_DIR
exit $?
;;
runtimeonly)
mkdir -p $CHROOT$XDG_RUNTIME_DIR
umount -Rl $CHROOT$XDG_RUNTIME_DIR 2>/dev/null
mount | grep $CHROOT$XDG_RUNTIME_DIR || \
mount --rbind $XDG_RUNTIME_DIR $CHROOT$XDG_RUNTIME_DIR
exit $?
;;
*)
umount -l $CHROOT/run
mount --rbind /run $CHROOT/run
exit $?
;;
esac

View File

@ -1,8 +1,27 @@
#!/usr/bin/env bash #!/usr/bin/env bash
source /etc/archbox.conf source /etc/archbox.conf
source /tmp/archbox_env
case $1 in case $1 in
copyresolv) copyresolv)
cp /etc/resolv.conf $CHROOT/etc/resolv.conf cp /etc/resolv.conf $CHROOT/etc/resolv.conf
;; ;;
killxdg)
umount -l $CHROOT/run
fuser -km $XDG_RUNTIME_DIR
exit $?
;;
runtimeonly)
mkdir -p $CHROOT$XDG_RUNTIME_DIR
umount -Rl $CHROOT$XDG_RUNTIME_DIR 2>/dev/null
mount | grep $CHROOT$XDG_RUNTIME_DIR || \
mount --rbind $XDG_RUNTIME_DIR $CHROOT$XDG_RUNTIME_DIR
exit $?
;;
remountrun)
umount -l $CHROOT/run 2>/dev/null
mount --rbind /run $CHROOT/run
exit $?
;;
esac esac