4 # ATM networking startup script
9 # Initial interface configuration.
10 # N.B. /usr is not mounted.
13 # Locate all probed ATM adapters
14 atmdev=`atm sh stat int | while read dev junk; do
16 hea[0-9] | hea[0-9][0-9])
19 hfa[0-9] | hfa[0-9][0-9])
28 if [ -z "${atmdev}" ]; then
29 echo "No ATM adapters found."
33 # Load microcode into FORE adapters (if needed)
34 if [ `expr "${atmdev}" : '.*hfa.*'` -ne 0 ]; then
38 # Configure physical interfaces
40 for phy in ${atmdev}; do
41 echo -n "Configuring ATM device ${phy}:"
43 # Define network interfaces
44 eval netif_args=\$atm_netif_${phy}
45 if [ -n "${netif_args}" ]; then
46 atm set netif ${phy} ${netif_args} || continue
48 echo "missing network interface definition"
52 # Override physical MAC address
53 eval macaddr_args=\$atm_macaddr_${phy}
54 if [ -n "${macaddr_args}" ]; then
55 case ${macaddr_args} in
59 atm set mac ${phy} ${macaddr_args} || continue
64 # Configure signalling manager
65 eval sigmgr_args=\$atm_sigmgr_${phy}
66 if [ -n "${sigmgr_args}" ]; then
67 atm attach ${phy} ${sigmgr_args} || continue
69 echo "missing signalling manager definition"
73 # Configure UNI NSAP prefix
74 eval prefix_args=\$atm_prefix_${phy}
75 if [ `expr "${sigmgr_args}" : '[uU][nN][iI].*'` -ne 0 ]; then
76 if [ -z "${prefix_args}" ]; then
77 echo "missing NSAP prefix for UNI interface"
81 case ${prefix_args} in
86 atm set prefix ${phy} ${prefix_args} || continue
91 atm_phy="${atm_phy} ${phy}"
95 echo -n "Starting initial ATM daemons:"
96 # Start ILMI daemon (if needed)
109 # Finish up configuration.
110 # N.B. /usr is not mounted.
113 echo -n "Configuring ATM network interfaces:"
118 # Configure network interfaces
119 for phy in ${atm_phy}; do
120 eval netif_args=\$atm_netif_${phy}
125 while [ ${netindx} -lt ${netcnt} ]; do
126 net="${netname}${netindx}"
127 netindx=`expr ${netindx} + 1`
130 # Configure atmarp server
131 eval atmarp_args=\$atm_arpserver_${net}
132 if [ -n "${atmarp_args}" ]; then
133 atm set arpserver ${net} ${atmarp_args} ||
136 eval scsparp_args=\$atm_scsparp_${net}
138 case ${scsparp_args} in
140 case ${atmarp_args} in
144 echo "local arpserver required for SCSP"
149 atm_atmarpd="${atm_atmarpd} ${net}"
157 if [ -n "${atm_pvcs}" ]; then
158 for i in ${atm_pvcs}; do
159 eval pvc_args=\$atm_pvc_${i}
160 atm add pvc ${pvc_args}
164 # Define any permanent ARP entries.
165 if [ -n "${atm_arps}" ]; then
166 for i in ${atm_arps}; do
167 eval arp_args=\$atm_arp_${i}
168 atm add arp ${arp_args}
175 # Start any necessary daemons.
178 # Start SCSP daemon (if needed)
186 # Start ATMARP daemon (if needed)
187 if [ -n "${atm_atmarpd}" ]; then
189 atmarpd ${atm_atmarpd}