From: smckown Date: Thu, 5 Jun 2008 22:41:19 +0000 (+0000) Subject: Make the scsi host the esata script attempts to add a variable defined at the X-Git-Url: https://oss.titaniummirror.com/gitweb?a=commitdiff_plain;h=08e1635bc3c29338db749dfe29c2f9b171f8532d;p=ovzbpc.git Make the scsi host the esata script attempts to add a variable defined at the top of the script. --- diff --git a/esata b/esata index 0889d93..2f30b76 100755 --- a/esata +++ b/esata @@ -3,6 +3,7 @@ DEV=/dev/sdb2 MNT=/media/esata DELAY=3 +ESATA_HOST=1 registered() { if [ -b "$DEV" ]; then @@ -27,7 +28,7 @@ mounted() { doregister() { registered && return 0 [ -n "$VERBOSE" ] && echo "register SATA device" - scsiadd -a 1 0 0 0 >/dev/null || return 1 + scsiadd -a $ESATA_HOST 0 0 0 >/dev/null || return 1 sleep $DELAY registered || return 1 [ -n "$VERBOSE" ] && echo "register ok" @@ -47,7 +48,7 @@ domount() { dounregister() { registered || return 0 [ -n "$VERBOSE" ] && echo "unregister SATA device" - scsiadd -r 1 0 0 0 >/dev/null || return 1 + scsiadd -r $ESATA_HOST 0 0 0 >/dev/null || return 1 sleep $DELAY registered && return 1 [ -n "$VERBOSE" ] && echo "unregister ok" @@ -102,7 +103,7 @@ elif [ "$1" = "status" ]; then echo "esata is unregistered" fi #mount | grep "$DEV" - #scsiadd -p | grep "scsi1" + #scsiadd -p | grep "scsi$ESATA_HOST" else echo "usage: $0 [-v] " fi