]> TLD Linux GIT Repositories - rc-scripts.git/blob - lib/ifup-ipx
- disable lock checks (happens on LUKS2 and fails during system boot)
[rc-scripts.git] / lib / ifup-ipx
1 #!/bin/sh
2 #
3 #
4 # configures IPX on $1 if appropriate
5
6 . /etc/sysconfig/network
7 . /etc/rc.d/init.d/functions
8 . /lib/rc-scripts/functions.network
9
10 PATH=/sbin:/usr/sbin:/bin:/usr/bin
11
12 if [ "$1" = "" ]; then
13         nls "Usage: %s <device name>" "ifup-ipx" >&2
14         exit 1
15 fi
16
17 if is_no "$IPX"; then
18         exit 0
19 fi
20
21 if [ ! -x /sbin/ipx_interface ] ; then
22         nls "%s is missing. Can't continue." "/sbin/ipx_interface"
23         exit 1
24 fi
25
26 cd /lib/rc-scripts
27
28 CONFIG=$1
29 [ -f "$CONFIG" ] || CONFIG=ifcfg-$CONFIG
30 source_config
31
32 # set all major variables
33 setup_ip_param
34
35 # add ipx for all frame types
36 for frametype in '802.2' '802.2TR' '802.3' 'EtherII' 'SNAP'; do
37         framename=$(echo $frametype | awk ' { gsub(/\./,"_"); print $0 } ')
38         case $(eval echo $(echo \$$(echo IPXACTIVE_$framename))) in
39           yes|true)
40                 case $(eval echo $(echo \$$(echo IPXPRIMARY_$framename))) in
41                   yes|true) primary="-p" ;;
42                   *) primary= ;;
43                 esac
44                 ip link set $DEVICE up
45                 /sbin/ipx_interface add $primary $DEVICE $frametype \
46                         $(eval echo $(echo \$$(echo IPXNETNUM_$framename)))
47                 ;;
48         esac
49 done
50
51 exit 0