From 299c22ad5c124cb62e1ba35447440947fe4afb37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Luttringer?= Date: Mon, 12 Mar 2012 22:08:57 +0100 Subject: arch-sysctl: allow passing specific config files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modify our path collection loop to accept the remaining argv as paths to config files. This overrides the default lookup for config files in /etc, /lib, and /run so that single config files can be parsed at a time Credits to Dave Reisner in 11ac21c1cf74 Signed-off-by: Sébastien Luttringer --- arch-sysctl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch-sysctl b/arch-sysctl index 4c54217..e27369d 100755 --- a/arch-sysctl +++ b/arch-sysctl @@ -18,7 +18,7 @@ declare -A fragments # files declared later in the sysctl_d array will override earlier # Example: `/etc/sysctl.d/foo.conf' supersedes `/usr/lib/sysctl.d/foo.conf'. -for path in "${sysctl_d[@]}"; do +for path in "${@:-${sysctl_d[@]}}"; do [[ -f $path ]] && fragments[${path##*/}]=$path done -- cgit v1.2.3