Fix accidental "archbox --enter" when non-zero return.

This commit is contained in:
lemniskett 2020-10-29 00:10:37 +07:00
parent 19e0ab94bf
commit 28a4025ee5

View File

@ -3,5 +3,5 @@
source /etc/archbox.conf
COMMAND=$(echo $@ | tr ' ' '\ ')
[[ ! $1 = "--enter" ]] && chroot $CHROOT /bin/su -c "$COMMAND" $USER \
|| chroot $CHROOT /bin/su $USER
[[ $1 = "--enter" ]] && chroot $CHROOT /bin/su $USER \
|| chroot $CHROOT /bin/su -c "$COMMAND" $USER