From 50161bef0e27ca235d876b888ae5abcafbec2ac7 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Thu, 29 Nov 2007 11:17:50 +0000 Subject: Allow space separated configs to work for CIDR address styles --- conf.d.Linux/net.example | 42 +++++++----------------------------------- 1 file changed, 7 insertions(+), 35 deletions(-) (limited to 'conf.d.Linux/net.example') diff --git a/conf.d.Linux/net.example b/conf.d.Linux/net.example index 74bdbfdc..53e71679 100644 --- a/conf.d.Linux/net.example +++ b/conf.d.Linux/net.example @@ -18,25 +18,6 @@ # read through the rest of this file. -############################################################################## -# VARIABLES -# -# We've changed from using arrays to evaluated strings. -# This has the benefit of being slightly more readable but more importantly it -# works across all shells. -# OLD -# config_eth0=( "192.168.0.24 netmask 255.255.255.0" "192.168.0.25/24" ) -# NEW -# config_eth0="192.168.0.24 netmask 255.255.255.0 -# 192.168.0.25/24" -# INVALID -# config_eth0="192.168.0.24 netmask 255.255.255.0 192.168.0.25/24" -# INVALID -# config_eth0="192.168.0.24 netmask 255.255.255.0 \n 192.168.0.25/24" -# -# Basically if array elements may need spaces in their values then we separate -# on a hard coded new line. - ############################################################################## # MODULES # @@ -83,17 +64,12 @@ #config_eth0="192.168.0.2/24" #config_eth0="192.168.0.2 netmask 255.255.255.0" -# We can also specify a broadcast -#config_eth0="192.168.0.2/24 brd 192.168.0.255" -#config_eth0="192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255" - # If you need more than one address, you can use something like this # NOTE: ifconfig creates an aliased device for each extra IPv4 address # (eth0:1, eth0:2, etc) # iproute2 does not do this as there is no need to -#config_eth0="192.168.0.2/24 -#192.168.0.3/24 -#192.168.0.4/24" +#config_eth0="192.168.0.2/24 192.168.0.3/24 192.168.0.4/24" +# However, that only works with CIDR addresses, so you can't use netmask. # Or you can use sequence expressions #config_eth0="192.168.0.{2..4}/24" # which does the same as above. Be careful though as if you use this and @@ -102,18 +78,14 @@ # You can also use IPv6 addresses # (you should always specify a prefix length with IPv6 here) -#config_eth0="192.168.0.2/24 -#4321:0:1:2:3:4:567:89ab/64 -#4321:0:1:2:3:4:567:89ac/64" -#) +#config_eth0="192.168.0.2/24 4321:0:1:2:3:4:567:89ab/64 4321:0:1:2:3:4:567:89ac/64" # If you wish to keep existing addresses + routing and the interface is up, # you can specify a noop (no operation). If the interface is down or there # are no addresses assigned, then we move onto the next step (default dhcp) # This is useful when configuring your interface with a kernel command line # or similar -#config_eth0="noop -#192.168.0.2/24" +#config_eth0="noop 192.168.0.2/24" # If you don't want ANY address (only useful when calling for advanced stuff) #config_eth0="null" @@ -126,7 +98,7 @@ # If a specified module fails (like dhcp - see below), you can specify a # fallback like so -#fallback_eth0="192.168.0.2 netmask 255.255.255.0" +#fallback_eth0="192.168.0.2/24" #fallback_route_eth0="default via 192.168.0.1" # NOTE: fallback entry must match the entry location in config_eth0 @@ -570,8 +542,8 @@ #vconfig_eth0="set_name_type VLAN_PLUS_VID_NO_PAD" #vconfig_vlan1="set_flag 1 #set_egress_map 2 6" -#config_vlan1="172.16.3.1 netmask 255.255.254.0" -#config_vlan2="172.16.2.1 netmask 255.255.254.0" +#config_vlan1="172.16.3.1/23" +#config_vlan2="172.16.2.1/23" # NOTE: Vlans can be configured with a . in their interface names # When configuring vlans with this name type, you need to replace . with a _ -- cgit v1.2.3