feature #2097: Improve CD management for MVDS

This commit is contained in:
Ruben S. Montero committed 2013-06-14 03:10:37 +02:00
1 parent a6c7394d36
commit a93f7d83aa
1 file changed
+9 -6
+9 -6
View File
@@ -68,18 +68,21 @@ MVSCRIPT=$(cat <<EOF
SRC_DISK_LN=\$($READLINK -f $SRC_DISK)
DST_DISK_LN=\$($READLINK -f $DST_DISK)
if [ \( -L $SRC_DISK \) -a \( "\$SRC_DISK_LN" = "\$DST_DISK_LN" \) ] ; then
if [ \( -L $SRC_DISK \) -a \( "\$SRC_DISK_LN" = "\$DST_DISK_LN" \) ]; then
echo "Not moving files to image repo, they are the same"
elif [ -L "$SRC_PATH.iso" ]; then
echo "Not moving the file it is a CDROM"
else
$VMKFSTOOLS -U $DST_DISK
$VMKFSTOOLS -i $SRC_DISK -d thin $DST_DISK
if [ -d $DST_PATH ]; then
chmod 0770 $DST_PATH
else
chmod 0660 $DST_PATH
fi
fi
if [ -d $DST_PATH ]; then
chmod 0770 $DST_PATH
else
chmod 0660 $DST_PATH
fi
EOF
)