From: Michael K. <mic...@ip...> - 2017-08-29 22:34:09
|
Do you really need a spinner? Couldn't you just echo a comment that e2fsk is working and this could take a REAL long time so don't panic? You could then have another comment after e2fsk saying its done! Regards Michael Knill -----Original Message----- From: Lonnie Abelbeck <li...@lo...> Reply-To: AstLinux Developers Mailing List <ast...@li...> Date: Wednesday, 30 August 2017 at 7:58 am To: AstLinux Developers Mailing List <ast...@li...> Subject: Re: [Astlinux-devel] Adding a "spinner" indicator when e2fsck is working On Aug 29, 2017, at 1:42 PM, Michael Keuter <li...@mk...> wrote: >>> >>> Lonnie, don't give up so quickly :-). >>> What you have already is quite a good starting point. >>> What about adding "something needed" to our initrd busybox.config … >>> >>> Michael >> >> The initrd busybox config is not the problem, this is a fundamental problem using shell, though easily solved with bash, but bash is not a practical option with our initrd. >> >> Get exit status of process that's piped to another >> https://unix.stackexchange.com/questions/14270/get-exit-status-of-process-thats-piped-to-another >> >> I dont see an elegant solution. >> >> My only other thought would be to create a background "spinner" process, then call "e2fsck -y $1 >/dev/null" and status="$?" then stop the background spinner process. > > Sounds not so bad, at least worth a test. Here is a working test of a "spinner" function: https://gist.github.com/abelbeck/40c1da054ae6740f03e09ef70452cf70 In our case, instead of the test examples: -- date sleep 2 date sleep 10 -- we would have: -- e2fsck -y $ASTURW >/dev/null status=$? -- Seems to work, the question is whether it is worth adding. Lonnie ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Astlinux-devel mailing list Ast...@li... https://lists.sourceforge.net/lists/listinfo/astlinux-devel |