Add an additional check to service(8) -e incase rcvar is blank
Approved by: bapt (mentor) X-MFC-With: 287576 Differential Revision: https://reviews.freebsd.org/D3604
This commit is contained in:
parent
4c79e0d6c1
commit
1289db4899
@ -71,7 +71,9 @@ if [ -n "$RESTART" ]; then
|
||||
if grep -q ^rcvar $file; then
|
||||
eval `grep ^name= $file`
|
||||
eval `grep ^rcvar $file`
|
||||
load_rc_config_var ${name} ${rcvar}
|
||||
if [ -n "$rcvar" ]; then
|
||||
load_rc_config_var ${name} ${rcvar}
|
||||
fi
|
||||
checkyesno $rcvar 2>/dev/null && run_rc_script ${file} stop
|
||||
fi
|
||||
done
|
||||
@ -101,7 +103,9 @@ if [ -n "$ENABLED" ]; then
|
||||
if grep -q ^rcvar $file; then
|
||||
eval `grep ^name= $file`
|
||||
eval `grep ^rcvar $file`
|
||||
load_rc_config_var ${name} ${rcvar}
|
||||
if [ -n "$rcvar" ]; then
|
||||
load_rc_config_var ${name} ${rcvar}
|
||||
fi
|
||||
checkyesno $rcvar 2>/dev/null && echo $file
|
||||
fi
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user