From 27b76ab0671089c47506615a796a261e993896a7 Mon Sep 17 00:00:00 2001 From: James <> Date: Sun, 17 Mar 2013 12:16:37 +0000 Subject: fish --- .../config/netifd/files/etc/hotplug.d/.svn/entries | 31 +++++++ .../netifd/files/etc/hotplug.d/iface/.svn/entries | 96 ++++++++++++++++++++++ .../iface/.svn/text-base/00-netstate.svn-base | 8 ++ .../iface/.svn/text-base/10-ipv6-static.svn-base | 19 +++++ .../netifd/files/etc/hotplug.d/iface/00-netstate | 8 ++ .../files/etc/hotplug.d/iface/10-ipv6-static | 19 +++++ 6 files changed, 181 insertions(+) create mode 100644 package/network/config/netifd/files/etc/hotplug.d/.svn/entries create mode 100644 package/network/config/netifd/files/etc/hotplug.d/iface/.svn/entries create mode 100644 package/network/config/netifd/files/etc/hotplug.d/iface/.svn/text-base/00-netstate.svn-base create mode 100644 package/network/config/netifd/files/etc/hotplug.d/iface/.svn/text-base/10-ipv6-static.svn-base create mode 100644 package/network/config/netifd/files/etc/hotplug.d/iface/00-netstate create mode 100644 package/network/config/netifd/files/etc/hotplug.d/iface/10-ipv6-static (limited to 'package/network/config/netifd/files/etc/hotplug.d') diff --git a/package/network/config/netifd/files/etc/hotplug.d/.svn/entries b/package/network/config/netifd/files/etc/hotplug.d/.svn/entries new file mode 100644 index 0000000..22338da --- /dev/null +++ b/package/network/config/netifd/files/etc/hotplug.d/.svn/entries @@ -0,0 +1,31 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/package/network/config/netifd/files/etc/hotplug.d +svn://svn.openwrt.org/openwrt + + + +2013-01-29T10:13:39.572932Z +35369 +cyrus + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +iface +dir + diff --git a/package/network/config/netifd/files/etc/hotplug.d/iface/.svn/entries b/package/network/config/netifd/files/etc/hotplug.d/iface/.svn/entries new file mode 100644 index 0000000..5810f6a --- /dev/null +++ b/package/network/config/netifd/files/etc/hotplug.d/iface/.svn/entries @@ -0,0 +1,96 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/package/network/config/netifd/files/etc/hotplug.d/iface +svn://svn.openwrt.org/openwrt + + + +2013-01-29T10:13:39.572932Z +35369 +cyrus + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +00-netstate +file + + + + +2013-03-17T12:13:19.000000Z +07e4cbee0469ae27ace1efa977b04eae +2012-02-03T10:17:30.884717Z +30008 +nbd + + + + + + + + + + + + + + + + + + + + + +337 + +10-ipv6-static +file + + + + +2013-03-17T12:13:19.000000Z +97591c010e5989d4f29cb5bc616f9e73 +2013-01-29T10:13:39.572932Z +35369 +cyrus + + + + + + + + + + + + + + + + + + + + + +487 + diff --git a/package/network/config/netifd/files/etc/hotplug.d/iface/.svn/text-base/00-netstate.svn-base b/package/network/config/netifd/files/etc/hotplug.d/iface/.svn/text-base/00-netstate.svn-base new file mode 100644 index 0000000..c50cda6 --- /dev/null +++ b/package/network/config/netifd/files/etc/hotplug.d/iface/.svn/text-base/00-netstate.svn-base @@ -0,0 +1,8 @@ +[ ifup = "$ACTION" ] && { + uci_toggle_state network "$INTERFACE" up 1 + uci_toggle_state network "$INTERFACE" connect_time $(sed -ne 's![^0-9].*$!!p' /proc/uptime) + [ -n "$DEVICE" ] && { + uci_toggle_state network "$INTERFACE" device "$(uci -q get network.$INTERFACE.ifname)" + uci_toggle_state network "$INTERFACE" ifname "$DEVICE" + } +} diff --git a/package/network/config/netifd/files/etc/hotplug.d/iface/.svn/text-base/10-ipv6-static.svn-base b/package/network/config/netifd/files/etc/hotplug.d/iface/.svn/text-base/10-ipv6-static.svn-base new file mode 100644 index 0000000..d724894 --- /dev/null +++ b/package/network/config/netifd/files/etc/hotplug.d/iface/.svn/text-base/10-ipv6-static.svn-base @@ -0,0 +1,19 @@ +case "$ACTION" in + ifup) + . /lib/functions.sh + + local proto ip6slaac + config_load network + config_get proto "$INTERFACE" proto + config_get_bool ip6slaac "$INTERFACE" ip6slaac + + if [ "$proto" = "static" -a "$ip6slaac" = "1" ]; then + echo 2 > "/proc/sys/net/ipv6/conf/$DEVICE/accept_ra" + + # Though this should be save here, it is not recommended + echo 1 > "/proc/sys/net/ipv6/conf/$DEVICE/disable_ipv6" + echo 0 > "/proc/sys/net/ipv6/conf/$DEVICE/disable_ipv6" + fi + ;; +esac + diff --git a/package/network/config/netifd/files/etc/hotplug.d/iface/00-netstate b/package/network/config/netifd/files/etc/hotplug.d/iface/00-netstate new file mode 100644 index 0000000..c50cda6 --- /dev/null +++ b/package/network/config/netifd/files/etc/hotplug.d/iface/00-netstate @@ -0,0 +1,8 @@ +[ ifup = "$ACTION" ] && { + uci_toggle_state network "$INTERFACE" up 1 + uci_toggle_state network "$INTERFACE" connect_time $(sed -ne 's![^0-9].*$!!p' /proc/uptime) + [ -n "$DEVICE" ] && { + uci_toggle_state network "$INTERFACE" device "$(uci -q get network.$INTERFACE.ifname)" + uci_toggle_state network "$INTERFACE" ifname "$DEVICE" + } +} diff --git a/package/network/config/netifd/files/etc/hotplug.d/iface/10-ipv6-static b/package/network/config/netifd/files/etc/hotplug.d/iface/10-ipv6-static new file mode 100644 index 0000000..d724894 --- /dev/null +++ b/package/network/config/netifd/files/etc/hotplug.d/iface/10-ipv6-static @@ -0,0 +1,19 @@ +case "$ACTION" in + ifup) + . /lib/functions.sh + + local proto ip6slaac + config_load network + config_get proto "$INTERFACE" proto + config_get_bool ip6slaac "$INTERFACE" ip6slaac + + if [ "$proto" = "static" -a "$ip6slaac" = "1" ]; then + echo 2 > "/proc/sys/net/ipv6/conf/$DEVICE/accept_ra" + + # Though this should be save here, it is not recommended + echo 1 > "/proc/sys/net/ipv6/conf/$DEVICE/disable_ipv6" + echo 0 > "/proc/sys/net/ipv6/conf/$DEVICE/disable_ipv6" + fi + ;; +esac + -- cgit v1.2.3