]> git.pld-linux.org Git - packages/cacti-template-snmpdiskio.git/commitdiff
- stop bashism
authorElan Ruusamäe <glen@pld-linux.org>
Sun, 5 Oct 2008 12:55:29 +0000 (12:55 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    bashism.patch -> 1.1

bashism.patch [new file with mode: 0644]

diff --git a/bashism.patch b/bashism.patch
new file mode 100644 (file)
index 0000000..57c595a
--- /dev/null
@@ -0,0 +1,52 @@
+--- snmpdiskio-0.9.4/snmpdiskio~       2006-04-04 16:19:35.000000000 +0300
++++ snmpdiskio-0.9.4/snmpdiskio        2008-10-05 15:54:02.460131923 +0300
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ # $Id$
+ # snmpdiskio v0.9.4 (c) 2006 Mikael Fridh <mikael@meanstreak.se>
+@@ -13,17 +13,17 @@
+ fi
+-function hdNum()
++hdNum()
+ {
+       awk ' BEGIN { num=0 } $1 ~ /[0-9]+/ && $2 ~ /[0-9]+/ { num++ } END { print num } ' $PROCFILE
+ }
+-function hdIndex()
++hdIndex()
+ {
+       awk ' BEGIN { num=0 } $1 ~ /[0-9]+/ && $2 ~ /[0-9]+/ { num++; print num } ' $PROCFILE
+ }
+-function hdDescr()
++hdDescr()
+ {
+       if [ "$MODE" = "linux26" ]; then
+               awk ' $1 ~ /[0-9]+/ && $2 ~ /[0-9]+/ { printf "%s\n", $3 }' $PROCFILE
+@@ -32,19 +32,19 @@
+       fi
+ }
+-function hdInBlocks()
++hdInBlocks()
+ {
+       awk ' $1 ~ /[0-9]+/ && $2 ~ /[0-9]+/ && $10 ~ /[0-9]+/ { printf "%.0f\n", $10 * 512 }
+             $1 ~ /[0-9]+/ && $2 ~ /[0-9]+/ && $10 !~ /[0-9]+/ { printf "%.0f\n", $5 * 512 } ' $PROCFILE
+ }
+-function hdOutBlocks()
++hdOutBlocks()
+ {
+       awk ' $1 ~ /[0-9]+/ && $2 ~ /[0-9]+/ && $8 ~ /[0-9]+/ { printf "%.0f\n", $8 * 512 }
+             $1 ~ /[0-9]+/ && $2 ~ /[0-9]+/ && $8 !~ /[0-9]+/ { printf "%.0f\n", $7 * 512 } ' $PROCFILE
+ }
+-function usage()
++usage()
+ {
+       cat <<-EOUSAGE
+ Usage: $0 <hdNum|hdIndex|hdDescr|hdInBlocks|hdOutBlocks>
This page took 0.029608 seconds and 4 git commands to generate.