summaryrefslogtreecommitdiffstats
path: root/etc/inc/pkg-utils.inc
diff options
context:
space:
mode:
Diffstat (limited to 'etc/inc/pkg-utils.inc')
-rw-r--r--etc/inc/pkg-utils.inc9
1 files changed, 4 insertions, 5 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc
index 25339eb..9f3296a 100644
--- a/etc/inc/pkg-utils.inc
+++ b/etc/inc/pkg-utils.inc
@@ -1336,9 +1336,9 @@ function stop_packages() {
}
}
- $shell = @popen("/bin/sh", "w");
- if ($shell) {
- foreach ($rcfiles as $rcfile => $number) {
+ foreach ($rcfiles as $rcfile => $number) {
+ $shell = @popen("/bin/sh", "w");
+ if ($shell) {
echo " Stopping {$rcfile}...";
if (!@fwrite($shell, "{$rcfile} stop >>/tmp/bootup_messages 2>&1")) {
if ($shell)
@@ -1346,9 +1346,8 @@ function stop_packages() {
$shell = @popen("/bin/sh", "w");
}
echo "done.\n";
+ pclose($shell);
}
-
- pclose($shell);
}
}
OpenPOWER on IntegriCloud