summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-02-26 19:26:49 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-02-26 19:26:49 +0000
commit4b4d599637b1aaf72df32de667828e514235dcb1 (patch)
tree91af9244f67f93bf08750cc6b820226294184290 /usr
parente08000ce3983bcc06ec92877eb12034079ff473d (diff)
downloadpfsense-4b4d599637b1aaf72df32de667828e514235dcb1.zip
pfsense-4b4d599637b1aaf72df32de667828e514235dcb1.tar.gz
cat y out to pkg_add to automatically answer any nagging questions
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/pkg_mgr_install.php27
1 files changed, 15 insertions, 12 deletions
diff --git a/usr/local/www/pkg_mgr_install.php b/usr/local/www/pkg_mgr_install.php
index 850c90f..6e095c7 100755
--- a/usr/local/www/pkg_mgr_install.php
+++ b/usr/local/www/pkg_mgr_install.php
@@ -239,10 +239,22 @@ foreach ($packages_to_install as $id) {
update_progress_bar($pb_percent);
$pb_percent += 10;
+ /*
+ * Open a /tmp/y file which will basically tell the
+ * pkg_delete script to delete users and such if it asks.
+ */
+ $fd = fopen("/tmp/y", "w");
+ fwrite($fd, "y\n");
+ fwrite($fd, "y\n");
+ fwrite($fd, "y\n");
+ fwrite($fd, "y\n");
+ fwrite($fd, "y\n");
+ fclose($fd);
+
if ($pkgent['pfsense_package_base_url'] <> "") {
- $text = exec_command_and_return_text("cd /tmp/ && /usr/sbin/pkg_add -r " . $pkgent['pfsense_package_base_url'] . "/" . $pkgent['pfsense_package']);
- update_output_window($text);
fwrite($fd_log, "Executing: cd /tmp/ && /usr/sbin/pkg_add -r " . $pkgent['pfsense_package_base_url'] . "/" . $pkgent['pfsense_package'] . "\n" . $text);
+ $text = exec_command_and_return_text("cd /tmp/ && cat /tmp/y | /usr/sbin/pkg_add -r " . $pkgent['pfsense_package_base_url'] . "/" . $pkgent['pfsense_package']);
+ update_output_window($text);
}
update_progress_bar($pb_percent);
@@ -430,13 +442,4 @@ echo "\n<script language=\"JavaScript\">document.progholder.style.visibility='hi
-?>
-
-
-
-
-
-
-
-
-
+?> \ No newline at end of file
OpenPOWER on IntegriCloud