Revision 103d261e common.sh.in
b/common.sh.in | ||
---|---|---|
205 | 205 |
|
206 | 206 |
SCRIPT_NAME=$(basename $0) |
207 | 207 |
|
208 |
if [ -f /sbin/blkid -a -x /sbin/blkid ]; then |
|
209 |
VOL_ID="/sbin/blkid -o value -s UUID" |
|
210 |
VOL_TYPE="/sbin/blkid -o value -s TYPE" |
|
211 |
else |
|
212 |
for dir in /lib/udev /sbin; do |
|
213 |
if [ -f $dir/vol_id -a -x $dir/vol_id ]; then |
|
214 |
VOL_ID="$dir/vol_id -u" |
|
215 |
VOL_TYPE="$dir/vol_id -t" |
|
216 |
fi |
|
217 |
done |
|
218 |
fi |
|
219 |
|
|
220 |
if [ -z "$VOL_ID" ]; then |
|
221 |
log_error "vol_id or blkid not found, please install udev or util-linux" |
|
222 |
exit 1 |
|
223 |
fi |
|
224 |
|
|
225 |
|
|
208 | 226 |
if [ -z "$OS_API_VERSION" -o "$OS_API_VERSION" = "5" ]; then |
209 | 227 |
OS_API_VERSION=5 |
210 | 228 |
GETOPT_RESULT=`getopt -o o:n:i:b:s: -n '$0' -- "$@"` |
Also available in: Unified diff