mirror of https://github.com/hak5/openwrt.git
base-files: evaluate /etc/sysctl.d/* before /etc/sysctl.conf
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>openwrt-18.06
parent
6c7307f133
commit
dbeb780ba4
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ "$ACTION" = add ]; then
|
||||
for CONF in /etc/sysctl.conf /etc/sysctl.d/*.conf; do
|
||||
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
|
||||
|
|
|
@ -30,7 +30,7 @@ apply_defaults() {
|
|||
|
||||
start() {
|
||||
apply_defaults
|
||||
for CONF in /etc/sysctl.conf /etc/sysctl.d/*.conf; do
|
||||
for CONF in /etc/sysctl.d/*.conf /etc/sysctl.conf; do
|
||||
[ -f "$CONF" ] && sysctl -p "$CONF" -e >&-
|
||||
done
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue