sysctl service

Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
Jack L. Frost 2017-12-21 18:06:33 +03:00
parent d85b1945e9
commit faae8b8821

View File

@ -2,14 +2,17 @@
unset reload unset reload
service_type='oneshot' service_type='oneshot'
service_command='/usr/bin/sysctl' service_command=( /usr/bin/sysctl -p )
pre_start() { pre_start() {
for i in /etc/sysctl.conf /etc/sysctl.d/* /usr/lib/sysctl.d/*; do for i in /etc/sysctl.conf /etc/sysctl.d/* /usr/lib/sysctl.d/*; do
[[ -f "$i" ]] && { [[ -f "$i" ]] && sysctl_config_files+=( "$i" )
sysctl_config_files+=( "$i" )
}
done done
service_command+=( -p "${sysctl_config_files[@]}" ) [[ "$sysctl_config_files" ]] || {
printf 'No configuration for sysctl found!\n'
return 3
}
service_command+=( "${sysctl_config_files[@]}" )
} }