summaryrefslogtreecommitdiff
path: root/share/hydractl/mount-media
diff options
context:
space:
mode:
Diffstat (limited to 'share/hydractl/mount-media')
-rwxr-xr-xshare/hydractl/mount-media8
1 files changed, 4 insertions, 4 deletions
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