diff options
author | iap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk> | 2003-10-17 10:22:54 +0000 |
---|---|---|
committer | iap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk> | 2003-10-17 10:22:54 +0000 |
commit | 51a83ab036e57d360a7681e70eaf30179f51a5dd (patch) | |
tree | 787761d5bbe8c495ca84d81eef6b73397553b45e | |
parent | 88e5f2a76564216ac2818e47deebf7428fba20d9 (diff) | |
download | xen-51a83ab036e57d360a7681e70eaf30179f51a5dd.tar.gz xen-51a83ab036e57d360a7681e70eaf30179f51a5dd.tar.bz2 xen-51a83ab036e57d360a7681e70eaf30179f51a5dd.zip |
bitkeeper revision 1.529 (3f8fc2fe0B2d6C1J6fAamzO9FAybWA)
Add some error checking to xen-clone
-rwxr-xr-x | tools/misc/xen-clone | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/misc/xen-clone b/tools/misc/xen-clone index 07a918113d..06aba1d815 100755 --- a/tools/misc/xen-clone +++ b/tools/misc/xen-clone @@ -60,7 +60,13 @@ cd ${TOP} fi # identify this version of linux -LINUX_VER=`( /bin/ls -ld ${DEST_BK_REP}/xenolinux-sparse || /bin/ls -ld xenolinux-*-sparse ) 2>/dev/null | sed -e 's!^.*xenolinux-\([0-9.]\+\)-sparse!\1!'` +LINUX_VER=`( /bin/ls -ld ${DEST_BK_REP}/xenolinux-sparse || /bin/ls -ld ${DEST_BK_REP}/xenolinux-*-sparse ) 2>/dev/null | sed -e 's!^.*xenolinux-\(.\+\)-sparse!\1!'` + +if [ -z "${LINUX_VER}" ] +then +echo Unable to identify Linux version. Bailing. +exit -1 +fi # copy in the master Linux tree for this kernel if [ ! -d linux-${LINUX_VER} ] |