diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2017-07-08 17:52:32 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2017-07-08 17:52:32 -0400 |
commit | b3e5bf9dec22dd447ddb7d466f3e73b6f0f5b533 (patch) | |
tree | a6962d84f569fb98927642eb4709c3f324b7c328 | |
parent | 6c99c19a7663248a85df81f2db24a323d2956606 (diff) |
librechroot: Respect the -n flag (fixes test)
-rwxr-xr-x | src/chroot-tools/librechroot | 6 |
1 files changed, 4 insertions, 2 deletions
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 |