package/base-files: change sysctl handling Move /etc/init.d/sysctl to index 00 and...
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 25 Mar 2013 18:43:30 +0000 (18:43 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 25 Mar 2013 18:43:30 +0000 (18:43 +0000)
SVN-Revision: 36129

package/base-files/Makefile
package/base-files/files/etc/hotplug.d/net/00-sysctl [new file with mode: 0644]
package/base-files/files/etc/init.d/sysctl

index fcc24e528238e01b3d79d487d206a891d9ecc41c..acd5e2e198347de730522e58fcfbf5a4126e3099 100644 (file)
@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
 include $(INCLUDE_DIR)/version.mk
 
 PKG_NAME:=base-files
-PKG_RELEASE:=136
+PKG_RELEASE:=137
 
 PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
 PKG_BUILD_DEPENDS:=opkg/host
diff --git a/package/base-files/files/etc/hotplug.d/net/00-sysctl b/package/base-files/files/etc/hotplug.d/net/00-sysctl
new file mode 100644 (file)
index 0000000..5d9da8a
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+if [ -f /etc/sysctl.conf ] && [ "$ACTION" = add ]; then
+       sed -ne "/^[[:space:]]*net\..*\.$DEVICENAME\./p" /etc/sysctl.conf | \
+               sysctl -e -p - | logger -t sysctl
+fi
index 2397790555793c1aeecd3890b5800f9ec96ecc0b..beeb79f7e6abaf5ad90d393edcfe4e26e86842bd 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh /etc/rc.common
 # Copyright (C) 2006 OpenWrt.org 
 
-START=99
+START=0
 start() {
        [ -f /etc/sysctl.conf ] && sysctl -p -e >&-
 }