summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroot <root@fizz.spline.inf.fu-berlin.de>2011-04-27 22:19:06 +0200
committerroot <root@fizz.spline.inf.fu-berlin.de>2011-04-27 22:19:29 +0200
commitcfc99fee423890d234cda57aa48ebb34ce66ee0e (patch)
tree2137699b5907566f4a14eca7048cc94b651ea19e
parent42eb506683010641b07ed9e60387689657eae9cf (diff)
downloadiscsi-helper-master.tar.gz
iscsi-helper-master.tar.bz2
iscsi-helper-master.zip
addIscsiDisk: fixed awk-script errorHEADmaster
-rwxr-xr-xaddIscsiDisk14
1 files changed, 7 insertions, 7 deletions
diff --git a/addIscsiDisk b/addIscsiDisk
index a0143de..1aee906 100755
--- a/addIscsiDisk
+++ b/addIscsiDisk
@@ -29,13 +29,13 @@ if [ -r /proc/net/iet/volume ]; then
echo "Disk is already configured in ietd. Skipping live update." >&2
else
# get the next avilable tid
- tid=$(awk '$1 ~ /tid:/ { \
- gsub(/tid:/,"",$1); \
- if ( max < $1 ) { \
- max=$1 \
- } \
- } \
- \
+ tid=$(awk '$1 ~ /tid:/ { \
+ gsub(/tid:/,"",$1); \
+ if ( max < int($1) ) { \
+ max=int($1) \
+ } \
+ } \
+ \
END { print max+1 }' /proc/net/iet/volume)
echo -n "Adding disk to running ietd... " >&2