From d50a4c60b03fd05362d309925e334a07e18c7939 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 20 Oct 2016 10:03:43 -0200 Subject: Fix mount-media volume assignment --- share/hydractl/mount-media | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'share') diff --git a/share/hydractl/mount-media b/share/hydractl/mount-media index 468eb7e..c25eee3 100755 --- a/share/hydractl/mount-media +++ b/share/hydractl/mount-media @@ -28,8 +28,8 @@ if [ -z "$VOLUME" ]; then 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 @@ -41,10 +41,10 @@ fi 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 -- cgit v1.2.3