2021-03-06 05:28:09 +00:00
|
|
|
#!/usr/bin/env bash
|
2021-03-06 05:39:59 +00:00
|
|
|
|
2021-05-10 06:38:08 +00:00
|
|
|
source /etc/archbox.conf &>/dev/null
|
|
|
|
source /tmp/archbox_env &>/dev/null
|
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 06:09:14 +00:00
|
|
|
chownvar)
|
|
|
|
chown $2:$2 /tmp/archbox_env
|
2021-03-30 16:44:09 +00:00
|
|
|
chmod 755 /tmp/archbox_env
|
2021-03-06 06:09:14 +00:00
|
|
|
;;
|
2021-03-30 16:44:09 +00:00
|
|
|
esac
|