# Add timeout on usplash startup script if [ -e $DESTDIR/scripts/init-top/usplash -o -e $DESTDIR/scripts/init-top/plymouth -o -e $DESTDIR/scripts/init-premount/plymouth -o -e $DESTDIR/scripts/init-top/00_splashy ]; then _echo " * Applying usplash timeout patch" cat << EOF > $DESTDIR/scripts/init-top/00_nosplash #!/bin/sh # new header not using prereqs if [ "\$1" = "prereqs" ]; then echo "" exit 0 fi . /scripts/functions . /conf/tcos.conf . /conf/tcos-run-functions # kill usplash if cmdline have "nousplash" or "nosplash" for x in \$(cat /proc/cmdline); do case \$x in nosplash) KILL_SPLASH=true ;; nousplash) KILL_SPLASH=true ;; esac done if [ "\$KILL_SPLASH" = "true" ] ; then echo -e "#!/bin/sh\nexit 0" > /scripts/init-top/framebuffer [ -e /scripts/init-premount/framebuffer ] && echo -e "#!/bin/sh\nexit 0" > /scripts/init-premount/framebuffer [ -e /scripts/init-top/usplash ] && echo -e "#!/bin/sh\nexit 0" > /scripts/init-top/usplash [ -e /scripts/init-top/plymouth ] && echo -e "#!/bin/sh\nexit 0" > /scripts/init-top/plymouth [ -e /scripts/init-premount/plymouth ] && echo -e "#!/bin/sh\nexit 0" > /scripts/init-premount/plymouth [ -e /scripts/init-top/00_splashy ] && echo -e "#!/bin/sh\nexit 0" > /scripts/init-top/00_splashy kill_splash fi EOF chmod +x $DESTDIR/scripts/init-top/00_nosplash cat << EOF >> $DESTDIR/scripts/init-top/usplash # new header not using prereqs if [ "\$1" = "prereqs" ]; then echo "" exit 0 fi quiet=n if [ "\$SPLASH" = "true" ]; then if [ -x /bin/plymouth ] && /bin/plymouth --ping; then plymouth message --text="TEXT Preparing to boot TCOS..." elif [ -x /sbin/usplash_write ]; then usplash_write "TEXT Preparing to boot TCOS..." usplash_write "TIMEOUT 180" usplash_write "SUCCESS ok" fi fi EOF else _verbose "(95usplash_timeout) Splash not found, timeout path not applied." fi # add fancy startup messages cat << EOF >> $DESTDIR/scripts/functions log_use_fancy_output () { TPUT=/bin/tput EXPR=/bin/expr if [ "x\$TERM" != "xdumb" ] && [ -x \$TPUT ] && [ -x \$EXPR ] && \$TPUT hpa 60 >/dev/null 2>&1 && \$TPUT setaf 1 >/dev/null 2>&1; then [ -z \$FANCYTTY ] && FANCYTTY=1 || true else FANCYTTY=0 fi case "\$FANCYTTY" in 1|Y|yes|true) true;; *) false;; esac } FANCYTTY= [ -e /etc/lsb-base-logging.sh ] && . /etc/lsb-base-logging.sh || true EOF [ -e /etc/lsb-base-logging.sh ] && cpifexists /etc/lsb-base-logging.sh /etc cpifexists /usr/bin/tput /bin cpifexists /usr/bin/expr /bin