diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2019-08-18 14:00:45 +0100 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2019-08-18 14:08:51 +0100 |
commit | a0320d8a758db31c0faa703823e22b93adfe4bb5 (patch) | |
tree | e9b7a356a04822b9adbb8946cd9ad22586279537 /debian/templates | |
parent | c2c7c542ee4b4192ab4b32cd72d587097018a889 (diff) | |
download | kernel_replicant_linux-a0320d8a758db31c0faa703823e22b93adfe4bb5.tar.gz kernel_replicant_linux-a0320d8a758db31c0faa703823e22b93adfe4bb5.tar.bz2 kernel_replicant_linux-a0320d8a758db31c0faa703823e22b93adfe4bb5.zip |
bug script: Check whether /e/n/interfaces exists (Closes: #934824)
We should not assume that /etc/network/interfaces exists, as
ifupdown is not the only way of configuring the network.
* In _add_network_interfaces, if it does not exist, do nothing
* In ask_network, if it does not exist, don't even ask about including
network configuration
Diffstat (limited to 'debian/templates')
-rw-r--r-- | debian/templates/image.bug/include-network | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/debian/templates/image.bug/include-network b/debian/templates/image.bug/include-network index bd12defe6217..cb48ecb7a75c 100644 --- a/debian/templates/image.bug/include-network +++ b/debian/templates/image.bug/include-network @@ -1,4 +1,6 @@ _add_etc_network_interfaces() { + test -f /etc/network/interfaces || return 0 + echo '** Network interface configuration:' >&3 # Hide passwords/keys awk '$1 ~ /key|pass|^wpa-(anonymous|identity|phase|pin|private|psk)/ { gsub(".", "*", $2); } @@ -32,6 +34,8 @@ add_network() { ask_network() { test $same_system = yep || return 0 + test -f /etc/network/interfaces || return 0 + yesno "Include network configuration from this computer? " nop test $REPLY = yep || return 0 |