Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[PATCH] pan-up: Teach pan-up about --stay
--stay means keep pan-up running until pan_otgtd exits

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
  • Loading branch information
Boaz Harrosh committed Sep 6, 2012
1 parent 1b4b03c commit eb24f81
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion up-pan
Expand Up @@ -12,6 +12,7 @@ set OTGTD=$dir/$OTGTD_NAME
set TARGETNAME=`/pan/bin/getdevinfo -q datasn`
# logfile name
set LOG="/var/log/otgtd.log"
set STAY=""

switch($1)
case "down":
Expand Down Expand Up @@ -40,7 +41,9 @@ case "stat":
breaksw

default:
if ("$1" != "") then
if ("$1" == "--stay") then
set STAY="yes"
elseif ("$1" != "") then
echo "what is $0 $1?!?"
exit
endif
Expand Down Expand Up @@ -76,3 +79,7 @@ $TGTADM --lld iscsi --mode logicalunit \
$TGTADM --lld iscsi --mode target --op show

echo "otgtd started, run up down to stop"

if ("$STAY"="yes") then
wait
endif

0 comments on commit eb24f81

Please sign in to comment.