|
From: <abe...@us...> - 2017-05-09 00:57:46
|
Revision: 8290
http://sourceforge.net/p/astlinux/code/8290
Author: abelbeck
Date: 2017-05-09 00:57:44 +0000 (Tue, 09 May 2017)
Log Message:
-----------
wide-dhcpv6, add optional script '/mnt/kd/dhcp6c.script' if exists and executable and add support in core network init.d
Modified Paths:
--------------
branches/1.0/package/wide-dhcpv6/wide-dhcpv6.mk
branches/1.0/project/astlinux/target_skeleton/etc/init.d/network
Added Paths:
-----------
branches/1.0/package/wide-dhcpv6/dhcp6c.script
Added: branches/1.0/package/wide-dhcpv6/dhcp6c.script
===================================================================
--- branches/1.0/package/wide-dhcpv6/dhcp6c.script (rev 0)
+++ branches/1.0/package/wide-dhcpv6/dhcp6c.script 2017-05-09 00:57:44 UTC (rev 8290)
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+export PATH="/usr/bin:/bin:/usr/sbin:/sbin"
+
+SCRIPTFILE="/mnt/kd/dhcp6c.script"
+
+if [ -x $SCRIPTFILE ]; then
+ $SCRIPTFILE >/dev/null 2>&1 &
+fi
+
+exit 0
Modified: branches/1.0/package/wide-dhcpv6/wide-dhcpv6.mk
===================================================================
--- branches/1.0/package/wide-dhcpv6/wide-dhcpv6.mk 2017-05-07 21:31:33 UTC (rev 8289)
+++ branches/1.0/package/wide-dhcpv6/wide-dhcpv6.mk 2017-05-09 00:57:44 UTC (rev 8290)
@@ -18,6 +18,7 @@
define WIDE_DHCPV6_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 $(@D)/dhcp6c $(TARGET_DIR)/usr/sbin/
+ $(INSTALL) -D -m 0755 package/wide-dhcpv6/dhcp6c.script $(TARGET_DIR)/etc/dhcp6c.script
ln -sf /tmp/etc/wide-dhcpv6 $(TARGET_DIR)/etc/wide-dhcpv6
endef
@@ -25,6 +26,7 @@
define WIDE_DHCPV6_UNINSTALL_TARGET_CMDS
rm -f $(TARGET_DIR)/usr/sbin/dhcp6c
+ rm -f $(TARGET_DIR)/etc/dhcp6c.script
rm -f $(TARGET_DIR)/etc/wide-dhcpv6
endef
Modified: branches/1.0/project/astlinux/target_skeleton/etc/init.d/network
===================================================================
--- branches/1.0/project/astlinux/target_skeleton/etc/init.d/network 2017-05-07 21:31:33 UTC (rev 8289)
+++ branches/1.0/project/astlinux/target_skeleton/etc/init.d/network 2017-05-09 00:57:44 UTC (rev 8290)
@@ -62,6 +62,7 @@
interface $interface {
send ia-na 1;
send rapid-commit;
+ script \"/etc/dhcp6c.script\";
};
id-assoc na 1 { };"
@@ -88,6 +89,7 @@
echo " send ia-pd 1;"
fi
echo " send rapid-commit;"
+ echo " script \"/etc/dhcp6c.script\";"
echo "};"
if [ "$DHCPV6_CLIENT_REQUEST_ADDRESS" != "no" ]; then
@@ -494,6 +496,14 @@
ip link set dev $INT4IF up
fi
+ if [ -n "$DMZIF" -a -n "$DMZIP" -a -n "$DMZNM" -a "$DMZIF" != "none" ]; then
+ ip addr add $DMZIP/$DMZNM brd + dev $DMZIF
+ if [ "$IPV6" = "yes" -a -n "$DMZIPV6" ]; then
+ ip -6 addr add $DMZIPV6 dev $DMZIF
+ fi
+ ip link set dev $DMZIF up
+ fi
+
if [ -n "$WANDELAY" ]; then
echo "Sleeping for $WANDELAY seconds before I bring up $EXTIF..."
sleep $WANDELAY
@@ -711,15 +721,6 @@
fi
fi
- ##DMZ Network
- if [ -n "$DMZIF" -a -n "$DMZIP" -a -n "$DMZNM" -a "$DMZIF" != "none" ]; then
- ip addr add $DMZIP/$DMZNM brd + dev $DMZIF
- if [ "$IPV6" = "yes" -a -n "$DMZIPV6" ]; then
- ip -6 addr add $DMZIPV6 dev $DMZIF
- fi
- ip link set dev $DMZIF up
- fi
-
##IPv6 Tunnel
if [ "$IPV6" = "yes" -a -n "$IPV6_TUNNEL" ]; then
ipv6_tunnel start
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|