summaryrefslogtreecommitdiffstats
path: root/etc/phpshellsessions/installpkg
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-02-26 09:35:00 +0545
committerPhil Davis <phil.davis@inf.org>2015-02-26 09:35:00 +0545
commit1bfcf6f14df50e8b3948b45adf8c9590d1af38ef (patch)
treed2c7adb059b63524a23a49d39280635af2d3c34a /etc/phpshellsessions/installpkg
parent3d16300449b68833a4f37e8675871c0098fe4c5e (diff)
downloadpfsense-1bfcf6f14df50e8b3948b45adf8c9590d1af38ef.zip
pfsense-1bfcf6f14df50e8b3948b45adf8c9590d1af38ef.tar.gz
Code style guide changes for miscellaneous files
under etc
Diffstat (limited to 'etc/phpshellsessions/installpkg')
-rw-r--r--etc/phpshellsessions/installpkg14
1 files changed, 8 insertions, 6 deletions
diff --git a/etc/phpshellsessions/installpkg b/etc/phpshellsessions/installpkg
index 30228ab..07ff879 100644
--- a/etc/phpshellsessions/installpkg
+++ b/etc/phpshellsessions/installpkg
@@ -4,10 +4,11 @@ require_once("pkg-utils.inc");
global $g, $config, $argv, $command_split;
-if(is_array($command_split))
+if (is_array($command_split)) {
$args = array_slice($command_split, 2);
-else
+} else {
$args = array_slice($argv, 3);
+}
$pkg_name = $args[0];
$install_type = empty($args[1]) ? "normal" : $args[1];
@@ -27,13 +28,14 @@ if ($pkg_info) {
$static_output = "";
$pkg_interface = "console";
-if (empty($pkg_info[$pkg_name]))
+if (empty($pkg_info[$pkg_name])) {
echo "\nPackage not found.\n";
-elseif ($install_type == "normal")
+} elseif ($install_type == "normal") {
install_package($pkg_name, $pkg_info[$pkg_name], true);
-elseif ($install_type == "xmlonly")
+} elseif ($install_type == "xmlonly") {
install_package_xml($pkg_name);
-else
+} else {
echo "Invalid install type. Valid values are: normal, xmlonly.\n";
+}
echo "\nDone.\n";
OpenPOWER on IntegriCloud