mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 01:11:14 +00:00
dbeb780ba4
We can use /etc/sysctl.d/* for package-supplied sysctl snippets, giving admins the option to use /etc/sysctl.conf to override settings. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
10 lines
236 B
Bash
10 lines
236 B
Bash
#!/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
|