openwrtv4/package/base-files/files/etc/hotplug.d/net/00-sysctl

10 lines
236 B
Text
Raw Normal View History

#!/bin/sh
if [ "$ACTION" = add ]; then
for CONF in /etc/sysctl.d/*.conf /etc/sysctl.conf; do
[ ! -f "$CONF" ] && continue;
sed -ne "/^[[:space:]]*net\..*\.$DEVICENAME\./p" "$CONF" | \
sysctl -e -p - | logger -t sysctl
done
fi