diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2014-04-23 14:08:57 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-04-23 14:08:57 +0200 |
commit | c6d3753d970a459168b45006cfdcbb7103f8ecd2 (patch) | |
tree | ecc9ff53152c5c496cc17e8fc4a8180df3c66744 /setup-interfaces.in | |
parent | ace05c780bc48b033754a2a3a6d082324fa316ba (diff) | |
download | alpine-conf-c6d3753d970a459168b45006cfdcbb7103f8ecd2.zip |
setup-interfaces: remove -p option and fix whitespace damage
Diffstat (limited to 'setup-interfaces.in')
-rw-r--r-- | setup-interfaces.in | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/setup-interfaces.in b/setup-interfaces.in index 93ba427..be75e90 100644 --- a/setup-interfaces.in +++ b/setup-interfaces.in @@ -205,7 +205,7 @@ config_iface() { [ "$gateway" = "none" ] && gateway="" [ -z "$gateway" ] && break done - + echo "type=static" >> $conf if [ -n "$bridge_ports" ]; then echo "bridge_ports=$bridge_ports" >> $conf @@ -218,7 +218,7 @@ config_iface() { # print summary echo "Configuration for $iface:" sed 's/^/ /' $conf - + unconfigured_del $iface } @@ -335,15 +335,14 @@ config_vlan() { usage() { cat <<__EOF__ -usage: setup-interfaces [-bhi] [-p ROOT] +usage: setup-interfaces [-bhi] Setup network interfaces options: -b Ask for bridging of interfaces -h Show this help - -i Read new contents of /etc/network/interfaces from stdin - -p Use ROOT as system prefix + -i Read new contents of ${ROOT}etc/network/interfaces from stdin __EOF__ exit 1 } @@ -368,10 +367,10 @@ __EOF__ } prompt_for_interfaces() { init_tmpdir TMP - + cd $TMP unconfigured_detect - + index=1 while ! unconfigured_all_done; do echo "Available interfaces are: $(unconfigured_list)." @@ -379,7 +378,7 @@ prompt_for_interfaces() { ask "Which one do you want to initialize? (or '?' or 'done')" \ $(unconfigured_get_first) iface=$resp - + case "$iface" in "done") break;; '?') iface_help; continue;; @@ -400,11 +399,11 @@ prompt_for_interfaces() { config_iface $iface $(printf "%.3d~" $index) index=$(( $index + 1 )) done - + echo "type=loopback" > 000~lo.conf echo "" > interface hostname=$(cat $ROOT/etc/hostname 2>/dev/null) - + for i in *.conf ; do iface=`basename $i .conf` iface=${iface#[0-9]*~} @@ -449,7 +448,7 @@ prompt_for_interfaces() { esac echo "" >> interfaces done - + while [ "$answer" != "yes" ] && [ "$answer" != "no" ] ; do ask "Do you want to do any manual network configuration?" no case $resp in |