diff options
author | Colin Smith <colin@pfsense.org> | 2005-06-01 06:28:34 +0000 |
---|---|---|
committer | Colin Smith <colin@pfsense.org> | 2005-06-01 06:28:34 +0000 |
commit | 68c65d25ac38d2cca9324b37f5a9ed350e31a6c0 (patch) | |
tree | ea362a152167e5e225b666796f7445e50a1cbeda /etc | |
parent | d47a8a69d667e5ecca828f7421fd296aa67e50cb (diff) | |
download | pfsense-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.inc | 12 |
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) { |