summaryrefslogtreecommitdiff
path: root/setup-interfaces.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2022-11-21 16:28:08 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2022-11-21 16:28:08 +0100
commit8f72ede2ebdc98466b40994af52f3b374b8dbece (patch)
tree2cf360eb434c533fb556d4cc1120ab0d11084db3 /setup-interfaces.in
parent73847dbfedb96a83580f0083c4a1959f4c0a1c3d (diff)
downloadalpine-conf-8f72ede2ebdc98466b40994af52f3b374b8dbece.zip
setup-interfaces: use 'none' to leave network unmodified
fixes https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10542
Diffstat (limited to 'setup-interfaces.in')
-rw-r--r--setup-interfaces.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/setup-interfaces.in b/setup-interfaces.in
index 07427a0..3a8a71f 100644
--- a/setup-interfaces.in
+++ b/setup-interfaces.in
@@ -441,6 +441,8 @@ iface_help() {
You will be asked which physical interface(s) to
be used for advanced configurations.
+ Select 'none' to leave configuration unmodified.
+
__EOF__
}
prompt_for_interfaces() {
@@ -458,6 +460,7 @@ prompt_for_interfaces() {
iface=$resp
case "$iface" in
+ "none") exit;;
"done") break;;
'?') iface_help; continue;;
br[0-9]*|bridge[0-9]*|virbr[0-9]*)
@@ -576,6 +579,10 @@ while getopts "abhip:r" opt; do
esac
done
+if [ "$1" = none ]; then
+ exit
+fi
+
mkdir -p $ROOT/etc/network
if [ "$STDINPUT" = "1" ]; then
cat > $ROOT/etc/network/interfaces