diff options
-rwxr-xr-x | src/chroot-tools/librechroot | 2 | ||||
-rwxr-xr-x | src/chroot-tools/libremakepkg | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot index 6236480..cd814ee 100755 --- a/src/chroot-tools/librechroot +++ b/src/chroot-tools/librechroot @@ -360,7 +360,7 @@ usage() { dependency conflicts or shared library mismatches. Use this only in extreme circumstances; such as if you need to enable [testing] without synchronizing afterward." \ - "-N" "Disable networking in the chroot" \ + "-N" "Enable networking in the chroot" \ "-w <${mount_msg}>" "Bind mount a file or directory, read/write" \ "-r <${mount_msg}>" "Bind mount a file or directory, read-only" echo diff --git a/src/chroot-tools/libremakepkg b/src/chroot-tools/libremakepkg index e2ccfc6..1206725 100755 --- a/src/chroot-tools/libremakepkg +++ b/src/chroot-tools/libremakepkg @@ -39,8 +39,8 @@ umask 0022 # Global variables: readonly _indent="$(librelib chroot/indent)" -SANE=true # can be changed with the -I flag -NONET=true # can be changed with the -N flag +SANE=true # can be changed with the -I flag +NETWORKING=false # can be changed with the -N flag # {PKG,SRC,SRCPKG,LOG}DEST set at runtime by makepkg.conf # MAKEFLAGS, PACKAGER set at runtime by makepkg.conf # LIBREUSER, LIBREHOME set by conf.sh @@ -128,14 +128,14 @@ build() ( local run_nnet=() if is_in_chroot; then local _run=(sh -c "mount --bind -o ro -- ${startdir@Q} ${startdir@Q} && cd ${startdir@Q} && \$@" --) - run_ynet=(unshare --mount -- "${_run[@]}") - run_nnet=(unshare --mount --net -- "${_run[@]}") + run_ynet=(unshare --mount --net -- "${_run[@]}") + run_nnet=(unshare --mount -- "${_run[@]}") else librechroot_flags+=(-r "$startdir:/startdir") - run_ynet=(librechroot "${librechroot_flags[@]}" run) - run_nnet=(librechroot "${librechroot_flags[@]}" -N run) + run_ynet=(librechroot "${librechroot_flags[@]}" -N run) + run_nnet=(librechroot "${librechroot_flags[@]}" run) fi - $NONET || run_nnet=("${run_ynet[@]}") + ! $NETWORKING || run_nnet=("${run_ynet[@]}") prepare_chroot "$copydir" "$LIBREHOME" "$repack" false # generates 'chrootbuild' @@ -222,7 +222,7 @@ main() { l ) copy=$OPTARG ; ! is_in_chroot || err_chflag "$flag";; w|r) librechroot_flags+=(-$flag "$OPTARG") ; ! is_in_chroot || err_chflag "$flag";; I ) SANE=false;; - N ) NONET=false;; + N ) NETWORKING=true;; R ) repack=true; makepkg_args+=(-R);; S ) srcpkg='';; # srcpkg=$OPTARG;; TODO: not yet implemented h ) usage; exit $EXIT_SUCCESS;; |