summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormacmpi <spam@ipik.org>2022-03-16 09:41:51 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2022-03-16 09:41:51 +0000
commitc9d7497680ace159181d087b165b5b69bb70f62e (patch)
tree6be62394a3b3efa2bedc2c3c71ef391e80aec257
parentf51bc2f2dca592edff9e1f9e0c2028edb5485af2 (diff)
downloadalpine-conf-c9d7497680ace159181d087b165b5b69bb70f62e.zip
setup-alpine: do not restart networking service when run headless
-rw-r--r--setup-alpine.in5
1 files changed, 3 insertions, 2 deletions
diff --git a/setup-alpine.in b/setup-alpine.in
index ad4ecce..e6a1104 100644
--- a/setup-alpine.in
+++ b/setup-alpine.in
@@ -128,10 +128,11 @@ if [ "$rc_sys" != LXC ]; then
$PREFIX/sbin/setup-hostname ${HOSTNAMEOPTS}
fi
+[ -z "$SSH_CONNECTION" ] && rst_if=1
if [ -n "$INTERFACESOPTS" ]; then
- printf "$INTERFACESOPTS" | $PREFIX/sbin/setup-interfaces -ir
+ printf "$INTERFACESOPTS" | $PREFIX/sbin/setup-interfaces -i ${rst_if:+-r}
else
- $PREFIX/sbin/setup-interfaces ${quick:+-a} -r
+ $PREFIX/sbin/setup-interfaces ${quick:+-a} ${rst_if:+-r}
fi
# setup up dns if no dhcp was configured