[Fai-commit] r5774 - in people/wbx/fai-plymouth: bin debian lib

Waldemar Brodkorb wbx-guest at alioth.debian.org
Fri Apr 23 20:40:45 UTC 2010


Author: wbx-guest
Date: 2010-04-23 20:40:45 +0000 (Fri, 23 Apr 2010)
New Revision: 5774

Added:
   people/wbx/fai-plymouth/lib/fai-plymouth-logger
Modified:
   people/wbx/fai-plymouth/bin/fai
   people/wbx/fai-plymouth/debian/fai-client.install
   people/wbx/fai-plymouth/lib/subroutines
Log:
softinst is a long running task, inform any watchers about progress in this step

Modified: people/wbx/fai-plymouth/bin/fai
===================================================================
--- people/wbx/fai-plymouth/bin/fai	2010-04-20 11:38:04 UTC (rev 5773)
+++ people/wbx/fai-plymouth/bin/fai	2010-04-23 20:40:45 UTC (rev 5774)
@@ -108,10 +108,9 @@
     if [ "$faisplash" ];then
    	 if [ -x /sbin/plymouthd ]; then
 	   plymouthd --mode=boot --attach-to-session --pid-file=/tmp/plymouth.pid
+	   while ! pgrep plymouthd;do sleep 1;done
+	   plymouth show-splash
 	 fi
-         if [ -x /bin/plymouth ];then
-	   plymouth show-splash &
-	 fi
     else
     	prcopyleft
     fi
@@ -316,7 +315,7 @@
 [ "$action" ] && export FAI_ACTION=$action
 unset action
 if [ "$faisplash" ];then
-  plymouth message --text "start installation" &
+  plymouth message --text "start fai $FAI_ACTION"
 fi
 task action 2>&1 | tee -a $LOGDIR/fai.log
 

Modified: people/wbx/fai-plymouth/debian/fai-client.install
===================================================================
--- people/wbx/fai-plymouth/debian/fai-client.install	2010-04-20 11:38:04 UTC (rev 5773)
+++ people/wbx/fai-plymouth/debian/fai-client.install	2010-04-23 20:40:45 UTC (rev 5774)
@@ -12,6 +12,7 @@
 usr/lib/fai/fai-divert
 usr/lib/fai/fai-vol_id
 usr/lib/fai/mkramdisk
+usr/lib/fai/fai-plymouth-logger
 usr/bin/device2grub
 usr/bin/fai-class
 usr/bin/fai-debconf

Added: people/wbx/fai-plymouth/lib/fai-plymouth-logger
===================================================================
--- people/wbx/fai-plymouth/lib/fai-plymouth-logger	                        (rev 0)
+++ people/wbx/fai-plymouth/lib/fai-plymouth-logger	2010-04-23 20:40:45 UTC (rev 5774)
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+refresh=1
+logfile=/tmp/fai/software.log
+
+msg=""
+while true;do
+        msglog=$(grep '^Get\|^Setting up\|^Unpacking\|ldconfig' $logfile|grep -v "Packages\|Release"|tail -1)
+	case "$msglog" in
+		ldconfig*)
+			message="finishing.."
+			;;
+		Unpacking*)
+			message=$(echo $msglog|awk '{ print "unpacking " $2 }')
+			;;
+		Get*)
+			message=$(echo $msglog|awk '{ print "downloading " $4 " " $5 }')
+			;;
+		Setting*)
+			message=$(echo $msglog|awk '{ print "setting up " $3 " " $4 }')
+			;;
+	esac
+        if [ "$msg" != "$message" -a -n "$message" ];then
+                plymouth message --text "$HOSTNAME @ softinst: $message"
+        fi
+        msg=$message
+  	sleep $refresh
+done


Property changes on: people/wbx/fai-plymouth/lib/fai-plymouth-logger
___________________________________________________________________
Added: svn:executable
   + *

Modified: people/wbx/fai-plymouth/lib/subroutines
===================================================================
--- people/wbx/fai-plymouth/lib/subroutines	2010-04-20 11:38:04 UTC (rev 5773)
+++ people/wbx/fai-plymouth/lib/subroutines	2010-04-23 20:40:45 UTC (rev 5774)
@@ -151,7 +151,7 @@
     else
 	echo "Calling task_$taskname"
         if [ "$faisplash" ];then
-          plymouth message --text "Calling task: $taskname"
+          plymouth message --text "$HOSTNAME @ $taskname"
         fi
 	sendmon "TASKBEGIN $taskname"
 	task_error=0   # task can set this variable to indicate an error
@@ -451,7 +451,7 @@
     if [ "$faisplash" ];then
       if [ "$flag_reboot" -lt "1" ];then
         plymouth message --text "Installation took $itime minutes. Press <RETURN> to reboot."
-        plymouth ask-question --prompt="Press <RETURN> to reboot." --command=/dev/null
+        plymouth ask-question --command=/dev/null
       else
         plymouth message --text "Installation took $itime minutes. Rebooting now."
       fi
@@ -887,6 +887,9 @@
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 task_instsoft() {
 
+    if [ "$faisplash" ];then
+	fai-plymouth-logger &
+    fi
     echo "Installing software may take a while"
     if [ "$debug" ]; then
 	install_packages | tee -a $LOGDIR/software.log




More information about the Fai-commit mailing list