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> --- 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