Hyphens in the LV name are replaced with double hyphens in /dev/mapper
[invirt/packages/invirt-autoinstaller.git] / files / usr / sbin / sipb-xen-install
index f08b3fe..7d82f06 100644 (file)
@@ -16,7 +16,7 @@ if [ -z "$IP" ]; then
     IP=`host $HOSTNAME.xvm.mit.edu | sed 's/.* //' | head -n 1`
 fi
 
     IP=`host $HOSTNAME.xvm.mit.edu | sed 's/.* //' | head -n 1`
 fi
 
-VOLUME=/dev/mapper/xenvg-d_${HOSTNAME}_hda
+VOLUME=/dev/mapper/xenvg-d_$(echo "$HOSTNAME" | sed -e 's/-/--/g')_hda
 
 # If this script is interrupted, it may not clean up after itself.
 # In particular, it may leave ${VOLUME}1 mounted somewhere in tmp.
 
 # If this script is interrupted, it may not clean up after itself.
 # In particular, it may leave ${VOLUME}1 mounted somewhere in tmp.