+++ /dev/null
-# /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_ARGS=""
# Options to pass to the acpid daemon.
# See the acpid(8) man page for more info.
-ACPID_OPTIONS=""
+ACPID_ARGS=""
--- /dev/null
+# /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=""
--- /dev/null
+# /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_ARGS=""
-postgres_ebuilds="${postgres_ebuilds} postgresql-base-9.1.2"
+postgres_ebuilds="${postgres_ebuilds} postgresql-base-9.1.3"
-postgres_ebuilds="${postgres_ebuilds} postgresql-base-9.1.1"
+postgres_ebuilds="${postgres_ebuilds} postgresql-base-9.1.2"
--- /dev/null
+postgres_ebuilds="${postgres_ebuilds} postgresql-base-9.1.1"
-postgres_ebuilds="${postgres_ebuilds} postgresql-base-9.1.3"
+postgres_ebuilds="${postgres_ebuilds} postgresql-base-9.1.4"
-postgres_ebuilds="${postgres_ebuilds} postgresql-docs-9.1.2"
+postgres_ebuilds="${postgres_ebuilds} postgresql-docs-9.1.3"
-postgres_ebuilds="${postgres_ebuilds} postgresql-docs-9.1.1"
+postgres_ebuilds="${postgres_ebuilds} postgresql-docs-9.1.2"
--- /dev/null
+postgres_ebuilds="${postgres_ebuilds} postgresql-docs-9.1.1"
-postgres_ebuilds="${postgres_ebuilds} postgresql-docs-9.1.3"
+postgres_ebuilds="${postgres_ebuilds} postgresql-docs-9.1.4"
-postgres_ebuilds="${postgres_ebuilds} postgresql-server-9.1.2-r2"
+postgres_ebuilds="${postgres_ebuilds} postgresql-server-9.1.3"
-postgres_ebuilds="${postgres_ebuilds} postgresql-server-9.1.1"
+postgres_ebuilds="${postgres_ebuilds} postgresql-server-9.1.2-r2"
--- /dev/null
+postgres_ebuilds="${postgres_ebuilds} postgresql-server-9.1.1"
-postgres_ebuilds="${postgres_ebuilds} postgresql-server-9.1.3"
+postgres_ebuilds="${postgres_ebuilds} postgresql-server-9.1.4"
--- /dev/null
+#!/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 $?
+}
--- /dev/null
+#!/sbin/runscript
+# 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.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_ARGS}"
+start_stop_daemon_args="--quiet"
+description="Daemon for Advanced Configuration and Power Interface"
+
+depend() {
+ need localmount
+ use logger
+}
+
+reload() {
+ ebegin "Reloading acpid configuration"
+ start-stop-daemon --exec $command --signal HUP
+ eend $?
+}
# Distributed under the terms of the GNU General Public License v2
# $Header: $
-opts="${opts} reload"
+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
- provide postgresql-9.1
+ 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: Did you not update /etc/conf.d/postgresql-9.1"
+ 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 " 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}"
+ 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
eerror "HINT: Try: 'chmod 644 ${PGDATA}/*.conf'"
return 1
fi
- if [ -e /var/run/postgresql/.s.PGSQL.${PGPORT} ] ; then
+
+ 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 " /var/run/postgresql/.s.PGSQL.${PGPORT}"
+ eerror " ${socket_path}/.s.PGSQL.${configured_port}"
eerror "HINT: Change PGPORT to listen on a different socket."
return 1
fi
ebegin "Starting PostgreSQL"
- if [ -f ${DATA_DIR}/postmaster.pid ] ; then
- rm -f ${DATA_DIR}/postmaster.pid
- fi
+ rm -f ${DATA_DIR}/postmaster.pid
- local retval
+ local extraenv
+ local x
+ for x in ${PG_EXTRA_ENV} ; do
+ extraenv="${extraenv} --env ${x}"
+ done
- su -l postgres \
- -c "env PGPORT=\"${PGPORT}\" ${PG_EXTRA_ENV} \
- /usr/lib/postgresql-9.1/bin/pg_ctl \
- start ${WAIT_FOR_START} -t ${START_TIMEOUT} -s -D ${DATA_DIR} \
- -o '-D ${PGDATA} --data-directory=${DATA_DIR} --silent-mode=true ${PGOPTS}'"
- retval=$?
+ 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."
return $retval
fi
- # The following is to catch the case of an already running server
- # in which pg_ctl doesn't know to which server it connected to and
- # falsely reports the server as 'up'
- if [ ! -f ${DATA_DIR}/postmaster.pid ] ; then
- eerror "The PID file doesn't exist but pg_ctl reported a running server."
- eerror "Please check whether there is another server running on the same port or read the log-file."
- eend 1
- return 1
- fi
-
eend $retval
}
stop() {
- ebegin "Stopping PostgreSQL (this can take up to $(( ${NICE_TIMEOUT} + ${RUDE_TIMEOUT} + ${FORCE_TIMEOUT} )) seconds)"
+ local seconds=$(( ${NICE_TIMEOUT} + ${RUDE_TIMEOUT} + ${FORCE_TIMEOUT} ))
+ ebegin "Stopping PostgreSQL (this can take up to ${seconds} seconds)"
local retval
-
- if [ "${NICE_QUIT}" != "NO" ] ; then
- su -l postgres \
- -c "env PGPORT=\"${PGPORT}\" ${PG_EXTRA_ENV} \
- /usr/lib/postgresql-9.1/bin/pg_ctl \
- stop ${WAIT_FOR_STOP} -t ${NICE_TIMEOUT} -s -D ${DATA_DIR} \
- -m smart"
- retval=$?
-
- if [ $retval -eq 0 ] ; then
- eend $retval
- return $retval
- fi
-
- ewarn "Shutting down the server gracefully failed."
- ewarn "Probably because some clients did not disconnect within ${NICE_TIMEOUT} seconds."
- else
- ewarn "NICE_QUIT disabled."
- ewarn "You really should have it enabled."
- fi
+ local retries=SIGTERM/${NICE_TIMEOUT}
if [ "${RUDE_QUIT}" != "NO" ] ; then
- ewarn "RUDE_QUIT enabled."
- ewarn "Going to shutdown the server anyway."
-
- su -l postgres \
- -c "env PGPORT=\"${PGPORT}\" ${PG_EXTRA_ENV} \
- /usr/lib/postgresql-9.1/bin/pg_ctl \
- stop ${WAIT_FOR_STOP} -t ${RUDE_TIMEOUT} -s -D ${DATA_DIR} \
- -m fast"
- retval=$?
-
- if [ $retval -eq 0 ] ; then
- eend $retval
- return $retval
- fi
-
- eerror "Failed to shutdown server."
- else
- ewarn "RUDE_QUIT disabled."
+ einfo "RUDE_QUIT enabled."
+ retries="${retries}/SIGINT/${RUDE_TIMEOUT}"
fi
-
if [ "${FORCE_QUIT}" = "YES" ] ; then
- ewarn "FORCE_QUIT enabled."
- ewarn "Forcing server to shutdown."
- ewarn "A recover-run will be executed on the next startup."
-
- su -l postgres \
- -c "env PGPORT=\"${PGPORT}\" ${PG_EXTRA_ENV} \
- /usr/lib/postgresql-9.1/bin/pg_ctl \
- stop ${WAIT_FOR_STOP} -t ${FORCE_TIMEOUT} -s -D ${DATA_DIR} \
- -m immediate"
-
- retval=$?
-
- if [ $retval -eq 0 ] ; then
- ewarn "Server forced down."
- eend $retval
- return $retval
- fi
-
- eerror "Forced shutdown failed!!!"
- eerror "Something is wrong with your system."
- eerror "Please take care of it manually."
- eerror "Unable to stop server."
- eend $retval
- return $retval
- else
- ewarn "FORCE_QUIT disabled."
- eerror "Unable to shutdown server."
- eend 1
- return 1
+ einfo "FORCE_QUIT enabled."
+ ewarn "A recover-run might be executed on next startup."
+ retries="${retries}/SIGQUIT/${FORCE_TIMEOUT}"
fi
-}
-reload() {
- ebegin "Reloading PostgreSQL configuration"
- su -l postgres \
- -c "env PGPORT=\"${PGPORT}\" ${PG_EXTRA_ENV} \
- /usr/lib/postgresql-9.1/bin/pg_ctl \
- reload -s -D ${DATA_DIR}"
- eend $?
+ start-stop-daemon --stop \
+ --exec /usr/lib/postgresql-9.1/bin/postgres \
+ --retry ${retries} \
+ --pidfile ${DATA_DIR}/postmaster.pid
+
+ eend
}
-status() {
+reload() {
ebegin "Reloading PostgreSQL configuration"
- su -l postgres \
- -c "env PGPORT=\"${PGPORT}\" ${PG_EXTRA_ENV} \
- /usr/lib/postgresql-9.1/bin/pg_ctl \
- status -D ${DATA_DIR}"
+ kill -HUP $(head -n1 ${DATA_DIR}/postmaster.pid)
eend $?
}
--- /dev/null
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+opts="${opts} reload"
+
+depend() {
+ use net
+ provide postgresql
+ provide postgresql-9.1
+}
+
+checkconfig() {
+ if [ -z ${DATA_DIR} ] ; then
+ eerror "DATA_DIR not set"
+ eerror "HINT: Did you not 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
+ 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
+ if [ -e /var/run/postgresql/.s.PGSQL.${PGPORT} ] ; then
+ eerror "Socket conflict."
+ eerror "A server is already listening on:"
+ eerror " /var/run/postgresql/.s.PGSQL.${PGPORT}"
+ eerror "HINT: Change PGPORT to listen on a different socket."
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting PostgreSQL"
+
+ if [ -f ${DATA_DIR}/postmaster.pid ] ; then
+ rm -f ${DATA_DIR}/postmaster.pid
+ fi
+
+ local retval
+
+ su -l postgres \
+ -c "env PGPORT=\"${PGPORT}\" ${PG_EXTRA_ENV} \
+ /usr/lib/postgresql-9.1/bin/pg_ctl \
+ start ${WAIT_FOR_START} -t ${START_TIMEOUT} -s -D ${DATA_DIR} \
+ -o '-D ${PGDATA} --data-directory=${DATA_DIR} --silent-mode=true ${PGOPTS}'"
+ 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
+
+ # The following is to catch the case of an already running server
+ # in which pg_ctl doesn't know to which server it connected to and
+ # falsely reports the server as 'up'
+ if [ ! -f ${DATA_DIR}/postmaster.pid ] ; then
+ eerror "The PID file doesn't exist but pg_ctl reported a running server."
+ eerror "Please check whether there is another server running on the same port or read the log-file."
+ eend 1
+ return 1
+ fi
+
+ eend $retval
+}
+
+stop() {
+ ebegin "Stopping PostgreSQL (this can take up to $(( ${NICE_TIMEOUT} + ${RUDE_TIMEOUT} + ${FORCE_TIMEOUT} )) seconds)"
+
+ local retval
+
+ if [ "${NICE_QUIT}" != "NO" ] ; then
+ su -l postgres \
+ -c "env PGPORT=\"${PGPORT}\" ${PG_EXTRA_ENV} \
+ /usr/lib/postgresql-9.1/bin/pg_ctl \
+ stop ${WAIT_FOR_STOP} -t ${NICE_TIMEOUT} -s -D ${DATA_DIR} \
+ -m smart"
+ retval=$?
+
+ if [ $retval -eq 0 ] ; then
+ eend $retval
+ return $retval
+ fi
+
+ ewarn "Shutting down the server gracefully failed."
+ ewarn "Probably because some clients did not disconnect within ${NICE_TIMEOUT} seconds."
+ else
+ ewarn "NICE_QUIT disabled."
+ ewarn "You really should have it enabled."
+ fi
+
+ if [ "${RUDE_QUIT}" != "NO" ] ; then
+ ewarn "RUDE_QUIT enabled."
+ ewarn "Going to shutdown the server anyway."
+
+ su -l postgres \
+ -c "env PGPORT=\"${PGPORT}\" ${PG_EXTRA_ENV} \
+ /usr/lib/postgresql-9.1/bin/pg_ctl \
+ stop ${WAIT_FOR_STOP} -t ${RUDE_TIMEOUT} -s -D ${DATA_DIR} \
+ -m fast"
+ retval=$?
+
+ if [ $retval -eq 0 ] ; then
+ eend $retval
+ return $retval
+ fi
+
+ eerror "Failed to shutdown server."
+ else
+ ewarn "RUDE_QUIT disabled."
+ fi
+
+ if [ "${FORCE_QUIT}" = "YES" ] ; then
+ ewarn "FORCE_QUIT enabled."
+ ewarn "Forcing server to shutdown."
+ ewarn "A recover-run will be executed on the next startup."
+
+ su -l postgres \
+ -c "env PGPORT=\"${PGPORT}\" ${PG_EXTRA_ENV} \
+ /usr/lib/postgresql-9.1/bin/pg_ctl \
+ stop ${WAIT_FOR_STOP} -t ${FORCE_TIMEOUT} -s -D ${DATA_DIR} \
+ -m immediate"
+
+ retval=$?
+
+ if [ $retval -eq 0 ] ; then
+ ewarn "Server forced down."
+ eend $retval
+ return $retval
+ fi
+
+ eerror "Forced shutdown failed!!!"
+ eerror "Something is wrong with your system."
+ eerror "Please take care of it manually."
+ eerror "Unable to stop server."
+ eend $retval
+ return $retval
+ else
+ ewarn "FORCE_QUIT disabled."
+ eerror "Unable to shutdown server."
+ eend 1
+ return 1
+ fi
+}
+
+reload() {
+ ebegin "Reloading PostgreSQL configuration"
+ su -l postgres \
+ -c "env PGPORT=\"${PGPORT}\" ${PG_EXTRA_ENV} \
+ /usr/lib/postgresql-9.1/bin/pg_ctl \
+ reload -s -D ${DATA_DIR}"
+ eend $?
+}
+
+status() {
+ ebegin "Reloading PostgreSQL configuration"
+ su -l postgres \
+ -c "env PGPORT=\"${PGPORT}\" ${PG_EXTRA_ENV} \
+ /usr/lib/postgresql-9.1/bin/pg_ctl \
+ status -D ${DATA_DIR}"
+ eend $?
+}
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
--- /dev/null
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-libs/openslp/files/slpd-init,v 1.4 2007/07/13 13:20:28 uberlord Exp $
+
+depend() {
+ need net
+}
+
+#
+# Does nothing if a route exists that supports multicast traffic.
+# If no routes supporting multicast traffic exists, the function
+# tries to add one. A 0 is returned on success and a 1 on failure.
+# One parameter must be passed in. This variable determins verbosity.
+# If parameter is non-zero debugging will appear.
+#
+multicast_route_set() {
+ PING_OPTIONS_1='-c1 -w1'
+ PING_OPTIONS_2='-c1 -i1'
+ MULTICAST_ADDRESS='239.255.255.253'
+ TMP_FILE=/tmp/route.check
+ PING_ERROR_NO_ROUTE='unreachable'
+
+ MSG_FAILED_TO_FIND='Failed to Detect Multicast Route'
+ MSG_SUCCESS_ON_FIND='Multicast Route Enabled'
+ MSG_ADDING_ROUTE='Attempting to Add Multicast Route ...'
+ MSG_FAILED_TO_ADD=' FAILED - Route NOT Added.'
+ MSG_SUCCES_ON_ADD=' SUCCESS - Route Added.'
+
+ CMD_GET_INTERFACE="netstat -i | awk 'BEGIN{}(NR>2)&&(!/^lo*/){print \$1}'"
+ CMD_ADD_ROUTE="route add -net 224.0.0.0 netmask 240.0.0.0"
+
+ ping $PING_OPTIONS_1 $MULTICAST_ADDRESS 2> $TMP_FILE 1> /dev/null
+ if [ $? = 2 ]; then
+ ping $PING_OPTIONS_2 $MULTICAST_ADDRESS 2> $TMP_FILE 1> /dev/null
+ fi
+
+ grep $PING_ERROR_NO_ROUTE $TMP_FILE > /dev/null 2>&1
+ err_unreachable_found=$?
+
+ #If errors, add route. Otherwise, do nothing
+ if [ -s $TMP_FILE ] && [ $err_unreachable_found = 0 ]; then
+
+ if [ $1 != 0 ]; then
+ echo $MSG_FAILED_TO_FIND
+ echo $MSG_ADDING_ROUTE
+ fi
+
+ $CMD_ADD_ROUTE `eval $CMD_GET_INTERFACE` > /dev/null 2>&1
+ retval=$?
+ if [ $1 != 0 ]; then
+
+ if [ $retval = 0 ]; then
+ echo $MSG_SUCCES_ON_ADD
+ else
+ echo $MSG_FAILED_TO_ADD
+ fi
+ fi
+ else
+ if [ $1 != 0 ]; then
+ echo -n $MSG_SUCCESS_ON_FIND
+ fi
+ retval=0
+ fi
+
+ rm -f $TMP_FILE # Clean up
+ return $retval
+}
+
+checkconfig() {
+ multicast_route_set 0
+ if [ $? -ne 0 ]; then
+ eerror "No route available for multicast traffic!"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting slpd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/slpd --pidfile /var/run/slpd.pid
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping slpd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/slpd.pid
+ eend $?
+}
--- /dev/null
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-libs/openslp/files/slpd-init,v 1.5 2012/02/09 08:19:35 robbat2 Exp $
+
+depend() {
+ need net
+}
+
+#
+# Does nothing if a route exists that supports multicast traffic.
+# If no routes supporting multicast traffic exists, the function
+# tries to add one. A 0 is returned on success and a 1 on failure.
+# One parameter must be passed in. This variable determins verbosity.
+# If parameter is non-zero debugging will appear.
+#
+multicast_route_set() {
+ PING_OPTIONS_1='-c1 -w1'
+ PING_OPTIONS_2='-c1 -i1'
+ MULTICAST_ADDRESS='239.255.255.253'
+ TMP_FILE=/tmp/route.check
+ PING_ERROR_NO_ROUTE='unreachable'
+
+ MSG_FAILED_TO_FIND='Failed to Detect Multicast Route'
+ MSG_SUCCESS_ON_FIND='Multicast Route Enabled'
+ MSG_ADDING_ROUTE='Attempting to Add Multicast Route ...'
+ MSG_FAILED_TO_ADD=' FAILED - Route NOT Added.'
+ MSG_SUCCES_ON_ADD=' SUCCESS - Route Added.'
+
+ CMD_GET_INTERFACE="netstat -i | awk 'BEGIN{}(NR>2)&&(!/^lo*/){print \$1;exit}'"
+ CMD_ADD_ROUTE="route add -net 224.0.0.0 netmask 240.0.0.0"
+
+ ping $PING_OPTIONS_1 $MULTICAST_ADDRESS 2> $TMP_FILE 1> /dev/null
+ if [ $? = 2 ]; then
+ ping $PING_OPTIONS_2 $MULTICAST_ADDRESS 2> $TMP_FILE 1> /dev/null
+ fi
+
+ grep $PING_ERROR_NO_ROUTE $TMP_FILE > /dev/null 2>&1
+ err_unreachable_found=$?
+
+ #If errors, add route. Otherwise, do nothing
+ if [ -s $TMP_FILE ] && [ $err_unreachable_found = 0 ]; then
+
+ if [ $1 != 0 ]; then
+ echo $MSG_FAILED_TO_FIND
+ echo $MSG_ADDING_ROUTE
+ fi
+
+ $CMD_ADD_ROUTE `eval $CMD_GET_INTERFACE` > /dev/null 2>&1
+ retval=$?
+ if [ $1 != 0 ]; then
+
+ if [ $retval = 0 ]; then
+ echo $MSG_SUCCES_ON_ADD
+ else
+ echo $MSG_FAILED_TO_ADD
+ fi
+ fi
+ else
+ if [ $1 != 0 ]; then
+ echo -n $MSG_SUCCESS_ON_FIND
+ fi
+ retval=0
+ fi
+
+ rm -f $TMP_FILE # Clean up
+ return $retval
+}
+
+checkconfig() {
+ multicast_route_set 0
+ if [ $? -ne 0 ]; then
+ eerror "No route available for multicast traffic!"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting slpd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/slpd --pidfile /var/run/slpd.pid
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping slpd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/slpd.pid
+ eend $?
+}
COLON_SEPARATED=QT_PLUGIN_PATH
QT_PLUGIN_PATH=/usr/lib64/kde4/plugins
+LDPATH="/usr/lib64/kde4"
+++ /dev/null
-postgres_ebuilds="${postgres_ebuilds} postgresql-base-9.1.4"
+++ /dev/null
-postgres_ebuilds="${postgres_ebuilds} postgresql-docs-9.1.4"
+++ /dev/null
-postgres_ebuilds="${postgres_ebuilds} postgresql-server-9.1.4"
-postgres_ebuilds="${postgres_ebuilds} postgresql-base-9.1.3"
+postgres_ebuilds="${postgres_ebuilds} postgresql-base-9.1.4"
-postgres_ebuilds="${postgres_ebuilds} postgresql-docs-9.1.3"
+postgres_ebuilds="${postgres_ebuilds} postgresql-docs-9.1.4"
-postgres_ebuilds="${postgres_ebuilds} postgresql-server-9.1.3"
+postgres_ebuilds="${postgres_ebuilds} postgresql-server-9.1.4"
+++ /dev/null
-#!/sbin/runscript
-# 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.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_ARGS}"
-start_stop_daemon_args="--quiet"
-description="Daemon for Advanced Configuration and Power Interface"
-
-depend() {
- need localmount
- use logger
-}
-
-reload() {
- ebegin "Reloading acpid configuration"
- start-stop-daemon --exec $command --signal HUP
- eend $?
-}
+++ /dev/null
-#!/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:=/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 $?
-}
+++ /dev/null
-#!/sbin/runscript
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-libs/openslp/files/slpd-init,v 1.5 2012/02/09 08:19:35 robbat2 Exp $
-
-depend() {
- need net
-}
-
-#
-# Does nothing if a route exists that supports multicast traffic.
-# If no routes supporting multicast traffic exists, the function
-# tries to add one. A 0 is returned on success and a 1 on failure.
-# One parameter must be passed in. This variable determins verbosity.
-# If parameter is non-zero debugging will appear.
-#
-multicast_route_set() {
- PING_OPTIONS_1='-c1 -w1'
- PING_OPTIONS_2='-c1 -i1'
- MULTICAST_ADDRESS='239.255.255.253'
- TMP_FILE=/tmp/route.check
- PING_ERROR_NO_ROUTE='unreachable'
-
- MSG_FAILED_TO_FIND='Failed to Detect Multicast Route'
- MSG_SUCCESS_ON_FIND='Multicast Route Enabled'
- MSG_ADDING_ROUTE='Attempting to Add Multicast Route ...'
- MSG_FAILED_TO_ADD=' FAILED - Route NOT Added.'
- MSG_SUCCES_ON_ADD=' SUCCESS - Route Added.'
-
- CMD_GET_INTERFACE="netstat -i | awk 'BEGIN{}(NR>2)&&(!/^lo*/){print \$1;exit}'"
- CMD_ADD_ROUTE="route add -net 224.0.0.0 netmask 240.0.0.0"
-
- ping $PING_OPTIONS_1 $MULTICAST_ADDRESS 2> $TMP_FILE 1> /dev/null
- if [ $? = 2 ]; then
- ping $PING_OPTIONS_2 $MULTICAST_ADDRESS 2> $TMP_FILE 1> /dev/null
- fi
-
- grep $PING_ERROR_NO_ROUTE $TMP_FILE > /dev/null 2>&1
- err_unreachable_found=$?
-
- #If errors, add route. Otherwise, do nothing
- if [ -s $TMP_FILE ] && [ $err_unreachable_found = 0 ]; then
-
- if [ $1 != 0 ]; then
- echo $MSG_FAILED_TO_FIND
- echo $MSG_ADDING_ROUTE
- fi
-
- $CMD_ADD_ROUTE `eval $CMD_GET_INTERFACE` > /dev/null 2>&1
- retval=$?
- if [ $1 != 0 ]; then
-
- if [ $retval = 0 ]; then
- echo $MSG_SUCCES_ON_ADD
- else
- echo $MSG_FAILED_TO_ADD
- fi
- fi
- else
- if [ $1 != 0 ]; then
- echo -n $MSG_SUCCESS_ON_FIND
- fi
- retval=0
- fi
-
- rm -f $TMP_FILE # Clean up
- return $retval
-}
-
-checkconfig() {
- multicast_route_set 0
- if [ $? -ne 0 ]; then
- eerror "No route available for multicast traffic!"
- return 1
- fi
-}
-
-start() {
- checkconfig || return 1
- ebegin "Starting slpd"
- start-stop-daemon --start --quiet --exec /usr/sbin/slpd --pidfile /var/run/slpd.pid
- eend $?
-}
-
-stop() {
- ebegin "Stopping slpd"
- start-stop-daemon --stop --quiet --pidfile /var/run/slpd.pid
- eend $?
-}
#!/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"
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
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
#!/sbin/runscript
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-libs/openslp/files/slpd-init,v 1.4 2007/07/13 13:20:28 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-libs/openslp/files/slpd-init,v 1.5 2012/02/09 08:19:35 robbat2 Exp $
depend() {
need net
MSG_FAILED_TO_ADD=' FAILED - Route NOT Added.'
MSG_SUCCES_ON_ADD=' SUCCESS - Route Added.'
- CMD_GET_INTERFACE="netstat -i | awk 'BEGIN{}(NR>2)&&(!/^lo*/){print \$1}'"
+ CMD_GET_INTERFACE="netstat -i | awk 'BEGIN{}(NR>2)&&(!/^lo*/){print \$1;exit}'"
CMD_ADD_ROUTE="route add -net 224.0.0.0 netmask 240.0.0.0"
ping $PING_OPTIONS_1 $MULTICAST_ADDRESS 2> $TMP_FILE 1> /dev/null
/usr/lib64/postgresql-9.1/lib64/
/usr/lib64/sidplay/builders
/usr/lib/sidplay/builders
+/usr/lib64/kde4
/usr/games/lib64
/usr/games/lib32
/usr/games/lib