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>
#!/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
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
}