[arch-projects] [INITSCRIPTS][PATCH 2/4] arch-sysctl: allow passing specific config files
Sébastien Luttringer
seblu at seblu.net
Mon Mar 12 17:54:49 EDT 2012
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 <seblu at seblu.net>
---
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
--
Sebastien "Seblu" Luttringer
More information about the arch-projects
mailing list