fi
# Disk and device config
-DISK="`echo ${VOLUME} | sed -e s/[0-9]\$//g`"
-DEVICE="/dev/$DISK"
+DISK="/dev/`echo ${VOLUME} | sed -e s/[0-9]\$//g`"
+DEVICE="/dev/$VOLUME"
# Check if LVM
if $sudo lvdisplay /dev/$MEDIA/root &> /dev/null; then
if [ "$BASENAME" == "mount-media" ]; then
if [ -e "$DEVICE" ]; then
echo "Checking drive health status..."
- $sudo smartctl -H /dev/$DISK
+ $sudo smartctl -H $DISK
echo "Disabling STANDBY on drive..."
- $sudo sdparm --clear STANDBY -6 /dev/$DISK
+ $sudo sdparm --clear STANDBY -6 $DISK
fi
if [ "$LVM" == "yes" ]; then