diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-10-05 01:05:19 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-10-05 01:05:19 +0000 |
commit | 245388b44669c1bd62f73ffa0a66682c7fe884b6 (patch) | |
tree | 2a3c2b6fa7486003c6f5559e7900afd36745fe41 /etc/inc | |
parent | 53dfd34e36061fbd469ef7daabc6e024ba967868 (diff) | |
download | pfsense-245388b44669c1bd62f73ffa0a66682c7fe884b6.zip pfsense-245388b44669c1bd62f73ffa0a66682c7fe884b6.tar.gz |
Run shell or earlyshellcmd even if iit's not an array
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/system.inc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc index 6b3f274..56b1ca0 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -741,10 +741,17 @@ function system_do_shell_commands($early = 0) { $cmdn = "shellcmd"; if (is_array($config['system'][$cmdn])) { - + + /* *cmd is an array, loop through */ foreach ($config['system'][$cmdn] as $cmd) { exec($cmd); } + + } elseif($config['system'][$cmdn] <> "") { + + /* execute single item */ + exec($config['system'][$cmdn]); + } } |