[Fai-commit] r6712 - in trunk/lib: . setup-storage
Michael Tautschnig
mt at alioth.debian.org
Sat Oct 22 12:53:59 UTC 2011
Author: mt
Date: 2011-10-22 12:53:58 +0000 (Sat, 22 Oct 2011)
New Revision: 6712
Modified:
trunk/lib/fai-vol_id
trunk/lib/setup-storage/Fstab.pm
Log:
setup-storage: bugfixes to properly read volume id
* setup-storage/Fstab.pm: call udevsettle before reading volume id to avoid
race condition.
* fai-vol_id: disable use of cache when calling blkid to fix problems when
file systems are changed.
Modified: trunk/lib/fai-vol_id
===================================================================
--- trunk/lib/fai-vol_id 2011-10-22 12:53:02 UTC (rev 6711)
+++ trunk/lib/fai-vol_id 2011-10-22 12:53:58 UTC (rev 6712)
@@ -10,7 +10,7 @@
get_uuid() {
if [ -z $vol_id ] ; then
- $blkid -s UUID -o value $1
+ $blkid -c /dev/null -s UUID -o value $1
exit $?
fi
@@ -21,7 +21,7 @@
get_label() {
if [ -z $vol_id ] ; then
- $blkid -s LABEL -o value $1
+ $blkid -c /dev/null -s LABEL -o value $1
exit $?
fi
Modified: trunk/lib/setup-storage/Fstab.pm
===================================================================
--- trunk/lib/setup-storage/Fstab.pm 2011-10-22 12:53:02 UTC (rev 6711)
+++ trunk/lib/setup-storage/Fstab.pm 2011-10-22 12:53:58 UTC (rev 6712)
@@ -100,6 +100,7 @@
# write the device name as the first entry; if the user prefers uuids
# or labels, use these if available
my @uuid = ();
+ `$FAI::udev_settle`;
&FAI::execute_ro_command(
"fai-vol_id -u $device_name", \@uuid, 0);
@@ -113,6 +114,7 @@
# get the label -- this is likely empty; exit code 3 if no label, but that is
# ok here
my @label = ();
+ `$FAI::udev_settle`;
&FAI::execute_ro_command(
"fai-vol_id -l $device_name", \@label, 0);
More information about the Fai-commit
mailing list