File pacemaker-tools-improve-crm_master-option-handling.patch of Package pacemaker

commit 22ff50adc859ff25ca041b1411fa098474c79155
Author: Ken Gaillot <kgaillot@redhat.com>
Date:   Wed Jan 3 14:44:14 2018 -0600

    Low: tools: improve crm_master option handling
    
    Implement all documented options, and follow crm_attribute for deprecations.

diff --git a/tools/crm_master b/tools/crm_master
index 340b05ab3..9c7fa8799 100755
--- a/tools/crm_master
+++ b/tools/crm_master
@@ -33,9 +33,14 @@ exit_usage() {
 	exit 1
 }
 
-TEMP=`getopt -o qDGQVN:U:v:i:l:r: --long version,help,resource:,node:,uname:,attr-value:,id:,update:,delete-attr,get-value,attr-id:,lifetime:,quiet \
-     -n 'crm_master' -- "$@"`
+SHORTOPTS_DEPRECATED="U:Q"
+LONGOPTS_DEPRECATED="uname:,get-value,delete-attr,attr-value:,attr-id:"
+SHORTOPTS="VqGv:DN:l:i:r:"
+LONGOPTS="help,version,verbose,quiet,query,update:,delete,node:,lifetime:,id:,resource:"
 
+TEMP=$(getopt -o ${SHORTOPTS}${SHORTOPTS_DEPRECATED} \
+	--long ${LONGOPTS},${LONGOPTS_DEPRECATED} \
+	-n crm_master -- "$@")
 if [ $? -ne 0 ]; then
 	exit_usage
 fi
@@ -44,10 +49,6 @@ eval set -- "$TEMP" # Quotes around $TEMP are essential
 
 while true ; do
 	case "$1" in
-	    -N|--node|-U|--uname) options="$options $1 $2"; shift; shift;;
-	    -v|--attr-value|--update|-i|--id|--attr-id|-l|--lifetime) options="$options $1 $2"; shift; shift;;
-	    -Q|-q|--quiet|-D|--delete-attr|-G|--get-value|-V) options="$options $1"; shift;;
-	    -r|--resource) OCF_RESOURCE_INSTANCE=$2; shift; shift;;
 		--help) 
 			echo "$HELP_TEXT"
 			exit 0
@@ -56,6 +57,29 @@ while true ; do
 			crm_attribute --version
 			exit 0
 			;;
+		--verbose|-V|--quiet|-q|--query|-G|--delete|-D)
+			options="$options $1"
+			shift
+			;;
+		--update|-v|--node|-N|--lifetime|-l|--id|-i)
+			options="$options $1 $2"
+			shift
+			shift
+			;;
+		-r|--resource)
+			OCF_RESOURCE_INSTANCE=$2;
+			shift
+			shift
+			;;
+		--get-value|--delete-attr|-Q) # deprecated
+			options="$options $1"
+			shift
+			;;
+		--uname|-U|--attr-value|--attr-id) # deprecated
+			options="$options $1 $2"
+			shift
+			shift
+			;;
 		--)
 			shift
 			break