summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-10-20 10:03:43 -0200
committerSilvio Rhatto <rhatto@riseup.net>2016-10-20 10:03:43 -0200
commitd50a4c60b03fd05362d309925e334a07e18c7939 (patch)
tree8dec82dbb7be6a121b762414ddecf174bccce39e
parentb5204584540a754b400b9130d1575fb556088f9a (diff)
downloadhydra-d50a4c60b03fd05362d309925e334a07e18c7939.tar.gz
hydra-d50a4c60b03fd05362d309925e334a07e18c7939.tar.bz2
Fix mount-media volume assignment
-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