}
-TEMP=`getopt -o "H:a:c:hs:t:w:V" --long "help,address:,expect:,critical:,server:,timeout:,warning:,version" -n "$0" -- "$@"`
+TEMP=`getopt -o "H:a:c:hs:t:w:V" --long "help,address:,expect:,critical:,server:,timeout:,warning:,version" -n "$PROGNAME" -- "$@"`
eval set - "$TEMP"
ADDRESS=
WARNING="$2"; shift 2 ;;
-c | --critical )
CRITICAL="$2"; shift 2 ;;
- -- | *)
+ -- )
+ shift
+ break ;;
+ * )
break ;;
esac
done