summaryrefslogtreecommitdiff
path: root/setup-interfaces.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-03-23 11:02:55 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2012-03-23 11:02:55 +0100
commite2c6c45b65f91ce844975b2577f628d747a0416c (patch)
treeb833ee6a18054cd42fc815b749df605edf00b5fe /setup-interfaces.in
parent4f232fd5d4bfb4107109ee79426b5cbe854153e2 (diff)
downloadalpine-conf-e2c6c45b65f91ce844975b2577f628d747a0416c.zip
setup-interfaces: improve help texts
Tanks to nangel
Diffstat (limited to 'setup-interfaces.in')
-rwxr-xr-xsetup-interfaces.in35
1 files changed, 29 insertions, 6 deletions
diff --git a/setup-interfaces.in b/setup-interfaces.in
index bf524b7..a99cc30 100755
--- a/setup-interfaces.in
+++ b/setup-interfaces.in
@@ -79,13 +79,16 @@ get_default_gateway() {
ipaddr_help() {
cat <<__EOF__
-For static ip:
-Enter the ip address in the format x.x.x.x
+Select the ip address for this interface.
-For dhcp:
-Enter 'dhcp'
+dhcp Dynamic/automatic ip via DHCP
+none Do not add any address
+n.n.n.n (ex: 192.168.0.1) Static ip
+n.n.n.n/m (ex: 192.168.0.1/24) Static ip with mask
+br[0-9]+ (ex: br0) Add this interface to a bridge
+bridge[0-9] (ex: bridge0) Add this interface to a bridge
-To add this interface to a bridge enter the bridge name (eg 'br0' or 'bridge0')
+You will be prompted for netmask if not specified with the address.
__EOF__
}
@@ -336,6 +339,24 @@ __EOF__
exit 1
}
+iface_help() {
+ cat <<__EOF__
+
+Select the interface you wish to configure.
+
+For advanced configurations, you can also enter:
+br[0-9]+ (ex: br0) bridge interface
+bridge[0-9]+ (ex: bridge0) bridge interface
+bond[0-9]+ (ex: bond32) bonded interface
+vlan[0-9]+ (ex: vlan371) vlan interface
+eth?.[0-9]+ (ex: eth0.371) vlan interface
+bond?.[0.9]+ (ex: bond0.371) vlan interface
+
+You will be asked which physical interface(s) to
+be used for advanced configurations.
+
+__EOF__
+}
prompt_for_interfaces() {
init_tmpdir TMP
@@ -345,12 +366,14 @@ prompt_for_interfaces() {
index=1
while ! unconfigured_all_done; do
echo "Available interfaces are: $(unconfigured_list)."
- ask "Which one do you want to initialize? (or 'done')" \
+ echo "Enter '?' for help on bridges, bonding and vlans."
+ ask "Which one do you want to initialize? (or '?' or 'done')" \
$(unconfigured_get_first)
iface=$resp
case "$iface" in
"done") break;;
+ '?') iface_help; continue;;
br[0-9]*|bridge[0-9]*|virbr[0-9]*)
config_bridge $iface || continue;;
bond[0-9]*)