summaryrefslogtreecommitdiffstats
path: root/etc/inc/pkg-utils.inc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2013-11-11 16:27:35 -0500
committerjim-p <jimp@pfsense.org>2013-11-11 16:27:35 -0500
commit2ffc7dc3cf1f37403bfc66e0bd4a15424bfa9a51 (patch)
tree2d7fd40eebfa23b5a13657df1c8dc8c2bb46c619 /etc/inc/pkg-utils.inc
parent793299b8f5bdc0fd167093cc5ab9f3f30f0d77ac (diff)
downloadpfsense-2ffc7dc3cf1f37403bfc66e0bd4a15424bfa9a51.zip
pfsense-2ffc7dc3cf1f37403bfc66e0bd4a15424bfa9a51.tar.gz
Rework the usage of the shell i/o during stop_packages(), fixes the "Syntax error: bad fd number" for the remaining people who still saw it on shutdown
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