diff --git a/cts/LSBDummy.in b/cts/LSBDummy.in index 41cbdb8970..eb2978bc92 100644 --- a/cts/LSBDummy.in +++ b/cts/LSBDummy.in @@ -1,102 +1,85 @@ #!/bin/sh # # # Dummy LSB RA. Does nothing but touch and remove a state file # -# Copyright 2006-2018 the Pacemaker project contributors +# Copyright 2006-2021 the Pacemaker project contributors # # The version control history for this file may have further details. # -# This program is free software; you can redistribute it and/or modify -# it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it would be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# -# Further, this software is distributed without any warranty that it is -# free of the rightful claim of any third person regarding infringement -# or the like. Any license provided herein, whether implied or -# otherwise, applies only to this software file. Patent licenses, if -# any, provided herein do not apply to combinations of this program with -# other software, or any other product whatsoever. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. -# +# This source code is licensed under the GNU General Public License version 2 +# (GPLv2) WITHOUT ANY WARRANTY. ####################################################################### # Initialization: desc="Dummy LSB service" . @OCF_ROOT_DIR@/resource.d/heartbeat/.ocf-directories : ${HA_VARRUN=/tmp} # Backup in case .ocf-directories doesn't exist ####################################################################### success() { printf "[ OK ]\r" } failure() { printf "[FAILED]\r" } dummy_usage() { cat < * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This software 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 Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * This source code is licensed under the GNU Lesser General Public License + * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY. */ - void throttle_init(void); void throttle_fini(void); void throttle_set_load_target(float target); void throttle_update(xmlNode *xml); void throttle_update_job_max(const char *preference); int throttle_get_job_limit(const char *node); int throttle_get_total_job_limit(int l); diff --git a/extra/alerts/alert_file.sh.sample b/extra/alerts/alert_file.sh.sample index e482e934ce..7844c77e60 100644 --- a/extra/alerts/alert_file.sh.sample +++ b/extra/alerts/alert_file.sh.sample @@ -1,120 +1,109 @@ #!/bin/sh # -# Copyright 2015-2017 the Pacemaker project contributors +# Copyright 2015-2021 the Pacemaker project contributors # # The version control history for this file may have further details. # -# 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 software 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 library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This source code is licensed under the GNU General Public License version 2 +# or later (GPLv2+) WITHOUT ANY WARRANTY. # ############################################################################## # Sample configuration (cib fragment in xml notation) # ================================ # # # # # # # # # # # # # # No one will probably ever see this echo, unless they run the script manually. # An alternative would be to log to the system log, or similar. (We can't send # this to the configured recipient, because that variable won't be defined in # this case either.) if [ -z $CRM_alert_version ]; then echo "$0 must be run by Pacemaker version 1.1.15 or later" exit 0 fi # Alert agents must always handle the case where no recipients are defined, # even if it's a no-op (a recipient might be added to the configuration later). if [ -z "${CRM_alert_recipient}" ]; then echo "$0 requires a recipient configured with a full filename path" exit 0 fi debug_exec_order_default="false" # Pacemaker passes instance attributes to alert agents as environment variables. # It is completely up to the agent what instance attributes to support. # Here, we define an instance attribute "debug_exec_order". : ${debug_exec_order=${debug_exec_order_default}} if [ "${debug_exec_order}" = "true" ]; then tstamp=`printf "%04d. " "$CRM_alert_node_sequence"` if [ ! -z "$CRM_alert_timestamp" ]; then tstamp="${tstamp} $CRM_alert_timestamp (`date "+%H:%M:%S.%06N"`): " fi else if [ ! -z "$CRM_alert_timestamp" ]; then tstamp="$CRM_alert_timestamp: " fi fi case $CRM_alert_kind in node) echo "${tstamp}Node '${CRM_alert_node}' is now '${CRM_alert_desc}'" >> "${CRM_alert_recipient}" ;; fencing) # Other keys: # # CRM_alert_node # CRM_alert_task # CRM_alert_rc # echo "${tstamp}Fencing ${CRM_alert_desc}" >> "${CRM_alert_recipient}" ;; resource) # Other keys: # # CRM_alert_target_rc # CRM_alert_status # CRM_alert_rc # if [ ${CRM_alert_interval} = "0" ]; then CRM_alert_interval="" else CRM_alert_interval=" (${CRM_alert_interval})" fi if [ ${CRM_alert_target_rc} = "0" ]; then CRM_alert_target_rc="" else CRM_alert_target_rc=" (target: ${CRM_alert_target_rc})" fi case ${CRM_alert_desc} in Cancelled) ;; *) echo "${tstamp}Resource operation '${CRM_alert_task}${CRM_alert_interval}' for '${CRM_alert_rsc}' on '${CRM_alert_node}': ${CRM_alert_desc}${CRM_alert_target_rc}" >> "${CRM_alert_recipient}" ;; esac ;; attribute) # echo "${tstamp}Attribute '${CRM_alert_attribute_name}' on node '${CRM_alert_node}' was updated to '${CRM_alert_attribute_value}'" >> "${CRM_alert_recipient}" ;; *) echo "${tstamp}Unhandled $CRM_alert_kind alert" >> "${CRM_alert_recipient}" env | grep CRM_alert >> "${CRM_alert_recipient}" ;; esac diff --git a/extra/alerts/alert_smtp.sh.sample b/extra/alerts/alert_smtp.sh.sample index b40d7a47b1..5da83ade4a 100644 --- a/extra/alerts/alert_smtp.sh.sample +++ b/extra/alerts/alert_smtp.sh.sample @@ -1,117 +1,106 @@ #!/bin/sh # # Copyright 2016-2017 the Pacemaker project contributors # # The version control history for this file may have further details. # -# 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 software 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 library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This source code is licensed under the GNU General Public License version 2 +# or later (GPLv2+) WITHOUT ANY WARRANTY. # ############################################################################## # # Sample configuration (cib fragment in xml notation) # ================================ # # # # # # # # # # # # email_client_default="sendmail" email_sender_default="hacluster" email_recipient_default="root" : ${email_client=${email_client_default}} : ${email_sender=${email_sender_default}} email_recipient="${CRM_alert_recipient-${email_recipient_default}}" node_name=`uname -n` cluster_name=`crm_attribute --query -n cluster-name -q` email_body=`env | grep CRM_alert_` if [ ! -z "${email_sender##*@*}" ]; then email_sender="${email_sender}@${node_name}" fi if [ ! -z "${email_recipient##*@*}" ]; then email_recipient="${email_recipient}@${node_name}" fi if [ -z ${CRM_alert_version} ]; then email_subject="Pacemaker version 1.1.15 or later is required for alerts" else case ${CRM_alert_kind} in node) email_subject="${CRM_alert_timestamp} ${cluster_name}: Node '${CRM_alert_node}' is now '${CRM_alert_desc}'" ;; fencing) email_subject="${CRM_alert_timestamp} ${cluster_name}: Fencing ${CRM_alert_desc}" ;; resource) if [ ${CRM_alert_interval} = "0" ]; then CRM_alert_interval="" else CRM_alert_interval=" (${CRM_alert_interval})" fi if [ ${CRM_alert_target_rc} = "0" ]; then CRM_alert_target_rc="" else CRM_alert_target_rc=" (target: ${CRM_alert_target_rc})" fi case ${CRM_alert_desc} in Cancelled) ;; *) email_subject="${CRM_alert_timestamp} ${cluster_name}: Resource operation '${CRM_alert_task}${CRM_alert_interval}' for '${CRM_alert_rsc}' on '${CRM_alert_node}': ${CRM_alert_desc}${CRM_alert_target_rc}" ;; esac ;; attribute) # email_subject="${CRM_alert_timestamp} ${cluster_name}: The '${CRM_alert_attribute_name}' attribute of the '${CRM_alert_node}' node was updated in '${CRM_alert_attribute_value}'" ;; *) email_subject="${CRM_alert_timestamp} ${cluster_name}: Unhandled $CRM_alert_kind alert" ;; esac fi if [ ! -z "${email_subject}" ]; then case $email_client in # This sample script supports only sendmail for sending the email. # Support for additional senders can easily be added by adding # new cases here. sendmail) sendmail -t -r "${email_sender}" <<__EOF__ From: ${email_sender} To: ${email_recipient} Return-Path: ${email_sender} Subject: ${email_subject} ${email_body} __EOF__ ;; *) ;; esac fi diff --git a/extra/ansible/docker/roles/docker-host/files/fence_docker_cts b/extra/ansible/docker/roles/docker-host/files/fence_docker_cts index ae102bfbb7..1b928ff75d 100644 --- a/extra/ansible/docker/roles/docker-host/files/fence_docker_cts +++ b/extra/ansible/docker/roles/docker-host/files/fence_docker_cts @@ -1,203 +1,186 @@ #!/bin/bash # -# Copyright 2014-2015 the Pacemaker project contributors +# Copyright 2014-2021 the Pacemaker project contributors # # The version control history for this file may have further details. # -# This program is free software; you can redistribute it and/or modify -# it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. +# This source code is licensed under the GNU General Public License version 2 +# (GPLv2) WITHOUT ANY WARRANTY. # -# This program is distributed in the hope that it would be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# -# Further, this software is distributed without any warranty that it is -# free of the rightful claim of any third person regarding infringement -# or the like. Any license provided herein, whether implied or -# otherwise, applies only to this software file. Patent licenses, if -# any, provided herein do not apply to combinations of this program with -# other software, or any other product whatsoever. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. -# -####################################################################### port="" action="list" # Default fence action function usage() { cat < fence_docker_cts fences docker containers for testing purposes. Fencing Action The name/id of docker container to control/check EOF exit 0; } function docker_log() { if ! [ "$action" = "list" ]; then printf "$*\n" 1>&2 fi } # stdin option processing if [ -z $1 ]; then # If there are no command line args, look for options from stdin while read line; do for word in $(echo "$line"); do case $word in option=*|action=*) action=`echo $word | sed s/.*=//`;; port=*) port=`echo $word | sed s/.*=//`;; node=*) port=`echo $word | sed s/.*=//`;; nodename=*) port=`echo $word | sed s/.*=//`;; --);; *) docker_log "Invalid command: $word";; esac done done fi # Command line option processing while true ; do if [ -z "$1" ]; then break; fi case "$1" in -o|--action|--option) action=$2; shift; shift;; -n|--port) port=$2; shift; shift;; -V|--version) echo "1.0.0"; exit 0;; --help|-h) usage; exit 0;; --) shift ; break ;; *) docker_log "Unknown option: $1. See --help for details."; exit 1;; esac done action=`echo $action | tr 'A-Z' 'a-z'` case $action in hostlist|list) action=list;; stat|status) action=status;; restart|reboot|reset) action=reboot;; poweron|on) action=start;; poweroff|off) action=stop;; esac function fence_done() { if [ $1 -eq 0 ]; then docker_log "Operation $action (port=$port) passed" else docker_log "Operation $action (port=$port) failed: $1" fi if [ -z "$returnfile" ]; then rm -f $returnfile fi if [ -z "$helperscript" ]; then rm -f $helperscript fi exit $1 } case $action in metadata) metadata;; esac returnfile=$(mktemp /tmp/fence_docker_cts_returnfileXXXX) returnstring="" helper_script=$(mktemp /tmp/fence_docker_cts_helperXXXX) exec_action() { echo "#!/bin/bash" > $helper_script echo "sleep 10000" >> $helper_script chmod 755 $helper_script src="$(uname -n)" $helper_script "$src" "$action" "$returnfile" "$port" > /dev/null 2>&1 & pid=$! docker_log "waiting on pid $pid" wait $pid > /dev/null 2>&1 returnstring=$(cat $returnfile) if [ -z "$returnstring" ]; then docker_log "fencing daemon did not respond" fence_done 1 fi if [ "$returnstring" == "fail" ]; then docker_log "fencing daemon failed to execute action [$action on port $port]" fence_done 1 fi return 0 } exec_action case $action in list) cat $returnfile fence_done 0 ;; status) # 0 if container is on # 1 if container can not be contacted or unknown # 2 if container is off if [ "$returnstring" = "true" ]; then fence_done 0 else fence_done 2 fi ;; monitor|stop|start|reboot) : ;; *) docker_log "Unknown action: $action"; fence_done 1;; esac fence_done $? diff --git a/extra/showscores.sh b/extra/showscores.sh index 09e0777f87..a8647ba21a 100644 --- a/extra/showscores.sh +++ b/extra/showscores.sh @@ -1,147 +1,136 @@ #!/bin/bash # -# Copyright 2008-2017 the Pacemaker project contributors +# Copyright 2008-2021 the Pacemaker project contributors # # The version control history for this file may have further details. # -# 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. +# This source code is licensed under the GNU General Public License version 2 +# or later (GPLv2+) WITHOUT ANY WARRANTY. # # Display scores of Pacemaker resources if [ "$1" = "--help" -o "$1" = "-h" ] then echo "showscores.sh - basically parsing crm_simulate -Ls." echo "Usage: " echo "$0 (to display score information for all resources on all nodes sorted by resource name)" echo "$0 node (to display score information for all resources on all nodes sorted by nodename)" echo "$0 (to display score information for a specific resource on all nodes)" echo "$0 (to display score information for a specific resource on a specific node)" echo "$0 singlescore (to display just the score number (not additional info) for a specific resource on a specific node)" exit 0 fi tmpfile=/tmp/dkshowscorestmpfiledk tmpfile2=/tmp/dkshowscorestmpfile2dk sortby=1 if [ "$1" = "node" ] then sortby=3 fi export default_stickiness=`crm_attribute -G -n default-resource-stickiness -t rsc_defaults -Q 2>/dev/null` if [ -z "$default_stickiness" ]; then default_stickiness=0; fi export default_migrationthreshold=`crm_attribute -G -n migration-threshold -t rsc_defaults -Q 2>/dev/null` if [ -n "$1" -a "$1" != "node" ] then resource=$1 fi if [ -n "$2" ] then nodename=$2 fi 2>&1 crm_simulate -Ls | grep -E "$resource" | grep -E "$nodename" > $tmpfile parseline() { if ! echo $*|grep -q "promotion score"; then shift; fi res=$1; shift; shift; shift; shift; node=$(echo $1|sed 's/:$//'); shift; score=$1; } get_stickiness() { res="$1" # get meta attribute resource_stickiness if ! stickiness=`crm_resource -g resource-stickiness -r $res --meta -Q 2>/dev/null` then # if no resource-specific stickiness is confiugured, use the default value stickiness="$default_stickiness" fi # get meta attribute resource_failure_stickiness if ! migrationthreshold=`crm_resource -g migration-threshold -r $res --meta -Q 2>/dev/null` then # if that doesn't exist, use the default value migrationthreshold="$default_migrationthreshold" fi } get_failcount() { #usage $0 res node failcount=`crm_failcount -G -r $1 -U $2 -Q 2>/dev/null|grep -o "^[0-9]*$"` } #determine the longest resource name to adjust width of the first column max_res_id_len=0 for res_id in $(tail -n +2 $tmpfile | sed 's/^[a-zA-Z_-]*\:\ //' | cut -d " " -f 1 | sort | uniq); do res_id_len=$(echo $res_id|wc -c) [ $res_id_len -gt $max_res_id_len ] && export max_res_id_len=$res_id_len; done # we'll later add "_(master)" to master scores, so add 9 chars to max_res_id_len max_res_id_len=$(($max_res_id_len+9)) #same for nodenames max_node_id_len=0 for node_id in $(sed 's/^[a-zA-Z_-]*\:\ //' $tmpfile | cut -d " " -f 5 | grep -v "^$" | sort | uniq | sed 's/\://'); do node_id_len=$(echo $node_id|wc -c) [ $node_id_len -gt $max_node_id_len ] && export max_node_id_len=$node_id_len; done # display allocation scores grep native_color $tmpfile | while read line do unset node res score stickiness failcount migrationthreshold parseline $line get_stickiness $res get_failcount $res $node printf "%-${max_res_id_len}s%-10s%-${max_node_id_len}s%-11s%-9s%-16s\n" $res $score $node $stickiness $failcount $migrationthreshold done >> $tmpfile2 # display promotion scores grep "promotion score" $tmpfile | while read line do unset node res score stickiness failcount migrationthreshold parseline $line # Skip if node=none. Sometimes happens for clones but is internally mapped to another clone instance, so this is skipped [ "$node" = "none" ] && continue inflines=`grep "promotion score" $tmpfile | grep $res | grep 1000000 | wc -l` if [ $inflines -eq 1 ] then # [10:24] the non INFINITY values are the true ones # [10:25] except for when the actually resulting score is [-]INFINITY # [10:25] yeah actualline=`grep "promotion score" $tmpfile | grep $res | grep -v 1000000` parseline $actualline fi get_stickiness $res get_failcount $res $node res=$res"_(master)" printf "%-${max_res_id_len}s%-10s%-${max_node_id_len}s%-11s%-9s%-16s\n" $res $score $node $stickiness $failcount $migrationthreshold done | sort | uniq >> $tmpfile2 if [ "$3" = "singlescore" ] then sed 's/ */ /g' $tmpfile2 | cut -d ' ' -f 2 | tail -n 1 else # Heading printf "%-${max_res_id_len}s%-10s%-${max_node_id_len}s%-11s%-9s%-16s\n" "Resource" "Score" "Node" "Stickiness" "#Fail" "Migration-Threshold" sort -k $sortby $tmpfile2 fi rm -f $tmpfile $tmpfile2 diff --git a/include/crm/cib/Makefile.am b/include/crm/cib/Makefile.am index 237cdbbb8a..27d23fd2c6 100644 --- a/include/crm/cib/Makefile.am +++ b/include/crm/cib/Makefile.am @@ -1,25 +1,14 @@ # # Copyright 2012-2021 the Pacemaker project contributors # # The version control history for this file may have further details. # -# 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. +# This source code is licensed under the GNU General Public License version 2 +# or later (GPLv2+) WITHOUT ANY WARRANTY. # MAINTAINERCLEANFILES = Makefile.in headerdir=$(pkgincludedir)/crm/cib noinst_HEADERS = internal.h header_HEADERS = util.h util_compat.h cib_types.h diff --git a/include/crm/cluster/Makefile.am b/include/crm/cluster/Makefile.am index b4a0821f5f..96f2bd0eb5 100644 --- a/include/crm/cluster/Makefile.am +++ b/include/crm/cluster/Makefile.am @@ -1,25 +1,14 @@ # # Copyright 2012-2021 the Pacemaker project contributors # # The version control history for this file may have further details. # -# 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. +# This source code is licensed under the GNU General Public License version 2 +# or later (GPLv2+) WITHOUT ANY WARRANTY. # MAINTAINERCLEANFILES = Makefile.in headerdir=$(pkgincludedir)/crm/cluster noinst_HEADERS = internal.h election_internal.h header_HEADERS = compat.h diff --git a/include/crm/fencing/Makefile.am b/include/crm/fencing/Makefile.am index 92aaad5a2b..8bfc8d818c 100644 --- a/include/crm/fencing/Makefile.am +++ b/include/crm/fencing/Makefile.am @@ -1,25 +1,14 @@ # # Copyright 2012-2021 the Pacemaker project contributors # # The version control history for this file may have further details. # -# 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. +# This source code is licensed under the GNU General Public License version 2 +# or later (GPLv2+) WITHOUT ANY WARRANTY. # MAINTAINERCLEANFILES = Makefile.in headerdir=$(pkgincludedir)/crm/fencing header_HEADERS = compat.h noinst_HEADERS = internal.h diff --git a/include/crm/pengine/Makefile.am b/include/crm/pengine/Makefile.am index 351cef3137..fac60317a3 100644 --- a/include/crm/pengine/Makefile.am +++ b/include/crm/pengine/Makefile.am @@ -1,28 +1,17 @@ # # Copyright 2006-2021 the Pacemaker project contributors # # The version control history for this file may have further details. # -# 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. +# This source code is licensed under the GNU General Public License version 2 +# or later (GPLv2+) WITHOUT ANY WARRANTY. # MAINTAINERCLEANFILES = Makefile.in headerdir=$(pkgincludedir)/crm/pengine noinst_HEADERS = internal.h remote_internal.h rules_internal.h header_HEADERS = common.h complex.h pe_types.h rules.h status.h \ common_compat.h \ pe_types_compat.h \ rules_compat.h diff --git a/lib/services/systemd.h b/lib/services/systemd.h index 23e3479f34..8bc743ea1a 100644 --- a/lib/services/systemd.h +++ b/lib/services/systemd.h @@ -1,30 +1,19 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This software 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 Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * +/* * Copyright (C) 2012 Andrew Beekhof + * + * This source code is licensed under the GNU Lesser General Public License + * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY. */ #ifndef SYSTEMD__H # define SYSTEMD__H # include # include "crm/services.h" G_GNUC_INTERNAL GList *systemd_unit_listall(void); G_GNUC_INTERNAL gboolean systemd_unit_exec(svc_action_t * op); G_GNUC_INTERNAL gboolean systemd_unit_exists(const gchar * name); G_GNUC_INTERNAL void systemd_cleanup(void); #endif /* SYSTEMD__H */ diff --git a/lib/services/upstart.h b/lib/services/upstart.h index 7bb9b0d2fa..ce37a88e12 100644 --- a/lib/services/upstart.h +++ b/lib/services/upstart.h @@ -1,30 +1,19 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This software 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 Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * +/* * Copyright (C) 2010 Senko Rasic * Copyright (c) 2010 Ante Karamatic + * + * This source code is licensed under the GNU Lesser General Public License + * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY. */ #ifndef UPSTART__H # define UPSTART__H # include # include "crm/services.h" G_GNUC_INTERNAL GList *upstart_job_listall(void); G_GNUC_INTERNAL gboolean upstart_job_exec(svc_action_t * op); G_GNUC_INTERNAL gboolean upstart_job_exists(const gchar * name); G_GNUC_INTERNAL void upstart_cleanup(void); #endif /* UPSTART__H */ diff --git a/scratch.c b/scratch.c index a552ab120c..bd0358f5a0 100644 --- a/scratch.c +++ b/scratch.c @@ -1,64 +1,53 @@ -/* - * Copyright 2004-2013 the Pacemaker project contributors +/* + * Copyright 2004-2021 the Pacemaker project contributors * * The version control history for this file may have further details. - * - * 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 software 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 library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * This source code is licensed under the GNU General Public License version 2 + * or later (GPLv2+) WITHOUT ANY WARRANTY. */ #include #include #include #include #include #include #include #include #include #include #include #define OPTARGS "X:" int main(int argc, char **argv) { int flag; xmlNode *top = NULL; const char *xml_file = NULL; crm_log_init(NULL, LOG_TRACE, FALSE, TRUE, argc, argv, FALSE); while (1) { flag = getopt(argc, argv, OPTARGS); if (flag == -1) break; switch (flag) { case 'X': xml_file = optarg; break; default: printf("Unknown option: -%c\n", flag); break; } } top = filename2xml(xml_file); free_xml(top); return 0; }