From ee72ae5a8cd3440f243bdb842dd1af8ebb10fdd4 Mon Sep 17 00:00:00 2001 From: Lemniskett Date: Fri, 23 Oct 2020 19:12:30 +0700 Subject: [PATCH] Update archbox --- archbox | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/archbox b/archbox index 5dfb764..5a0f70d 100755 --- a/archbox +++ b/archbox @@ -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