diff options
author | Chris Buechler <cmb@pfsense.org> | 2011-12-17 15:41:08 -0800 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2011-12-17 15:41:08 -0800 |
commit | 2667202cb7b297ebfb2782cf286c0975b47bb346 (patch) | |
tree | f8d9c504a6dfe9b66ce03aa34150d1ea921305f3 /config | |
parent | f4ef3c8a8d707651138bd08021c2a6104ccfa598 (diff) | |
parent | db26caf726685e44a8a6fc04e55e2006e2fa4ec5 (diff) | |
download | pfsense-packages-2667202cb7b297ebfb2782cf286c0975b47bb346.tar.gz pfsense-packages-2667202cb7b297ebfb2782cf286c0975b47bb346.tar.bz2 pfsense-packages-2667202cb7b297ebfb2782cf286c0975b47bb346.zip |
Merge pull request #142 from mdima/master
Stop the service before changing the configuration.
Diffstat (limited to 'config')
-rw-r--r-- | config/lcdproc-dev/lcdproc.inc | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/config/lcdproc-dev/lcdproc.inc b/config/lcdproc-dev/lcdproc.inc index b82a59e6..5d2d9fb1 100644 --- a/config/lcdproc-dev/lcdproc.inc +++ b/config/lcdproc-dev/lcdproc.inc @@ -169,7 +169,9 @@ global $g; global $config; global $input_errors; - + + /* I just stop the package */ + lcdproc_action('stop'); config_lock(); $lcdproc_config = $config['installedpackages']['lcdproc']['config'][0]; @@ -201,6 +203,7 @@ break; default: lcdproc_warn("The selected com port is not valid!"); + config_unlock(); return; } @@ -481,14 +484,14 @@ EOD; /* generate rc file start and stop */ $stop = <<<EOD -if [ `ps auxw |awk '/LCD[d]/ {print $2}'| wc -l` != 0 ]; then - ps auxw |awk '/LCD[d]/ {print $2}'|xargs kill - sleep 1 -fi if [ `ps auxw |awk '/lcdclient.s[h]/ {print $2}'| wc -l` != 0 ]; then ps auxw |awk '/lcdclient.s[h]/ {print $2}'|xargs kill sleep 1 fi +if [ `ps auxw |awk '/LCD[d]/ {print $2}'| wc -l` != 0 ]; then + ps auxw |awk '/LCD[d]/ {print $2}'|xargs kill + sleep 1 +fi EOD; $start = $stop ."\n"; @@ -507,10 +510,10 @@ EOD; conf_mount_ro(); /* or restart lcdproc if settings were changed */ - if(lcdproc_running($_POST['comport'])) { + if(lcdproc_running()) { lcdproc_notice("Restarting service lcdproc"); lcdproc_action('restart'); - } + } } if((! $lcdproc_config['driver']) || ($lcdproc_config['comport'] == "none")) { |