Add iptv mac change to networking/red.
authorArne Fitzenreiter <arne_f@ipfire.org>
Tue, 6 Oct 2009 20:15:50 +0000 (22:15 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Tue, 6 Oct 2009 20:15:50 +0000 (22:15 +0200)
src/initscripts/init.d/networking/red

index 5a9077cae52e2064f790be7711433e83f6c80c5e..f0bec1d1a07f0b80b6d1b0ed0a1238e02a764544 100644 (file)
@@ -33,6 +33,7 @@ eval $(/usr/local/bin/readhash /var/ipfire/dns/settings)
 eval $(/usr/local/bin/readhash /var/ipfire/mac/settings)
 
 MAC=$(tr - : <<<$MAC)
+MAC2=$(tr - : <<<$MAC2)
 
 TYPE="${RED_TYPE}"
 DEVICE="${RED_DEV}"
@@ -94,9 +95,8 @@ case "${1}" in
                                                if [ -n "$MAC" ]; then
                                                        boot_mesg "Setting mac address on ${DEVICE} to ${MAC}"  
                                                        ip link set dev ${DEVICE} address ${MAC}
-                                                       evaluate_retval         
+                                                       evaluate_retval
                                                fi
-                                               
                                                ip link set ${DEVICE} up
                                        fi
                                fi
@@ -273,6 +273,11 @@ case "${1}" in
                                        if [ ! -f "$PIDFILE" ]; then
                                                boot_mesg "Createing VLAN Interface ${DEVICE}.${RED_VDSL_IPTV_VLAN} ..."
                                                vconfig add ${DEVICE} ${RED_VDSL_IPTV_VLAN}
+                                               if [ -n "$MAC2" ]; then
+                                                       boot_mesg "Setting mac address on ${DEVICE}.${RED_VDSL_IPTV_VLAN} to ${MAC2}"   
+                                                       ip link set dev ${DEVICE}.${RED_VDSL_IPTV_VLAN} address ${MAC2}
+                                                       evaluate_retval
+                                               fi
                                                boot_mesg -n "Starting dhcpcd on the ${DEVICE}.${RED_VDSL_IPTV_VLAN} interface..."
                                                /sbin/dhcpcd ${DEVICE}.${RED_VDSL_IPTV_VLAN} ${DHCP_START} >/dev/null 2>&1
                                                RET="$?"