summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorColin Smith <colin@pfsense.org>2005-06-01 06:28:34 +0000
committerColin Smith <colin@pfsense.org>2005-06-01 06:28:34 +0000
commit68c65d25ac38d2cca9324b37f5a9ed350e31a6c0 (patch)
treeea362a152167e5e225b666796f7445e50a1cbeda /etc
parentd47a8a69d667e5ecca828f7421fd296aa67e50cb (diff)
downloadpfsense-68c65d25ac38d2cca9324b37f5a9ed350e31a6c0.zip
pfsense-68c65d25ac38d2cca9324b37f5a9ed350e31a6c0.tar.gz
Minor work on packages. A console interface may require either a Lua rewrite of rc.initial, progress(1), or dialog (to make it pretty, anyway) ;)
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pkg-utils.inc12
1 files changed, 11 insertions, 1 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc
index bee5a38..e031226 100644
--- a/etc/inc/pkg-utils.inc
+++ b/etc/inc/pkg-utils.inc
@@ -322,9 +322,19 @@ function read_body($ch, $string) {
$progbar = 'progress_' . $pkg_interface;
$progbar();
fwrite($fout, $string);
- return $length);
+ return $length;
}
+/*
+function progress_console($downloadProgress) {
+ global $lastseen;
+ $barwidth = 50;
+ $mod = 100 / $barwidth;
+ $char = '*';
+ if(($lastseen <> $downloadProgress) and ($downloadProgress < 101) and (($downloadProgress % $mod) == 0)) {
+ print $char;
+*/
+
function progress_web($downloadProgress) {
global $lastseen, $sendto;
if($lastseen <> $downloadProgress and $downloadProgress < 101) {
OpenPOWER on IntegriCloud