archbox/remount_run.bash

25 lines
541 B
Bash
Raw Normal View History

2020-12-28 05:22:53 +00:00
#!/usr/bin/env bash
source /etc/archbox.conf
2021-01-29 07:19:16 +00:00
source /tmp/archbox_env
2020-11-02 12:36:27 +00:00
case $1 in
2020-12-31 16:16:31 +00:00
killxdg)
2020-11-02 12:36:27 +00:00
umount -l $CHROOT/run
2021-01-29 07:19:16 +00:00
fuser -km $XDG_RUNTIME_DIR
2020-12-31 16:16:31 +00:00
exit $?
;;
runtimeonly)
2021-01-29 07:19:16 +00:00
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
2020-12-31 16:16:31 +00:00
exit $?
;;
*)
umount -l $CHROOT/run
mount --rbind /run $CHROOT/run
exit $?
;;
2020-11-02 12:36:27 +00:00
esac