Skip to content

Commit

Permalink
hg: branch merge
Browse files Browse the repository at this point in the history
--HG--
extra : convert_revision : 66cb5b0c36d55b65ec39802ac8dabefe929cd12e
  • Loading branch information
Alan-R committed Jul 23, 2007
2 parents 47af65b + cb5332f commit f09780e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion heartbeat/MailTo
Expand Up @@ -116,7 +116,7 @@ MailToStop () {
}

MailToStatus () {
ocf_log warn "Don't stat/monitor me! MailTo is a pseudo resource agent, so the status reported may be incorrect"
# ocf_log warn "Don't stat/monitor me! MailTo is a pseudo resource agent, so the status reported may be incorrect"

if ha_pseudo_resource MailTo_${OCF_RESOURCE_INSTANCE} monitor
then
Expand Down
22 changes: 17 additions & 5 deletions heartbeat/apache
Expand Up @@ -102,11 +102,21 @@ action:

apachecat() {
awk '
function procline() {
split($0,a);
if( a[1]=="Include" ) {
procinclude(a[2]);
} else {
if( a[1]=="ServerRoot" ) {
rootdir=a[2];
gsub("\"","",rootdir);
}
print;
}
}
function printfile(infile, a) {
while( (getline<infile) > 0 ) {
split($0,a);
if( a[1]=="Include" ) procinclude(a[2]);
else print;
procline();
}
close(infile);
}
Expand All @@ -125,6 +135,9 @@ apachecat() {
close(cmd);
}
function procinclude(spec) {
if( rootdir!="" && spec!~/^\// ) {
spec=rootdir"/"spec;
}
if( isdir(spec) ) {
allfiles(spec); # read all files in a directory (and subdirs)
} else {
Expand All @@ -134,8 +147,7 @@ apachecat() {
function isdir(s) {
return !system("test -d \""s"\"");
}
$1=="Include" { procinclude($2); next; }
{ print }
{ procline(); }
' $1 |
sed 's/#.*//;s/[[:blank:]]*$//;s/^[[:blank:]]*//' |
grep -v '^$'
Expand Down

0 comments on commit f09780e

Please sign in to comment.