archbox/remount_run.bash

23 lines
468 B
Bash
Raw Normal View History

2020-12-28 05:22:53 +00:00
#!/usr/bin/env bash
source /etc/archbox.conf
2020-11-02 12:36:27 +00:00
case $1 in
killxdg)
umount -l $CHROOT/run
fuser -km $(cat /tmp/archbox_xdg_runtime_dir)
2020-12-28 12:15:21 +00:00
exit $?
;;
runtimeonly)
mkdir -p $CHROOT/$(cat /tmp/archbox_xdg_runtime_dir)
umount -Rl $CHROOT/$(cat /tmp/archbox_xdg_runtime_dir)
2020-12-28 12:15:21 +00:00
mount --rbind $(cat /tmp/archbox_xdg_runtime_dir) $CHROOT/$(cat /tmp/archbox_xdg_runtime_dir)
exit $?
2020-11-02 12:36:27 +00:00
;;
*)
umount -l $CHROOT/run
mount --rbind /run $CHROOT/run
2020-12-28 12:15:21 +00:00
exit $?
2020-11-02 12:36:27 +00:00
;;
esac