archbox/remount_run.bash
2021-01-29 14:19:16 +07:00

25 lines
541 B
Bash

#!/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