torios-dev team mailing list archive
-
torios-dev team
-
Mailing list archive
-
Message #00408
progress indicator
Hi Israel.
I will reply to your recent mails separately.
It seems that you are determined to release ToriOS with a zenity version
of the OBI-installer. Be prepared to do *a lot* of debugging before it
will be as reliable as the dialog version.
1. I think you should have real progress indication during the expansion
of the tarball, so I will show how I converted the progress indication
in mkusb:
I added the option -n to pv and used its output in zenity.
I also modified this output to wait for syncing (flushing the buffers).
This is done in the function 'do_n_show' (in the mkusb shell-script
file). You are welcome to borrow that function :-)
2. I also have a crude stepwise indication when making persistent live
drives. It is integrated in the function 'grub_n_iso'
# general grub_n_iso progress window
( tail -f "$tailfile" |zenity --progress --title="$version - preparing
persistent live drive ..." \
--percentage=0 --auto-close --no-cancel \
--window-icon="/usr/share/icons/hicolor/48x48/apps/mkusb.png" 2>>
"/dev/null") & pid=$!
echo "# Start grub_n_iso" > "$tailfile"
...
echo "05
# Checking help files" >> "$tailfile"
...
echo "10
# unmount, swapoff and wipe GPT traces and the first megabyte" >>
"$tailfile"
...
I think this might be better than the short-lived zenity windows that
you use now to indicate the progress. But you should clean up
afterwards. I do that with the function 'clear_grn' in mkusb.
This crude stepwise indication is less important. Maybe you can even
skip those short-lived zenity windows that you use now to indicate the
progress. I think they only irritate the user. Write that information to
the log file instead. Keep only the windows, where the user should make
a decision (for example 'install a pae kernel or not').
Best regards
Nio
Follow ups