sysctl service
Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
parent
d85b1945e9
commit
faae8b8821
|
@ -2,14 +2,17 @@
|
|||
unset reload
|
||||
|
||||
service_type='oneshot'
|
||||
service_command='/usr/bin/sysctl'
|
||||
service_command=( /usr/bin/sysctl -p )
|
||||
|
||||
pre_start() {
|
||||
for i in /etc/sysctl.conf /etc/sysctl.d/* /usr/lib/sysctl.d/*; do
|
||||
[[ -f "$i" ]] && {
|
||||
sysctl_config_files+=( "$i" )
|
||||
}
|
||||
[[ -f "$i" ]] && sysctl_config_files+=( "$i" )
|
||||
done
|
||||
|
||||
service_command+=( -p "${sysctl_config_files[@]}" )
|
||||
[[ "$sysctl_config_files" ]] || {
|
||||
printf 'No configuration for sysctl found!\n'
|
||||
return 3
|
||||
}
|
||||
|
||||
service_command+=( "${sysctl_config_files[@]}" )
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user