diff --git a/src/cmd-build b/src/cmd-build index 6d0db001ed..62a05f451f 100755 --- a/src/cmd-build +++ b/src/cmd-build @@ -228,7 +228,7 @@ lockfile_out=${tmprepo}/tmp/manifest-lock.generated.${basearch}.json prepare_compose_overlays # --cache-only is here since `fetch` is a separate verb. # shellcheck disable=SC2086 -runcompose --cache-only ${FORCE} --add-metadata-from-json "${commitmeta_input_json}" \ +RUNVM_NONET=1 runcompose --cache-only ${FORCE} --add-metadata-from-json "${commitmeta_input_json}" \ --write-composejson-to "${composejson}" \ --ex-write-lockfile-to "${lockfile_out}".tmp \ ${lock_arg} ${version_arg} ${parent_arg} diff --git a/src/cmdlib.sh b/src/cmdlib.sh index fbf78b064b..20b90c5354 100755 --- a/src/cmdlib.sh +++ b/src/cmdlib.sh @@ -469,7 +469,7 @@ workdir=${workdir} # use the builder user's id, otherwise some operations like # chmod will set ownership to root, not builder export USER=$(id -u) - +export RUNVM_NONET=${RUNVM_NONET:-} $(cat "${DIR}"/supermin-init-prelude.sh) rc=0 sh ${TMPDIR}/cmd.sh || rc=\$? diff --git a/src/supermin-init-prelude.sh b/src/supermin-init-prelude.sh index 8f5cd87212..502e97eb29 100644 --- a/src/supermin-init-prelude.sh +++ b/src/supermin-init-prelude.sh @@ -17,7 +17,9 @@ LANG=C /sbin/load_policy -i /sbin/modprobe fuse # set up networking -/usr/sbin/dhclient eth0 +if [ -z "${RUNVM_NONET:-}" ]; then + /usr/sbin/dhclient eth0 +fi # set the umask so that anyone in the group can rwx umask 002