[Fai-commit] r5123 - in trunk: debian lib

lange at alioth.debian.org lange at alioth.debian.org
Sat Sep 6 17:38:33 UTC 2008


Author: lange
Date: 2008-09-06 17:38:32 +0000 (Sat, 06 Sep 2008)
New Revision: 5123

Modified:
   trunk/debian/changelog
   trunk/lib/subroutines
Log:
check if list of cdrom devices is empty (closes: #498052)

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2008-09-06 17:21:00 UTC (rev 5122)
+++ trunk/debian/changelog	2008-09-06 17:38:32 UTC (rev 5123)
@@ -14,7 +14,8 @@
     otherwise we do not get any errors when the grub call fails ($WHY)
   * subroutines: use proper path to RUNNING_FROM_FAICD to make eject work
     (closes: #439101),
-    do not access /proc/uptime if /proc is not mounted (closes: #496234)
+    do not access /proc/uptime if /proc is not mounted (closes: #496234),
+    check if list of cdrom devices is empty (closes: #498052)
   * fai-client.postrm: use rm -rf, we do so in other maintainer scripts as
     well and /var/run/fai is probably the least critical place
     (closes: #494423)
@@ -50,7 +51,7 @@
   * update the package description (closes: #496113)
   * rules: Don't ignore errors from make clean
   
- -- Thomas Lange <lange at debian.org>  Sat, 06 Sep 2008 10:23:59 +0200
+ -- Thomas Lange <lange at debian.org>  Sat, 06 Sep 2008 19:31:54 +0200
 
 fai (3.2.9) unstable; urgency=low
 

Modified: trunk/lib/subroutines
===================================================================
--- trunk/lib/subroutines	2008-09-06 17:21:00 UTC (rev 5122)
+++ trunk/lib/subroutines	2008-09-06 17:38:32 UTC (rev 5123)
@@ -229,11 +229,14 @@
     # source user specific subroutines
     [ -f $FAI/hooks/subroutines ] && . $FAI/hooks/subroutines
 
+    # warn user if cdrom has DMA not enabled
     if [ -f /etc/RUNNING_FROM_FAICD ]; then
 	local cdrom=$(mount| awk '/dev.+on \/ /{print $1}')
-	hdparm -d $cdrom | grep -q off 2>/dev/null
-	if [ $? -eq 0 ]; then
-	    echo "WARNING: CD-ROM does not use DMA mode. The installation will be sloooow."
+	if [ -n "$cdrom" ]; then
+	    hdparm -d $cdrom | grep -q off 2>/dev/null
+	    if [ $? -eq 0 ]; then
+		echo "WARNING: CD-ROM does not use DMA mode. The installation will be sloooow."
+	    fi
 	fi
     fi
 




More information about the Fai-commit mailing list