archbox/remount_run.bash
2020-12-29 16:23:37 +07:00

23 lines
468 B
Bash
Executable File

#!/usr/bin/env bash
source /etc/archbox.conf
case $1 in
killxdg)
umount -l $CHROOT/run
fuser -km $(cat /tmp/archbox_xdg_runtime_dir)
exit $?
;;
runtimeonly)
mkdir -p $CHROOT/$(cat /tmp/archbox_xdg_runtime_dir)
umount -Rl $CHROOT/$(cat /tmp/archbox_xdg_runtime_dir)
mount --rbind $(cat /tmp/archbox_xdg_runtime_dir) $CHROOT/$(cat /tmp/archbox_xdg_runtime_dir)
exit $?
;;
*)
umount -l $CHROOT/run
mount --rbind /run $CHROOT/run
exit $?
;;
esac