[OpenWrt-Devel] [PATCH] sysctl: read settings from /etc/sysctl.d/*.conf
Jonathan Thibault
jonathan at navigue.com
Wed May 27 09:52:49 EDT 2015
You might want to adjust the hotplug script too.
On 27/05/15 05:23 AM, Stefan Tomanek wrote:
> This changes makes it possible to store custom settings
> in individual files inside the directory /etc/sysctl.d/,
> which take precedence over /etc/sysctl.conf.
>
> Signed-off-by: Stefan Tomanek <stefan.tomanek+openwrt at wertarbyte.de>
> ---
> package/base-files/files/etc/init.d/sysctl | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/package/base-files/files/etc/init.d/sysctl b/package/base-files/files/etc/init.d/sysctl
> index 36e29ea..2dfbaf7 100755
> --- a/package/base-files/files/etc/init.d/sysctl
> +++ b/package/base-files/files/etc/init.d/sysctl
> @@ -3,5 +3,7 @@
>
> START=11
> start() {
> - [ -f /etc/sysctl.conf ] && sysctl -p -e >&-
> + for CONF in /etc/sysctl.conf /etc/sysctl.d/*.conf; do
> + [ -f "$CONF" ] && sysctl -p "$CONF" -e >&-
> + done
> }
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list