[Fai-commit] r4919 - trunk/lib

lange at alioth.debian.org lange at alioth.debian.org
Tue May 27 13:28:02 UTC 2008


Author: lange
Date: 2008-05-27 13:28:01 +0000 (Tue, 27 May 2008)
New Revision: 4919

Modified:
   trunk/lib/get-boot-info
Log:
parse live.log for detecting boot method


Modified: trunk/lib/get-boot-info
===================================================================
--- trunk/lib/get-boot-info	2008-05-27 13:27:09 UTC (rev 4918)
+++ trunk/lib/get-boot-info	2008-05-27 13:28:01 UTC (rev 4919)
@@ -6,7 +6,7 @@
 # bootinfo -- get boot information via DHCP or BOOTP protocol
 #
 # This script is part of FAI (Fully Automatic Installation)
-# (c) 2003-2006 by Thomas Lange, lange at informatik.uni-koeln.de
+# (c) 2003-2008 by Thomas Lange, lange at informatik.uni-koeln.de
 # Universitaet zu Koeln
 #
 #*********************************************************************
@@ -120,10 +120,17 @@
 
 netdevice_info
 boot=0
-dmesg | grep -q "Sending DHCP requests"  && get_dhcp_info
-dmesg | grep -q "Sending BOOTP requests" && get_bootp_info
-[ $boot -eq 0 -a "$ip" = "dhcp" ] && get_dhcp_info
 
+# when using live-initramfs
+if [ -d /var/log/live.log ]; then
+    grep IP-Config /var/log/live.log | grep -q "DHCP" && get_dhcp_info
+    grep IP-Config /var/log/live.log | grep -q "BOOTP" && get_bootp_info
+else
+    dmesg | grep -q "Sending DHCP requests"  && get_dhcp_info
+    dmesg | grep -q "Sending BOOTP requests" && get_bootp_info
+    [ $boot -eq 0 -a "$ip" = "dhcp" ] && get_dhcp_info
+fi
+
 if [ $boot -eq 0 ]; then
     get_fixed_info
 fi




More information about the Fai-commit mailing list