diff options
author | Renato Botelho <renato@netgate.com> | 2015-06-30 12:40:41 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-06-30 12:40:41 -0300 |
commit | 0e715186727e1c9537ecc7833f555b7593ddea44 (patch) | |
tree | b6a04839de36775f8bebe6ca1b6a32f0d64b39c3 /etc | |
parent | f4f884bcb082c1b620ce6b4262f4d89ca06a25f3 (diff) | |
download | pfsense-0e715186727e1c9537ecc7833f555b7593ddea44.zip pfsense-0e715186727e1c9537ecc7833f555b7593ddea44.tar.gz |
Make rc.packages deal with fcgicli call
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/rc.packages | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/etc/rc.packages b/etc/rc.packages index 56091aa..59fb5ca 100755 --- a/etc/rc.packages +++ b/etc/rc.packages @@ -50,14 +50,26 @@ if ($argc == 1) { exit; } -if ($argc != 3) { +$pkg = ''; +$when = ''; + +if (isset($_GET['pkg'])) { + $pkg = $_GET['pkg']; +} else { + $pkg = $argv[1]; +} + +if (isset($_GET['when'])) { + $when = strtolower($_GET['when']); +} else { + $when = strtolower($argv[2]); +} + +if ($pkg == '' || $when == '') { print "Error: invalid parameters\n"; usage(); } -$pkg = $argv[1]; -$when = strtolower($argv[2]); - /* Remove pkg_prefix from pkg name */ pkg_remove_prefix($pkg); |