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>
This commit is contained in:
parent
6c7307f133
commit
dbeb780ba4
2 changed files with 2 additions and 2 deletions
|
@ -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 a new issue