commit:     6561197731c3a46d849279e7530b831a401b652d
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 16 22:45:51 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Jul 16 22:45:51 2019 +0000
URL:        https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=65611977

initrd.scripts: sdelay(): Show waiting indicator

Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 defaults/initrd.scripts | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
index 4701857..e93a5ad 100644
--- a/defaults/initrd.scripts
+++ b/defaults/initrd.scripts
@@ -1906,8 +1906,14 @@ sdelay() {
        # Sleep a specific number of seconds if SDELAY is set
        if [ -n "${SDELAY}" ]
        then
-               good_msg "Waiting ${SDELAY} seconds ..."
-               sleep ${SDELAY}
+               good_msg_n "Waiting ${SDELAY} seconds ..."
+               while [ ${SDELAY} -gt 0 ]
+               do
+                       let SDELAY=${SDELAY}-1
+                       sleep 1
+                       printf "."
+               done
+               echo
        elif [ "${CDROOT}" = '1' ]
        then
                good_msg 'Hint: Use scandelay[=seconds] if your live medium is 
slow and boot fails'

Reply via email to