/usr/share/cluster/utils/messages.sh is in resource-agents 1:3.9.2-5ubuntu4.
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 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 | #!/bin/bash
#
# Copyright (C) 1997-2003 Sistina Software, Inc. All rights reserved.
# Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
declare CLOG_INIT=100
declare CLOG_SUCCEED=200
declare CLOG_SUCCEED_KILL=201
declare CLOG_FAILED=400
declare CLOG_FAILED_TIMEOUT=401
declare CLOG_FAILED_NOT_FOUND=403
declare CLOG_FAILED_INVALID=404
declare CLOG_FAILED_NOT_READABLE=405
declare CLOG_FAILED_KILL=406
##
## Usage:
## clog_service_start %operation%
##
clog_service_start()
{
case $1 in
$CLOG_INIT)
ocf_log info "Starting Service $OCF_RESOURCE_INSTANCE"
;;
$CLOG_SUCCEED)
ocf_log debug "Starting Service $OCF_RESOURCE_INSTANCE > Succeed"
;;
$CLOG_FAILED)
ocf_log error "Starting Service $OCF_RESOURCE_INSTANCE > Failed"
;;
$CLOG_FAILED_TIMEOUT)
ocf_log error "Starting Service $OCF_RESOURCE_INSTANCE > Failed - Timeout Error"
;;
esac
return 0
}
##
## Usage:
## clog_service_stop %operation%
##
clog_service_stop()
{
case $1 in
$CLOG_INIT)
ocf_log info "Stopping Service $OCF_RESOURCE_INSTANCE"
;;
$CLOG_SUCCEED)
ocf_log info "Stopping Service $OCF_RESOURCE_INSTANCE > Succeed"
;;
$CLOG_SUCCEED_KILL)
ocf_log info "Killing Service $OCF_RESOURCE_INSTANCE > Succeed"
;;
$CLOG_FAILED)
ocf_log error "Stopping Service $OCF_RESOURCE_INSTANCE > Failed"
;;
$CLOG_FAILED_NOT_STOPPED)
ocf_log error "Stopping Service $OCF_RESOURCE_INSTANCE > Failed - Application Is Still Running"
;;
$CLOG_FAILED_KILL)
ocf_log error "Killing Service $OCF_RESOURCE_INSTANCE > Failed"
;;
esac
return 0
}
##
## Usage:
## clog_service_status %operation%
##
clog_service_status()
{
case $1 in
$CLOG_INIT)
ocf_log debug "Monitoring Service $OCF_RESOURCE_INSTANCE"
;;
$CLOG_SUCCEED)
ocf_log debug "Monitoring Service $OCF_RESOURCE_INSTANCE > Service Is Running"
;;
$CLOG_FAILED)
ocf_log error "Monitoring Service $OCF_RESOURCE_INSTANCE > Service Is Not Running"
;;
$CLOG_FAILED_NOT_FOUND)
ocf_log error "Monitoring Service $OCF_RESOURCE_INSTANCE > Service Is Not Running - PID File Not Found"
;;
esac
return 0
}
##
## Usage:
## clog_service_verify %operation%
## clog_service_verify $CLOG_FAILED %reason%
##
clog_service_verify()
{
case $1 in
$CLOG_INIT)
ocf_log debug "Verifying Configuration Of $OCF_RESOURCE_INSTANCE"
;;
$CLOG_SUCCEED)
ocf_log debug "Verifying Configuration Of $OCF_RESOURCE_INSTANCE > Succeed"
;;
$CLOG_FAILED_NOT_CHILD)
ocf_log error "Service $OCF_RESOURCE_INSTANCE Is Not A Child Of A Service"
;;
$CLOG_FAILED)
if [ "x$2" = "x" ]; then
ocf_log error "Verifying Configuration Of $OCF_RESOURCE_INSTANCE > Failed"
else
ocf_log error "Verifying Configuration Of $OCF_RESOURCE_INSTANCE > Failed - $2"
fi
;;
esac
return 0
}
##
## Usage:
## clog_check_sha1 %operation% %filename%
##
clog_check_sha1()
{
case $1 in
$CLOG_INIT)
ocf_log debug "Checking SHA1 Checksum Of File $1"
;;
$CLOG_SUCCEED)
ocf_log debug "Checking SHA1 Checksum Of File > Succeed"
;;
$CLOG_FAILED)
ocf_log debug "Checking SHA1 Checksum Of File > Failed - File Changed"
;;
esac
return 0;
}
##
## Usage:
## clog_check_file_exist %operation% %filename%
##
clog_check_file_exist()
{
case $1 in
$CLOG_INIT)
ocf_log debug "Checking Existence Of File $2"
;;
$CLOG_SUCCEED)
ocf_log debug "Checking Existence Of File $2 > Succeed"
;;
$CLOG_FAILED)
ocf_log error "Checking Existence Of File $2 [$OCF_RESOURCE_INSTANCE] > Failed"
;;
$CLOG_FAILED_INVALID)
ocf_log error "Checking Existence Of File $2 [$OCF_RESOURCE_INSTANCE] > Failed - Invalid Argument"
;;
$CLOG_FAILED_NOT_FOUND)
ocf_log error "Checking Existence Of File $2 [$OCF_RESOURCE_INSTANCE] > Failed - File Doesn't Exist"
;;
$CLOG_FAILED_NOT_READABLE)
ocf_log error "Checking Existence Of File $2 [$OCF_RESOURCE_INSTANCE] > Failed - File Is Not Readable"
;;
esac
return 0;
}
##
## Usage:
## clog_check_pid %operation% %filename%
##
clog_check_pid()
{
case $1 in
$CLOG_INIT)
ocf_log debug "Checking Non-Existence Of PID File $2"
return 0
;;
$CLOG_SUCCEED)
ocf_log debug "Checking Non-Existence of PID File $2 > Succeed"
;;
$CLOG_FAILED)
ocf_log error "Checking Non-Existence of PID File $2 [$OCF_RESOURCE_INSTANCE] > Failed - PID File Exists For $OCF_RESOURCE_INSTANCE"
;;
esac
return 0;
}
##
## Usage:
## clog_check_syntax %operation% %filename%
##
clog_check_syntax()
{
case $1 in
$CLOG_INIT)
ocf_log debug "Checking Syntax Of The File $2"
;;
$CLOG_SUCCEED)
ocf_log debug "Checking Syntax Of The File $2 > Succeed"
;;
$CLOG_FAILED)
ocf_log error "Checking Syntax Of The File $2 [$OCF_RESOURCE_INSTANCE] > Failed"
;;
esac
return 0;
}
##
## Usage:
## clog_generate_config %operation% %old filename% %new filename%
##
clog_generate_config()
{
case $1 in
$CLOG_INIT)
ocf_log debug "Generating New Config File $3 From $2"
;;
$CLOG_SUCCEED)
ocf_log debug "Generating New Config File $3 From $2 > Succeed"
;;
$CLOG_FAILED)
ocf_log error "Generating New Config File $3 From $2 [$OCF_RESOURCE_INSTANCE] > Failed"
;;
esac
return 0;
}
##
## Usage:
## clog_looking_for %operation% %resource%
## clog_looking_for %operation% "IP Addresses"
## clog_looking_for %operation% "Filesystems"
##
clog_looking_for()
{
case $1 in
$CLOG_INIT)
ocf_log debug "Looking For $2"
;;
$CLOG_SUCCEED)
ocf_log debug "Looking For $2 > Succeed - $3 $2 Found"
;;
$CLOG_FAILED)
ocf_log error "Looking For $2 [$OCF_RESOURCE_INSTANCE] > Failed"
;;
$CLOG_FAILED_NOT_FOUND)
ocf_log error "Looking For $2 [$OCF_RESOURCE_INSTANCE] > Failed - No $2 Found"
;;
esac
return 0;
}
|