From 28a4025ee53b3cc66108ba7ac752e6be077c90b4 Mon Sep 17 00:00:00 2001 From: lemniskett Date: Thu, 29 Oct 2020 00:10:37 +0700 Subject: [PATCH] Fix accidental "archbox --enter" when non-zero return. --- archboxcommand.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archboxcommand.bash b/archboxcommand.bash index 13fe7ba..af00d00 100755 --- a/archboxcommand.bash +++ b/archboxcommand.bash @@ -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