From b3e5bf9dec22dd447ddb7d466f3e73b6f0f5b533 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 8 Jul 2017 17:52:32 -0400 Subject: librechroot: Respect the -n flag (fixes test) --- src/chroot-tools/librechroot | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/chroot-tools/librechroot') diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot index 01353a4..ff764b6 100755 --- a/src/chroot-tools/librechroot +++ b/src/chroot-tools/librechroot @@ -291,6 +291,9 @@ main() { COPY=$LIBREUSER [[ $COPY != root ]] || COPY=copy + declare -i retconf=0 + load_conf chroot.conf CHROOTDIR CHROOT || retconf=$? + local mode=enter while getopts 'n:l:NC:M:A:w:r:' opt; do case $opt in @@ -372,13 +375,12 @@ main() { :;; esac - if [[ $mode == help ]]; then usage return $EXIT_SUCCESS fi - load_conf chroot.conf CHROOTDIR CHROOT + [[ $retconf = 0 ]] || exit $retconf eval "$(calculate_directories)" readonly LIBREUSER LIBREHOME -- cgit v1.2.2