[Fai-commit] r6768 - trunk/lib
Michael Tautschnig
mt at alioth.debian.org
Sun Oct 23 18:36:27 UTC 2011
Author: mt
Date: 2011-10-23 18:36:27 +0000 (Sun, 23 Oct 2011)
New Revision: 6768
Modified:
trunk/lib/fai-vol_id
Log:
fai-vol_id: merged Jan's/Limux changes
I've only merged a subset of the changes as all others should not affect the
behaviour. Most likely the complete patch was only required in earlier versions.
Modified: trunk/lib/fai-vol_id
===================================================================
--- trunk/lib/fai-vol_id 2011-10-23 18:32:58 UTC (rev 6767)
+++ trunk/lib/fai-vol_id 2011-10-23 18:36:27 UTC (rev 6768)
@@ -9,7 +9,7 @@
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
get_uuid() {
- if [ -z $vol_id ] ; then
+ if [ -n "$blkid" ] ; then
$blkid -c /dev/null -s UUID -o value $1
exit $?
fi
@@ -20,7 +20,7 @@
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
get_label() {
- if [ -z $vol_id ] ; then
+ if [ -n "$blkid" ] ; then
$blkid -c /dev/null -s LABEL -o value $1
exit $?
fi
@@ -36,10 +36,11 @@
# main program
-if [ -e $blkid ] ; then
+if [ -x $blkid ] ; then
vol_id=""
else
- if [ ! -e $vol_id ] ; then
+ blkid=""
+ if [ ! -x $vol_id ] ; then
"Neither udev vol_id nor blkid found!"
exit 1
fi
More information about the Fai-commit
mailing list