diff options
author | phildd <ict.advisor@nepal.inf.org> | 2012-08-07 16:10:11 +0545 |
---|---|---|
committer | phildd <ict.advisor@nepal.inf.org> | 2012-08-07 16:10:11 +0545 |
commit | c59667116de9acce8c00551abe2c0f2a48ec2f3a (patch) | |
tree | aee35cb145392021f1147060355f7f5e66275c7f | |
parent | dd9e0bdb550c246133705d1e15c54e365b1bd3b5 (diff) | |
download | pfsense-c59667116de9acce8c00551abe2c0f2a48ec2f3a.zip pfsense-c59667116de9acce8c00551abe2c0f2a48ec2f3a.tar.gz |
Change rcfileprefix to a constant
-rw-r--r-- | etc/inc/pkg-utils.inc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc index d8dbdae..d667c12 100644 --- a/etc/inc/pkg-utils.inc +++ b/etc/inc/pkg-utils.inc @@ -960,7 +960,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(); @@ -1033,7 +1033,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']}")) @@ -1265,11 +1265,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 { @@ -1282,7 +1282,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"; } } |