This file is indexed.

/usr/sbin/crm_failcount is in pacemaker-cli-utils 1.1.14-2ubuntu1.3.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/bash

resource=""
options=""
target=`crm_node -n`

TEMP=`getopt -o DGQVN:U:v:i:l:r: --long help,version,resource-id:,node:,uname:,attr-value:,delete-attr,get-value,attr-id:,lifetime:,quiet \
     -n 'crm_failcount' -- "$@"`

if [ $? != 0 ] ; then echo "crm_failcount - A convenience wrapper for crm_attribute"; echo ""; crm_attribute -?; exit 1 ; fi

# Note the quotes around `$TEMP': they are essential!
eval set -- "$TEMP"

function show_help() {
	    echo "crm_failcount - A convenience wrapper for crm_attribute";
	    echo "";
	    echo "Set, update or remove the failcount for the specified resource on the named node";
	    echo "";
	    echo "Usage: crm_failcount -r resource_name command [options]";
	    echo "Options:"
	    echo " --help 		This text"
	    echo " --version 		Version information"
	    echo " -V, --verbose 		Increase debug output"
	    echo " -q, --quiet 		Print only the value on stdout"
	    echo ""
	    echo " -r, --resource-id=value	The resource to update."
	    echo ""
	    echo "Commands:"
	    echo " -G, --query 		Query the current value of the attribute/option"
	    echo " -v, --update=value	Update the value of the attribute/option"
	    echo " -D, --delete 		Delete the attribute/option"
	    echo ""
	    echo "Additional Options:"
	    echo " -N, --node=value	Set an attribute for the named node (instead of the current one)."
	    echo " -l, --lifetime=value	Until when should the setting take affect."
	    echo "	       		Valid values: reboot, forever"
	    echo " -i, --id=value		(Advanced) The ID used to identify the attribute"
}

while true ; do
    case "$1" in
	-N|--node) target="$2"; shift; shift;;
	-U|--uname) target="$2"; shift; shift;;
	-v|--attr-value|-i|--attr-id) options="$options $1 $2"; shift; shift;;
	-Q|--quiet|-D|--delete-attr|-G|--get-value|-V) options="$options $1"; shift;;
	-r|--resource-id) options="$options -n fail-count-$2"; resource="$2"; shift; shift;;
	--version) crm_attribute --version; exit 0;;
	--help)
	    show_help
	    exit 0;;
	--) shift ; break ;;
	*) echo "Unknown option: $1. See --help for details." exit 1;;
    esac
done

if [ "x$resource" = x ]; then
    echo "You must supply a resource name to check. See 'crm_failcount --help' for details"
    exit 1
fi

crm_attribute -N $target $options -t status -d 0