summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Luttringer <seblu@seblu.net>2012-03-12 22:08:57 +0100
committerSébastien Luttringer <seblu@seblu.net>2012-03-13 12:32:42 +0100
commit299c22ad5c124cb62e1ba35447440947fe4afb37 (patch)
treea5c2836fc41fd6bb95dd664e9fc76aba8fa22e77
parent28db00b0def506223ae55f5a7eef0dc94591fe91 (diff)
arch-sysctl: allow passing specific config files
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@seblu.net>
-rwxr-xr-xarch-sysctl2
1 files changed, 1 insertions, 1 deletions
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