Commit e2c6c45b authored by Natanael Copa's avatar Natanael Copa
Browse files

setup-interfaces: improve help texts

Tanks to nangel
parent 4f232fd5
......@@ -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: Static ip
n.n.n.n/m (ex: 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.
......@@ -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.
prompt_for_interfaces() {
init_tmpdir TMP
......@@ -345,12 +366,14 @@ prompt_for_interfaces() {
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')" \
case "$iface" in
"done") break;;
'?') iface_help; continue;;
config_bridge $iface || continue;;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment