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

Thomas Lange lange at alioth.debian.org
Wed Jan 27 12:26:09 UTC 2010


Author: lange
Date: 2010-01-27 12:26:08 +0000 (Wed, 27 Jan 2010)
New Revision: 5707

Modified:
   trunk/debian/changelog
   trunk/lib/mount2dir
   trunk/lib/subroutines
Log:
mount2dir, subroutines: handle mount errors (closes: #557082)

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2010-01-27 08:57:16 UTC (rev 5706)
+++ trunk/debian/changelog	2010-01-27 12:26:08 UTC (rev 5707)
@@ -16,6 +16,7 @@
     add dependency for build on lenny (closes: #556082)
   * install_packages: aptitude-r now uses MAXPACKAGES, thanks to Stefan
     Goetz for the bug report and the patch (closes: #558139)
+  * mount2dir, subroutines: handle mount errors (closes: #557082)
   
   [ Michael Tautschnig ]
   * setup-storage: Bumped version number to 1.2

Modified: trunk/lib/mount2dir
===================================================================
--- trunk/lib/mount2dir	2010-01-27 08:57:16 UTC (rev 5706)
+++ trunk/lib/mount2dir	2010-01-27 12:26:08 UTC (rev 5707)
@@ -86,7 +86,7 @@
 	    fi
 	    # should we fsck the partition first?
 	    [ "$fscheck" = 1 ] && fsck -nt $fstype $device
-	    mount -t $fstype -o noatime $mopt $device $target$mountpoint
+	    mount -t $fstype -o noatime $mopt $device $target$mountpoint || exit 4
 	    if [ "$mountpoint" = "/" ] ; then
 	      mkdir -p $target/var/lock $target/var/run 2>/dev/null
 	    fi

Modified: trunk/lib/subroutines
===================================================================
--- trunk/lib/subroutines	2010-01-27 08:57:16 UTC (rev 5706)
+++ trunk/lib/subroutines	2010-01-27 12:26:08 UTC (rev 5707)
@@ -397,6 +397,10 @@
 	swapon -p1 $sd && [ "$verbose" ] && echo "Enable swap device $sd"
     done
     mount2dir $FAI_ROOT $LOGDIR/fstab
+    if [ "$?" -eq 1 ]; then
+	sendmon "TASKERROR mountdisks 705"
+	task_error 705
+    fi
 }
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 task_configure() {




More information about the Fai-commit mailing list