From 245388b44669c1bd62f73ffa0a66682c7fe884b6 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Wed, 5 Oct 2005 01:05:19 +0000 Subject: [PATCH] Run shell or earlyshellcmd even if iit's not an array --- etc/inc/system.inc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/etc/inc/system.inc b/etc/inc/system.inc index 6b3f2747d2..56b1ca055c 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]); + } }