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}" -a "${macaddr_args}" != "NO" ]; then
55 atm set mac ${phy} ${macaddr_args} || continue
58 # Configure signalling manager
59 eval sigmgr_args=\$atm_sigmgr_${phy}
60 if [ -n "${sigmgr_args}" ]; then
61 atm attach ${phy} ${sigmgr_args} || continue
63 echo "missing signalling manager definition"
67 # Configure UNI NSAP prefix
68 eval prefix_args=\$atm_prefix_${phy}
69 if [ `expr "${sigmgr_args}" : '[uU][nN][iI].*'` -ne 0 ]; then
70 if [ -z "${prefix_args}" ]; then
71 echo "missing NSAP prefix for UNI interface"
74 if [ "${prefix_args}" = "ILMI" ]; then
77 atm set prefix ${phy} ${prefix_args} || continue
81 atm_phy="${atm_phy} ${phy}"
85 echo -n "Starting initial ATM daemons:"
86 # Start ILMI daemon (if needed)
87 if [ ${ilmid} -eq 1 ]; then
97 # Finish up configuration.
98 # N.B. /usr is not mounted.
101 echo -n "Configuring ATM network interfaces:"
106 # Configure network interfaces
107 for phy in ${atm_phy}; do
108 eval netif_args=\$atm_netif_${phy}
113 while [ ${netindx} -lt ${netcnt} ]; do
115 net="${netname}${netindx}"
116 netindx=`expr ${netindx} + 1`
119 # Configure atmarp server
120 eval atmarp_args=\$atm_arpserver_${net}
121 if [ -n "${atmarp_args}" ]; then
122 atm set arpserver ${net} ${atmarp_args} || continue
124 eval scsparp_args=\$atm_scsparp_${net}
125 if [ "X${scsparp_args}" = X"YES" ]; then
126 if [ "${atmarp_args}" != "local" ]; then
127 echo "local arpserver required for SCSP"
130 atm_atmarpd="${atm_atmarpd} ${net}"
138 if [ "X${atm_pvcs}" != "X" ]; then
139 for i in ${atm_pvcs}; do
140 eval pvc_args=\$atm_pvc_${i}
141 atm add pvc ${pvc_args}
145 # Define any permanent ARP entries.
146 if [ "X${atm_arps}" != "X" ]; then
147 for i in ${atm_arps}; do
148 eval arp_args=\$atm_arp_${i}
149 atm add arp ${arp_args}
156 # Start any necessary daemons.
159 # Start SCSP daemon (if needed)
160 if [ ${atm_scspd} -eq 1 ]; then
165 # Start ATMARP daemon (if needed)
166 if [ -n "${atm_atmarpd}" ]; then
168 atmarpd ${atm_atmarpd}