MErge en cours x86_64 -> trunk
[hvlinux.git] / stage2 / hv-utilities / media-write
index dfcfb1c..1f83ab9 100755 (executable)
@@ -82,7 +82,7 @@ fi
 
 # Create an empty file of $FILES_SIZE
 dd if=/dev/zero of=${TMP_FILE} bs=1024k count=${FILES_SIZE}
-if [ $? != 0 ]; then
+if [ $? -ne 0 ]; then
     echo "Error while creating empty file..."
     rm -f ${TMP_FILE}
     exit 1
@@ -90,7 +90,7 @@ fi
 
 # Create an extended-2 filesystem on this file
 echo y | /sbin/mke2fs -m 0 -b 2048 ${TMP_FILE}
-if [ $? != 0 ]; then
+if [ $? -ne 0 ]; then
     echo "Error creating file system on empty file..."
     rm -f ${TMP_FILE}
     exit 1
@@ -99,7 +99,7 @@ fi
 # Mount this empty file through the loopback device.
 mkdir -p ${TMP_MOUNT}
 mount -o loop -t ext2 ${TMP_FILE} ${TMP_MOUNT}
-if [ $? != 0 ]; then
+if [ $? -ne 0 ]; then
     echo "Error mounting empty file..."
     rm -f ${TMP_FILE}
     rm -rf $TMP_MOUNT
@@ -112,7 +112,7 @@ rmdir ${TMP_MOUNT}/lost+found
 # Copy files to $TMP_MOUNT and umount it afterwards.
 echo "Copying files..."
 cp -a --parents ${FILES_WRITE_LIST} ${TMP_MOUNT}
-if [ $? != 0 ]; then
+if [ $? -ne 0 ]; then
     echo "Error while copying files..."
     umount ${TMP_MOUNT}
     rm -rf ${TMP_MOUNT}