diff --git a/rgmanager/src/resources/utils/Makefile.am b/rgmanager/src/resources/utils/Makefile.am index 1cd320de9..48b0b6acf 100644 --- a/rgmanager/src/resources/utils/Makefile.am +++ b/rgmanager/src/resources/utils/Makefile.am @@ -1,50 +1,37 @@ # # 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. # MAINTAINERCLEANFILES = Makefile.in -TARGET = config-utils.sh - commonscripts = fs-lib.sh \ httpd-parse-config.pl \ member_util.sh \ messages.sh \ named-parse-config.pl \ ra-skelet.sh \ - tomcat-parse-config.pl + tomcat-parse-config.pl \ + config-utils.sh EXTRA_DIST = $(commonscripts) \ - $(TARGET).in \ rhev-check.sh sbin_SCRIPTS = rhev-check.sh rasutilsdir = ${CLUSTERDATA}/utils -rasutils_SCRIPTS = $(commonscripts) \ - $(TARGET) - - -$(TARGET): $(TARGET).in - cat $^ | sed \ - -e 's#@''CONFDIR@#${CONFDIR}#g' \ - -e 's#@''CONFFILE@#${CONFFILE}#g' \ - > $@ - -clean-local: - rm -f $(TARGET) +rasutils_SCRIPTS = $(commonscripts) diff --git a/rgmanager/src/resources/utils/config-utils.sh.in b/rgmanager/src/resources/utils/config-utils.sh similarity index 99% rename from rgmanager/src/resources/utils/config-utils.sh.in rename to rgmanager/src/resources/utils/config-utils.sh index 299537a64..55e60a645 100644 --- a/rgmanager/src/resources/utils/config-utils.sh.in +++ b/rgmanager/src/resources/utils/config-utils.sh @@ -1,283 +1,283 @@ #!/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 RA_COMMON_pid_dir=/var/run/cluster -declare RA_COMMON_conf_dir=@CONFDIR@ +declare RA_COMMON_conf_dir=/etc/cluster declare -i FAIL=255 declare -a ip_keys generate_configTemplate() { cat > "$1" << EOT # # "$1" was created from the "$2" # # This template configuration was automatically generated, and will be # automatically regenerated if removed. Once this file has been altered, # automatic re-generation will stop. Remember to copy this file to all # other cluster members after making changes, or your service will not # operate correctly. # EOT } generate_configTemplateXML() { cat > "$1" << EOT EOT } sha1_addToFile() { declare sha1line="# rgmanager-sha1 $(sha1sum "$1")" echo $sha1line >> "$1" } sha1_addToFileXML() { declare sha1line="" echo $sha1line >> "$1" } sha1_verify() { declare sha1_new sha1_old declare oldFile=$1 ocf_log debug "Checking: SHA1 checksum of config file $oldFile" sha1_new=`cat "$oldFile" | grep -v "# rgmanager-sha1" | sha1sum | sed 's/^\([a-z0-9]\+\) .*$/\1/'` sha1_old=`tail -n 1 "$oldFile" | sed 's/^\(