archbox/uth.bash

27 lines
659 B
Bash
Raw Normal View History

2021-03-06 05:28:09 +00:00
#!/usr/bin/env bash
2021-03-06 05:39:59 +00:00
2021-03-06 05:28:09 +00:00
source /etc/archbox.conf
2021-03-06 05:39:59 +00:00
source /tmp/archbox_env
2021-03-06 05:28:09 +00:00
case $1 in
copyresolv)
cp /etc/resolv.conf $CHROOT/etc/resolv.conf
;;
2021-03-06 05:39:59 +00:00
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 $?
;;
2021-03-06 05:28:09 +00:00
esac