archbox/uth.bash
Syahrial Agni Prasetya 5a7b37a14b
Add remount_run to uth.
2021-03-06 12:39:59 +07:00

27 lines
659 B
Bash

#!/usr/bin/env bash
source /etc/archbox.conf
source /tmp/archbox_env
case $1 in
copyresolv)
cp /etc/resolv.conf $CHROOT/etc/resolv.conf
;;
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 $?
;;
esac