From 749b9b4a51fac7ba8a26862978cc02471bb9d021 Mon Sep 17 00:00:00 2001 From: fbrehm Date: Thu, 7 Jun 2012 08:52:35 +0200 Subject: [PATCH] saving uncommitted changes in /etc prior to emerge run --- .etckeeper | 15 +- conf.d/acpid | 2 +- config-archive/etc/conf.d/acpid | 6 + .../etc/conf.d/acpid.dist | 0 .../etc/eselect/postgresql/slots/9.1/base | 2 +- .../etc/eselect/postgresql/slots/9.1/base.1 | 1 + .../eselect/postgresql/slots/9.1/base.dist | 2 +- .../etc/eselect/postgresql/slots/9.1/docs | 2 +- .../etc/eselect/postgresql/slots/9.1/docs.1 | 1 + .../eselect/postgresql/slots/9.1/docs.dist | 2 +- .../etc/eselect/postgresql/slots/9.1/server | 2 +- .../etc/eselect/postgresql/slots/9.1/server.1 | 1 + .../eselect/postgresql/slots/9.1/server.dist | 2 +- config-archive/etc/init.d/acpid | 28 ++++ .../etc/init.d/acpid.dist | 0 config-archive/etc/init.d/postgresql-9.1 | 141 ++++++++++++++++++ .../etc/init.d/postgresql-9.1.dist | 0 eselect/postgresql/slots/9.1/._cfg0000_base | 1 - eselect/postgresql/slots/9.1/._cfg0000_docs | 1 - eselect/postgresql/slots/9.1/._cfg0000_server | 1 - eselect/postgresql/slots/9.1/base | 2 +- eselect/postgresql/slots/9.1/docs | 2 +- eselect/postgresql/slots/9.1/server | 2 +- init.d/acpid | 13 +- init.d/postgresql-9.1 | 2 +- 25 files changed, 201 insertions(+), 30 deletions(-) create mode 100644 config-archive/etc/conf.d/acpid rename conf.d/._cfg0000_acpid => config-archive/etc/conf.d/acpid.dist (100%) create mode 100644 config-archive/etc/eselect/postgresql/slots/9.1/base.1 create mode 100644 config-archive/etc/eselect/postgresql/slots/9.1/docs.1 create mode 100644 config-archive/etc/eselect/postgresql/slots/9.1/server.1 create mode 100755 config-archive/etc/init.d/acpid rename init.d/._cfg0000_acpid => config-archive/etc/init.d/acpid.dist (100%) create mode 100755 config-archive/etc/init.d/postgresql-9.1 rename init.d/._cfg0000_postgresql-9.1 => config-archive/etc/init.d/postgresql-9.1.dist (100%) delete mode 100644 eselect/postgresql/slots/9.1/._cfg0000_base delete mode 100644 eselect/postgresql/slots/9.1/._cfg0000_docs delete mode 100644 eselect/postgresql/slots/9.1/._cfg0000_server diff --git a/.etckeeper b/.etckeeper index b91fa22..21efa1c 100755 --- a/.etckeeper +++ b/.etckeeper @@ -226,7 +226,6 @@ maybe chmod 0644 './colord.conf' maybe chmod 0644 './colordiffrc' maybe chmod 0644 './colordiffrc-lightbg' maybe chmod 0755 './conf.d' -maybe chmod 0644 './conf.d/._cfg0000_acpid' maybe chmod 0644 './conf.d/acpid' maybe chmod 0644 './conf.d/alsasound' maybe chmod 0644 './conf.d/apache2' @@ -313,6 +312,8 @@ maybe chmod 0644 './config-archive/etc/bash/bashrc.dist.new' maybe chmod 0644 './config-archive/etc/colord.conf' maybe chmod 0644 './config-archive/etc/colord.conf.dist' maybe chmod 0755 './config-archive/etc/conf.d' +maybe chmod 0644 './config-archive/etc/conf.d/acpid' +maybe chmod 0644 './config-archive/etc/conf.d/acpid.dist' maybe chmod 0644 './config-archive/etc/conf.d/alsasound' maybe chmod 0644 './config-archive/etc/conf.d/alsasound.dist' maybe chmod 0644 './config-archive/etc/conf.d/libvirtd' @@ -342,10 +343,13 @@ maybe chmod 0755 './config-archive/etc/eselect/postgresql' maybe chmod 0755 './config-archive/etc/eselect/postgresql/slots' maybe chmod 0755 './config-archive/etc/eselect/postgresql/slots/9.1' maybe chmod 0644 './config-archive/etc/eselect/postgresql/slots/9.1/base' +maybe chmod 0644 './config-archive/etc/eselect/postgresql/slots/9.1/base.1' maybe chmod 0644 './config-archive/etc/eselect/postgresql/slots/9.1/base.dist' maybe chmod 0644 './config-archive/etc/eselect/postgresql/slots/9.1/docs' +maybe chmod 0644 './config-archive/etc/eselect/postgresql/slots/9.1/docs.1' maybe chmod 0644 './config-archive/etc/eselect/postgresql/slots/9.1/docs.dist' maybe chmod 0644 './config-archive/etc/eselect/postgresql/slots/9.1/server' +maybe chmod 0644 './config-archive/etc/eselect/postgresql/slots/9.1/server.1' maybe chmod 0644 './config-archive/etc/eselect/postgresql/slots/9.1/server.dist' maybe chmod 0755 './config-archive/etc/gentoo' maybe chmod 0644 './config-archive/etc/gentoo/gentoorc' @@ -356,6 +360,8 @@ maybe chmod 0755 './config-archive/etc/hp' maybe chmod 0644 './config-archive/etc/hp/hplip.conf' maybe chmod 0644 './config-archive/etc/hp/hplip.conf.dist' maybe chmod 0755 './config-archive/etc/init.d' +maybe chmod 0755 './config-archive/etc/init.d/acpid' +maybe chmod 0755 './config-archive/etc/init.d/acpid.dist' maybe chmod 0755 './config-archive/etc/init.d/alsasound' maybe chmod 0755 './config-archive/etc/init.d/alsasound.dist' maybe chmod 0755 './config-archive/etc/init.d/apache2' @@ -370,6 +376,8 @@ maybe chmod 0755 './config-archive/etc/init.d/libvirtd' maybe chmod 0755 './config-archive/etc/init.d/libvirtd.dist' maybe chmod 0755 './config-archive/etc/init.d/nscd' maybe chmod 0755 './config-archive/etc/init.d/nscd.dist' +maybe chmod 0755 './config-archive/etc/init.d/postgresql-9.1' +maybe chmod 0755 './config-archive/etc/init.d/postgresql-9.1.dist' maybe chmod 0755 './config-archive/etc/init.d/slapd' maybe chmod 0755 './config-archive/etc/init.d/slapd.dist' maybe chmod 0755 './config-archive/etc/init.d/sshd' @@ -846,9 +854,6 @@ maybe chmod 0644 './eselect/postgresql/active.links' maybe chmod 0644 './eselect/postgresql/active.links91' maybe chmod 0755 './eselect/postgresql/slots' maybe chmod 0755 './eselect/postgresql/slots/9.1' -maybe chmod 0644 './eselect/postgresql/slots/9.1/._cfg0000_base' -maybe chmod 0644 './eselect/postgresql/slots/9.1/._cfg0000_docs' -maybe chmod 0644 './eselect/postgresql/slots/9.1/._cfg0000_server' maybe chmod 0644 './eselect/postgresql/slots/9.1/base' maybe chmod 0644 './eselect/postgresql/slots/9.1/docs' maybe chmod 0644 './eselect/postgresql/slots/9.1/server' @@ -1177,8 +1182,6 @@ maybe chmod 0644 './imlib/im_palette-tiny.pal' maybe chmod 0644 './imlib/im_palette.pal' maybe chmod 0644 './imlib/imrc' maybe chmod 0755 './init.d' -maybe chmod 0755 './init.d/._cfg0000_acpid' -maybe chmod 0755 './init.d/._cfg0000_postgresql-9.1' maybe chmod 0755 './init.d/NetworkManager' maybe chmod 0755 './init.d/acpid' maybe chmod 0755 './init.d/aiccu' diff --git a/conf.d/acpid b/conf.d/acpid index 3032976..9aadb4c 100644 --- a/conf.d/acpid +++ b/conf.d/acpid @@ -3,4 +3,4 @@ # Options to pass to the acpid daemon. # See the acpid(8) man page for more info. -ACPID_OPTIONS="" +ACPID_ARGS="" diff --git a/config-archive/etc/conf.d/acpid b/config-archive/etc/conf.d/acpid new file mode 100644 index 0000000..3032976 --- /dev/null +++ b/config-archive/etc/conf.d/acpid @@ -0,0 +1,6 @@ +# /etc/conf.d/acpid: config file for /etc/init.d/acpid + +# Options to pass to the acpid daemon. +# See the acpid(8) man page for more info. + +ACPID_OPTIONS="" diff --git a/conf.d/._cfg0000_acpid b/config-archive/etc/conf.d/acpid.dist similarity index 100% rename from conf.d/._cfg0000_acpid rename to config-archive/etc/conf.d/acpid.dist diff --git a/config-archive/etc/eselect/postgresql/slots/9.1/base b/config-archive/etc/eselect/postgresql/slots/9.1/base index 479bd41..34425d9 100644 --- a/config-archive/etc/eselect/postgresql/slots/9.1/base +++ b/config-archive/etc/eselect/postgresql/slots/9.1/base @@ -1 +1 @@ -postgres_ebuilds="${postgres_ebuilds} postgresql-base-9.1.2" +postgres_ebuilds="${postgres_ebuilds} postgresql-base-9.1.3" diff --git a/config-archive/etc/eselect/postgresql/slots/9.1/base.1 b/config-archive/etc/eselect/postgresql/slots/9.1/base.1 new file mode 100644 index 0000000..479bd41 --- /dev/null +++ b/config-archive/etc/eselect/postgresql/slots/9.1/base.1 @@ -0,0 +1 @@ +postgres_ebuilds="${postgres_ebuilds} postgresql-base-9.1.2" diff --git a/config-archive/etc/eselect/postgresql/slots/9.1/base.dist b/config-archive/etc/eselect/postgresql/slots/9.1/base.dist index 34425d9..bb3cb40 100644 --- a/config-archive/etc/eselect/postgresql/slots/9.1/base.dist +++ b/config-archive/etc/eselect/postgresql/slots/9.1/base.dist @@ -1 +1 @@ -postgres_ebuilds="${postgres_ebuilds} postgresql-base-9.1.3" +postgres_ebuilds="${postgres_ebuilds} postgresql-base-9.1.4" diff --git a/config-archive/etc/eselect/postgresql/slots/9.1/docs b/config-archive/etc/eselect/postgresql/slots/9.1/docs index 8cec4d4..4b0d9a8 100644 --- a/config-archive/etc/eselect/postgresql/slots/9.1/docs +++ b/config-archive/etc/eselect/postgresql/slots/9.1/docs @@ -1 +1 @@ -postgres_ebuilds="${postgres_ebuilds} postgresql-docs-9.1.2" +postgres_ebuilds="${postgres_ebuilds} postgresql-docs-9.1.3" diff --git a/config-archive/etc/eselect/postgresql/slots/9.1/docs.1 b/config-archive/etc/eselect/postgresql/slots/9.1/docs.1 new file mode 100644 index 0000000..8cec4d4 --- /dev/null +++ b/config-archive/etc/eselect/postgresql/slots/9.1/docs.1 @@ -0,0 +1 @@ +postgres_ebuilds="${postgres_ebuilds} postgresql-docs-9.1.2" diff --git a/config-archive/etc/eselect/postgresql/slots/9.1/docs.dist b/config-archive/etc/eselect/postgresql/slots/9.1/docs.dist index 4b0d9a8..348f602 100644 --- a/config-archive/etc/eselect/postgresql/slots/9.1/docs.dist +++ b/config-archive/etc/eselect/postgresql/slots/9.1/docs.dist @@ -1 +1 @@ -postgres_ebuilds="${postgres_ebuilds} postgresql-docs-9.1.3" +postgres_ebuilds="${postgres_ebuilds} postgresql-docs-9.1.4" diff --git a/config-archive/etc/eselect/postgresql/slots/9.1/server b/config-archive/etc/eselect/postgresql/slots/9.1/server index 7a0a9c0..a02e087 100644 --- a/config-archive/etc/eselect/postgresql/slots/9.1/server +++ b/config-archive/etc/eselect/postgresql/slots/9.1/server @@ -1 +1 @@ -postgres_ebuilds="${postgres_ebuilds} postgresql-server-9.1.2-r2" +postgres_ebuilds="${postgres_ebuilds} postgresql-server-9.1.3" diff --git a/config-archive/etc/eselect/postgresql/slots/9.1/server.1 b/config-archive/etc/eselect/postgresql/slots/9.1/server.1 new file mode 100644 index 0000000..7a0a9c0 --- /dev/null +++ b/config-archive/etc/eselect/postgresql/slots/9.1/server.1 @@ -0,0 +1 @@ +postgres_ebuilds="${postgres_ebuilds} postgresql-server-9.1.2-r2" diff --git a/config-archive/etc/eselect/postgresql/slots/9.1/server.dist b/config-archive/etc/eselect/postgresql/slots/9.1/server.dist index a02e087..8805b8c 100644 --- a/config-archive/etc/eselect/postgresql/slots/9.1/server.dist +++ b/config-archive/etc/eselect/postgresql/slots/9.1/server.dist @@ -1 +1 @@ -postgres_ebuilds="${postgres_ebuilds} postgresql-server-9.1.3" +postgres_ebuilds="${postgres_ebuilds} postgresql-server-9.1.4" diff --git a/config-archive/etc/init.d/acpid b/config-archive/etc/init.d/acpid new file mode 100755 index 0000000..946e39b --- /dev/null +++ b/config-archive/etc/init.d/acpid @@ -0,0 +1,28 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-power/acpid/files/acpid-2.0.11-init.d,v 1.7 2011/12/04 10:33:21 swegener Exp $ + +extra_started_commands="reload" +command="/usr/sbin/acpid" +command_args="${ACPID_OPTIONS}" +start_stop_daemon_args="--quiet" +description="Daemon for Advanced Configuration and Power Interface" + +depend() { + need localmount + use logger +} + +if [ "${RC_VERSION:-0}" = "0" ]; then + start() { + eerror "This script cannot be used for baselayout-1." + return 1 + } +fi + +reload() { + ebegin "Reloading acpid configuration" + start-stop-daemon --exec $command --signal HUP + eend $? +} diff --git a/init.d/._cfg0000_acpid b/config-archive/etc/init.d/acpid.dist similarity index 100% rename from init.d/._cfg0000_acpid rename to config-archive/etc/init.d/acpid.dist diff --git a/config-archive/etc/init.d/postgresql-9.1 b/config-archive/etc/init.d/postgresql-9.1 new file mode 100755 index 0000000..0137691 --- /dev/null +++ b/config-archive/etc/init.d/postgresql-9.1 @@ -0,0 +1,141 @@ +#!/sbin/runscript +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +extra_started_commands="reload" + +get_config() { + [ -f ${PGDATA}/postgresql.conf ] || return 1 + + eval echo $(sed -e 's:#.*::' ${PGDATA}/postgresql.conf | awk '$1 == "'$1'" { print $2 == "=" ? $3 : $2 }') +} + +depend() { + use net + provide postgresql + + if [ "$(get_config log_destination)" = "syslog" ]; then + use logger + fi +} + +configured_port=$(get_config port) +: ${configured_port:=${PGPORT}} +socket_path=$(get_config unix_socket_path) +: ${socket_path:=/var/run/postgresql} + +checkconfig() { + # Check that DATA_DIR has been set and exists + if [ -z ${DATA_DIR} ] ; then + eerror "DATA_DIR not set" + eerror "HINT: Perhaps you need to update /etc/conf.d/postgresql-9.1" + fi + if [ ! -d ${DATA_DIR} ] ; then + eerror "Directory not found: ${DATA_DIR}" + eerror "HINT: Ensure that DATA_DIR points to the right path." + eerror "HINT: Or perhaps you need to create the database cluster:" + eerror " emerge --config dev-db/postgresql-server:9.1" + return 1 + fi + + # Check for the existence of and PostgreSQL's ability to read the config files. + if [ ! -f ${PGDATA}/postgresql.conf -o \ + ! -f ${PGDATA}/pg_hba.conf -o ! -f ${PGDATA}/pg_ident.conf ] ; then + eerror "The following file(s) were not found in ${PGDATA}:" + [ ! -f ${PGDATA}/postgresql.conf ] && eerror " postgresql.conf" + [ ! -f ${PGDATA}/pg_hba.conf ] && eerror " pg_hba.conf" + [ ! -f ${PGDATA}/pg_ident.conf ] && eerror " pg_ident.conf" + eerror "HINT: Try:" + eerror " mv ${DATA_DIR}/*.conf ${PGDATA}" + return 1 + fi + + local file + local failed + for file in pg_hba pg_ident postgresql ; do + file="${PGDATA}/${file}.conf" + su postgres -c "test -r ${file}" || failed="${file} ${failed}" + done + if [ -n "${failed}" ] ; then + eerror "The following file(s) are not readable by 'postgres':" + local x + for x in ${failed} ; do + eerror " ${x}" + done + eerror "HINT: Try: 'chmod 644 ${PGDATA}/*.conf'" + return 1 + fi + + checkpath -d -m 0770 -o postgres:postgres ${socket_path} + if [ -e ${socket_path}/.s.PGSQL.${configured_port} ] ; then + eerror "Socket conflict." + eerror "A server is already listening on:" + eerror " ${socket_path}/.s.PGSQL.${configured_port}" + eerror "HINT: Change PGPORT to listen on a different socket." + return 1 + fi +} + +start() { + checkconfig || return 1 + + ebegin "Starting PostgreSQL" + + rm -f ${DATA_DIR}/postmaster.pid + + local extraenv + local x + for x in ${PG_EXTRA_ENV} ; do + extraenv="${extraenv} --env ${x}" + done + + start-stop-daemon --start \ + --user postgres \ + --exec /usr/lib/postgresql-9.1/bin/postgres \ + --env "PGPORT=${configured_port}" \ + ${extraenv} \ + --wait $((${START_TIMEOUT}*1000)) \ + --pidfile ${DATA_DIR}/postmaster.pid \ + -- -D ${PGDATA} --data-directory=${DATA_DIR} --silent-mode=true ${PGOPTS} + local retval=$? + + if [ $retval -ne 0 ] ; then + eerror "Check the PostgreSQL 9.1 log for a detailed explanation of the above error." + eend $retval + return $retval + fi + + eend $retval +} + +stop() { + local seconds=$(( ${NICE_TIMEOUT} + ${RUDE_TIMEOUT} + ${FORCE_TIMEOUT} )) + ebegin "Stopping PostgreSQL (this can take up to ${seconds} seconds)" + + local retval + local retries=SIGTERM/${NICE_TIMEOUT} + + if [ "${RUDE_QUIT}" != "NO" ] ; then + einfo "RUDE_QUIT enabled." + retries="${retries}/SIGINT/${RUDE_TIMEOUT}" + fi + if [ "${FORCE_QUIT}" = "YES" ] ; then + einfo "FORCE_QUIT enabled." + ewarn "A recover-run might be executed on next startup." + retries="${retries}/SIGQUIT/${FORCE_TIMEOUT}" + fi + + start-stop-daemon --stop \ + --exec /usr/lib/postgresql-9.1/bin/postgres \ + --retry ${retries} \ + --pidfile ${DATA_DIR}/postmaster.pid + + eend +} + +reload() { + ebegin "Reloading PostgreSQL configuration" + kill -HUP $(head -n1 ${DATA_DIR}/postmaster.pid) + eend $? +} diff --git a/init.d/._cfg0000_postgresql-9.1 b/config-archive/etc/init.d/postgresql-9.1.dist similarity index 100% rename from init.d/._cfg0000_postgresql-9.1 rename to config-archive/etc/init.d/postgresql-9.1.dist diff --git a/eselect/postgresql/slots/9.1/._cfg0000_base b/eselect/postgresql/slots/9.1/._cfg0000_base deleted file mode 100644 index bb3cb40..0000000 --- a/eselect/postgresql/slots/9.1/._cfg0000_base +++ /dev/null @@ -1 +0,0 @@ -postgres_ebuilds="${postgres_ebuilds} postgresql-base-9.1.4" diff --git a/eselect/postgresql/slots/9.1/._cfg0000_docs b/eselect/postgresql/slots/9.1/._cfg0000_docs deleted file mode 100644 index 348f602..0000000 --- a/eselect/postgresql/slots/9.1/._cfg0000_docs +++ /dev/null @@ -1 +0,0 @@ -postgres_ebuilds="${postgres_ebuilds} postgresql-docs-9.1.4" diff --git a/eselect/postgresql/slots/9.1/._cfg0000_server b/eselect/postgresql/slots/9.1/._cfg0000_server deleted file mode 100644 index 8805b8c..0000000 --- a/eselect/postgresql/slots/9.1/._cfg0000_server +++ /dev/null @@ -1 +0,0 @@ -postgres_ebuilds="${postgres_ebuilds} postgresql-server-9.1.4" diff --git a/eselect/postgresql/slots/9.1/base b/eselect/postgresql/slots/9.1/base index 34425d9..bb3cb40 100644 --- a/eselect/postgresql/slots/9.1/base +++ b/eselect/postgresql/slots/9.1/base @@ -1 +1 @@ -postgres_ebuilds="${postgres_ebuilds} postgresql-base-9.1.3" +postgres_ebuilds="${postgres_ebuilds} postgresql-base-9.1.4" diff --git a/eselect/postgresql/slots/9.1/docs b/eselect/postgresql/slots/9.1/docs index 4b0d9a8..348f602 100644 --- a/eselect/postgresql/slots/9.1/docs +++ b/eselect/postgresql/slots/9.1/docs @@ -1 +1 @@ -postgres_ebuilds="${postgres_ebuilds} postgresql-docs-9.1.3" +postgres_ebuilds="${postgres_ebuilds} postgresql-docs-9.1.4" diff --git a/eselect/postgresql/slots/9.1/server b/eselect/postgresql/slots/9.1/server index a02e087..8805b8c 100644 --- a/eselect/postgresql/slots/9.1/server +++ b/eselect/postgresql/slots/9.1/server @@ -1 +1 @@ -postgres_ebuilds="${postgres_ebuilds} postgresql-server-9.1.3" +postgres_ebuilds="${postgres_ebuilds} postgresql-server-9.1.4" diff --git a/init.d/acpid b/init.d/acpid index 946e39b..412a265 100755 --- a/init.d/acpid +++ b/init.d/acpid @@ -1,11 +1,11 @@ #!/sbin/runscript -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-power/acpid/files/acpid-2.0.11-init.d,v 1.7 2011/12/04 10:33:21 swegener Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-power/acpid/files/acpid-2.0.16-init.d,v 1.1 2012/05/19 09:53:59 ssuominen Exp $ extra_started_commands="reload" command="/usr/sbin/acpid" -command_args="${ACPID_OPTIONS}" +command_args="${ACPID_ARGS}" start_stop_daemon_args="--quiet" description="Daemon for Advanced Configuration and Power Interface" @@ -14,13 +14,6 @@ depend() { use logger } -if [ "${RC_VERSION:-0}" = "0" ]; then - start() { - eerror "This script cannot be used for baselayout-1." - return 1 - } -fi - reload() { ebegin "Reloading acpid configuration" start-stop-daemon --exec $command --signal HUP diff --git a/init.d/postgresql-9.1 b/init.d/postgresql-9.1 index 0137691..a7616fd 100755 --- a/init.d/postgresql-9.1 +++ b/init.d/postgresql-9.1 @@ -23,7 +23,7 @@ depend() { configured_port=$(get_config port) : ${configured_port:=${PGPORT}} socket_path=$(get_config unix_socket_path) -: ${socket_path:=/var/run/postgresql} +: ${socket_path:=/run/postgresql} checkconfig() { # Check that DATA_DIR has been set and exists -- 2.39.5