Update archbox

This commit is contained in:
Lemniskett 2020-10-23 19:12:30 +07:00 committed by GitHub
parent d276b157d0
commit ee72ae5a8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,8 @@
CHROOT="/var/archlinux/root.x86_64"
COMMAND=$(echo $@ | tr ' ' '\ ')
USER=$(whoami)
doas cp /etc/resolv.conf $CHROOT/etc/resolv.conf
[[ -z $@ ]] && doas chroot $CHROOT /bin/su lemniskett \
|| doas chroot $CHROOT su -c "$COMMAND" lemniskett
[[ -z $@ ]] && doas chroot $CHROOT /bin/su $USER \
|| doas chroot $CHROOT su -c "$COMMAND" $USER