summaryrefslogtreecommitdiffstats
path: root/etc/inc/pkg-utils.inc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2013-01-30 15:13:18 -0500
committerjim-p <jimp@pfsense.org>2013-01-30 15:13:18 -0500
commita9488104aa6981056001a941103dfe09fd1cf871 (patch)
treeccf4719c077a8d147a22fbf9ed6e526078f0c82d /etc/inc/pkg-utils.inc
parent3942066cd50bef236ed0cb617e63fcbe46020115 (diff)
downloadpfsense-a9488104aa6981056001a941103dfe09fd1cf871.zip
pfsense-a9488104aa6981056001a941103dfe09fd1cf871.tar.gz
Bring in the RCFILEPREFIX as constant fixes from HEAD, since otherwise rc.stop_packages was globbing in the wrong dir and executing the wrong scripts. Also seems to have fixed the "bad fd" error.
Diffstat (limited to 'etc/inc/pkg-utils.inc')
-rw-r--r--etc/inc/pkg-utils.inc10
1 files changed, 5 insertions, 5 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc
index f8dee3c..b34092e 100644
--- a/etc/inc/pkg-utils.inc
+++ b/etc/inc/pkg-utils.inc
@@ -951,7 +951,7 @@ function delete_package($pkg) {
}
function delete_package_xml($pkg) {
- global $g, $config, $static_output, $pkg_interface, $rcfileprefix;
+ global $g, $config, $static_output, $pkg_interface;
conf_mount_rw();
@@ -1024,7 +1024,7 @@ function delete_package_xml($pkg) {
if($g['booting'] != true)
stop_service($service['name']);
if($service['rcfile']) {
- $prefix = $rcfileprefix;
+ $prefix = RCFILEPREFIX;
if (!empty($service['prefix']))
$prefix = $service['prefix'];
if (file_exists("{$prefix}{$service['rcfile']}"))
@@ -1257,11 +1257,11 @@ function stop_packages() {
require_once("pfsense-utils.inc");
require_once("service-utils.inc");
- global $config, $g, $rcfileprefix;
+ global $config, $g;
log_error("Stopping all packages.");
- $rcfiles = glob("{$rcfileprefix}*.sh");
+ $rcfiles = glob(RCFILEPREFIX . "*.sh");
if (!$rcfiles)
$rcfiles = array();
else {
@@ -1274,7 +1274,7 @@ function stop_packages() {
foreach($config['installedpackages']['package'] as $package) {
echo " Stopping package {$package['name']}...";
stop_service($package['name']);
- unset($rcfiles["{$rcfileprefix}{$package['name']}.sh"]);
+ unset($rcfiles[RCFILEPREFIX . "{$package['name']}.sh"]);
echo "done.\n";
}
}
OpenPOWER on IntegriCloud