diff options
author | Ermal <eri@pfsense.org> | 2011-05-17 21:47:20 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2011-05-17 21:47:20 +0000 |
commit | 098820e224964ac8e2a93e8e4cb5ebe866ad258d (patch) | |
tree | 24a44b6ea645398fbe65847c27ef188d81b6478e /etc/inc | |
parent | 67d78c87c95cb45e305bbb07596f99d5b4bc1a13 (diff) | |
download | pfsense-098820e224964ac8e2a93e8e4cb5ebe866ad258d.zip pfsense-098820e224964ac8e2a93e8e4cb5ebe866ad258d.tar.gz |
Ticket #1534. Check if a rc file exists before trying to run it. Also return if we execute a stop command through rc file to be consistent with the start_service function.
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/service-utils.inc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/etc/inc/service-utils.inc b/etc/inc/service-utils.inc index 895eb57..4c09899 100644 --- a/etc/inc/service-utils.inc +++ b/etc/inc/service-utils.inc @@ -122,7 +122,10 @@ function stop_service($name) { if(!empty($service['prefix'])) { $prefix =& $service['prefix']; } - mwexec_bg("{$prefix}{$service['rcfile']} stop"); + if(file_exists("{$prefix}{$service['rcfile']}")) { + mwexec_bg("{$prefix}{$service['rcfile']} stop"); + } + return; } if (!empty($service['stopcmd'])) eval($service['stopcmd']); |