diff options
-rwxr-xr-x | usr.sbin/service/service.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/service/service.sh b/usr.sbin/service/service.sh index 6ba2a8e..5c3807d 100755 --- a/usr.sbin/service/service.sh +++ b/usr.sbin/service/service.sh @@ -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 |