From: Lonnie A. <li...@lo...> - 2017-08-29 21:58:21
|
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 |