diff options
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/pkg-utils.inc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc index bf99a64..25339eb 100644 --- a/etc/inc/pkg-utils.inc +++ b/etc/inc/pkg-utils.inc @@ -1340,7 +1340,11 @@ function stop_packages() { if ($shell) { foreach ($rcfiles as $rcfile => $number) { echo " Stopping {$rcfile}..."; - fwrite($shell, "{$rcfile} stop >>/tmp/bootup_messages 2>&1"); + if (!@fwrite($shell, "{$rcfile} stop >>/tmp/bootup_messages 2>&1")) { + if ($shell) + pclose($shell); + $shell = @popen("/bin/sh", "w"); + } echo "done.\n"; } @@ -1363,4 +1367,4 @@ function get_pkg_interfaces_select_source($include_localhost=false) { } return $ssifs; } -?>
\ No newline at end of file +?> |