summaryrefslogtreecommitdiff
path: root/src/chroot-tools/librechroot
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-07-08 17:52:32 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2017-07-08 17:52:32 -0400
commitb3e5bf9dec22dd447ddb7d466f3e73b6f0f5b533 (patch)
treea6962d84f569fb98927642eb4709c3f324b7c328 /src/chroot-tools/librechroot
parent6c99c19a7663248a85df81f2db24a323d2956606 (diff)
librechroot: Respect the -n flag (fixes test)
Diffstat (limited to 'src/chroot-tools/librechroot')
-rwxr-xr-xsrc/chroot-tools/librechroot6
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