From 5b26c9a4c1532d60f03520e71818aa3b8ea2e017 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Sun, 26 Feb 2012 09:24:19 +0100 Subject: [PATCH] Current state --- ImageMagick/delegates.xml | 10 +- ImageMagick/policy.xml | 6 +- conf.d/postgresql-9.1 | 39 ++-- config-archive/etc/ImageMagick/delegates.xml | 112 ++++++++++ .../etc/ImageMagick/delegates.xml.dist | 0 config-archive/etc/ImageMagick/policy.xml | 57 ++++++ .../etc/ImageMagick/policy.xml.dist | 0 config-archive/etc/conf.d/postgresql-9.1 | 63 ++++++ .../etc/conf.d/postgresql-9.1.dist | 0 .../etc/eselect/postgresql/slots/9.1/base | 1 + .../eselect/postgresql/slots/9.1/base.dist | 0 .../etc/eselect/postgresql/slots/9.1/docs | 1 + .../eselect/postgresql/slots/9.1/docs.dist | 0 .../etc/eselect/postgresql/slots/9.1/server | 1 + .../eselect/postgresql/slots/9.1/server.dist | 0 config-archive/etc/init.d/net.lo | 98 +++++---- .../etc/init.d/net.lo.1 | 96 ++++----- config-archive/etc/init.d/net.lo.dist | 2 +- config-archive/etc/init.d/postgresql-9.1 | 192 ++++++++++++++++++ .../etc/init.d/postgresql-9.1.dist | 0 config-archive/etc/init.d/sysfs | 42 ++++ .../etc/init.d/sysfs.1 | 40 ---- config-archive/etc/init.d/sysfs.dist | 8 +- config-archive/etc/ldap.conf.sudo | 5 + .../etc/ldap.conf.sudo.dist | 0 config-archive/etc/mysql/my.cnf | 149 ++++++++++++++ .../etc/mysql/my.cnf.dist | 0 .../xfce4-keyboard-shortcuts.xml | 69 +++++++ .../xfce4-keyboard-shortcuts.xml.dist | 0 cups/printers.conf | 2 +- cups/printers.conf.O | 2 +- cups/subscriptions.conf | 12 +- cups/subscriptions.conf.O | 12 +- eselect/postgresql/slots/9.1/base | 2 +- eselect/postgresql/slots/9.1/docs | 2 +- eselect/postgresql/slots/9.1/server | 2 +- init.d/net.lo | 2 +- init.d/postgresql-9.1 | 171 ++++++---------- init.d/sysfs | 8 +- ldap.conf.sudo | 9 +- mysql/my.cnf | 3 +- postfix/main.cf | 2 +- syslog-ng/syslog-ng.conf | 14 +- .../xfce4-keyboard-shortcuts.xml | 2 + 44 files changed, 916 insertions(+), 320 deletions(-) create mode 100644 config-archive/etc/ImageMagick/delegates.xml rename ImageMagick/._cfg0000_delegates.xml => config-archive/etc/ImageMagick/delegates.xml.dist (100%) create mode 100644 config-archive/etc/ImageMagick/policy.xml rename ImageMagick/._cfg0000_policy.xml => config-archive/etc/ImageMagick/policy.xml.dist (100%) create mode 100644 config-archive/etc/conf.d/postgresql-9.1 rename conf.d/._cfg0000_postgresql-9.1 => config-archive/etc/conf.d/postgresql-9.1.dist (100%) create mode 100644 config-archive/etc/eselect/postgresql/slots/9.1/base rename eselect/postgresql/slots/9.1/._cfg0000_base => config-archive/etc/eselect/postgresql/slots/9.1/base.dist (100%) create mode 100644 config-archive/etc/eselect/postgresql/slots/9.1/docs rename eselect/postgresql/slots/9.1/._cfg0000_docs => config-archive/etc/eselect/postgresql/slots/9.1/docs.dist (100%) create mode 100644 config-archive/etc/eselect/postgresql/slots/9.1/server rename eselect/postgresql/slots/9.1/._cfg0000_server => config-archive/etc/eselect/postgresql/slots/9.1/server.dist (100%) rename init.d/._cfg0000_net.lo => config-archive/etc/init.d/net.lo.1 (90%) 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%) rename init.d/._cfg0000_sysfs => config-archive/etc/init.d/sysfs.1 (54%) create mode 100644 config-archive/etc/ldap.conf.sudo rename ._cfg0000_ldap.conf.sudo => config-archive/etc/ldap.conf.sudo.dist (100%) create mode 100644 config-archive/etc/mysql/my.cnf rename mysql/._cfg0000_my.cnf => config-archive/etc/mysql/my.cnf.dist (100%) create mode 100644 config-archive/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml rename xdg/xfce4/xfconf/xfce-perchannel-xml/._cfg0000_xfce4-keyboard-shortcuts.xml => config-archive/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml.dist (100%) diff --git a/ImageMagick/delegates.xml b/ImageMagick/delegates.xml index db829d8e..3870f06d 100644 --- a/ImageMagick/delegates.xml +++ b/ImageMagick/delegates.xml @@ -80,14 +80,14 @@ - + - + - + @@ -100,11 +100,11 @@ - + - + diff --git a/ImageMagick/policy.xml b/ImageMagick/policy.xml index 28eda178..19e97962 100644 --- a/ImageMagick/policy.xml +++ b/ImageMagick/policy.xml @@ -37,7 +37,7 @@ Any large image is cached to disk rather than memory: - + Note, resource policies are maximums for each instance of ImageMagick (e.g. policy memory limit 1GB, -limit 2GB exceeds policy maximum so memory limit @@ -48,8 +48,8 @@ - - + + diff --git a/conf.d/postgresql-9.1 b/conf.d/postgresql-9.1 index 5bdd3d59..54cf5cc7 100644 --- a/conf.d/postgresql-9.1 +++ b/conf.d/postgresql-9.1 @@ -1,29 +1,23 @@ # Which port and socket to bind PostgreSQL PGPORT="5432" -# Allow *_TIMEOUT to run its course. -# Disable timeouts by changing to '-W' (capital W) -WAIT_FOR_START="-w" -WAIT_FOR_STOP="-w" - # How long to wait for server to start in seconds -START_TIMEOUT=60 +START_TIMEOUT=10 -# Ignore new connections and wait for clients to disconnect from server before -# shutting down. -# Set NICE_QUIT to "NO" to disable. NICE_TIMEOUT in seconds. -NICE_QUIT="YES" +# NICE_QUIT ignores new connections and wait for clients to disconnect from +# server before shutting down. NICE_TIMEOUT in seconds determines how long to +# wait for this to succeed. NICE_TIMEOUT=60 # Forecfully disconnect clients from server and shut down. This is performed -# after NICE_QUIT. Terminating a client results in a rollback of open -# transactions for that client. +# after NICE_QUIT. Terminated client connections have their open transactions +# rolled back. # Set RUDE_QUIT to "NO" to disable. RUDE_TIMEOUT in seconds. RUDE_QUIT="YES" RUDE_TIMEOUT=30 # If the server still fails to shutdown, you can force it to quit by setting -# this to yes and a recover-run will execute on the next startup. +# this to YES and a recover-run will execute on the next startup. # Set FORCE_QUIT to "YES" to enable. FORCE_TIMEOUT in seconds. FORCE_QUIT="NO" FORCE_TIMEOUT=2 @@ -31,24 +25,25 @@ FORCE_TIMEOUT=2 # Extra options to run postmaster with, e.g.: # -N is the maximal number of client connections # -B is the number of shared buffers and has to be at least 2x the value for -N -# Please read the man-page to postmaster for more options. Many of -# these options can be set directly in the configuration file. +# Please read the man-page to postmaster for more options. Many of these +# options can be set directly in the configuration file. #PGOPTS="-N 512 -B 1024" -# Pass extra environment variables. If you have to export environment -# variables for the database process, this can be done here. +# Pass extra environment variables. If you have to export environment variables +# for the database process, this can be done here. # Don't forget to escape quotes. #PG_EXTRA_ENV="PGPASSFILE=\"/path/to/.pgpass\"" ############################################################################## # # The following values should not be arbitrarily changed. -# emerge --config dev-db/postgresql-server:9.1 uses these values to +# +# `emerge --config dev-db/postgresql-server:9.1' uses these values to # determine where to create the data directory, where to place the -# configuration files and any additional options you'd like to pass to initdb. +# configuration files, and any additional options to pass to initdb. # -# The init script also uses these variables to inform pg_ctl where to find -# the same data and configuration files. +# The initscript also uses these variables to inform PostgreSQL where to find +# its data directory and configuration files. # ############################################################################## @@ -59,5 +54,5 @@ PGDATA="/etc/postgresql-9.1/" DATA_DIR="/var/lib/postgresql/9.1/data" # Additional options to pass to initdb. -# See 'man initdb' for available options. +# See `man initdb' for available options. #PG_INITDB_OPTS="--locale=en_US.UTF-8" diff --git a/config-archive/etc/ImageMagick/delegates.xml b/config-archive/etc/ImageMagick/delegates.xml new file mode 100644 index 00000000..db829d8e --- /dev/null +++ b/config-archive/etc/ImageMagick/delegates.xml @@ -0,0 +1,112 @@ + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ImageMagick/._cfg0000_delegates.xml b/config-archive/etc/ImageMagick/delegates.xml.dist similarity index 100% rename from ImageMagick/._cfg0000_delegates.xml rename to config-archive/etc/ImageMagick/delegates.xml.dist diff --git a/config-archive/etc/ImageMagick/policy.xml b/config-archive/etc/ImageMagick/policy.xml new file mode 100644 index 00000000..28eda178 --- /dev/null +++ b/config-archive/etc/ImageMagick/policy.xml @@ -0,0 +1,57 @@ + + + + + + + + +]> + + + + + + + + + + + + + diff --git a/ImageMagick/._cfg0000_policy.xml b/config-archive/etc/ImageMagick/policy.xml.dist similarity index 100% rename from ImageMagick/._cfg0000_policy.xml rename to config-archive/etc/ImageMagick/policy.xml.dist diff --git a/config-archive/etc/conf.d/postgresql-9.1 b/config-archive/etc/conf.d/postgresql-9.1 new file mode 100644 index 00000000..5bdd3d59 --- /dev/null +++ b/config-archive/etc/conf.d/postgresql-9.1 @@ -0,0 +1,63 @@ +# Which port and socket to bind PostgreSQL +PGPORT="5432" + +# Allow *_TIMEOUT to run its course. +# Disable timeouts by changing to '-W' (capital W) +WAIT_FOR_START="-w" +WAIT_FOR_STOP="-w" + +# How long to wait for server to start in seconds +START_TIMEOUT=60 + +# Ignore new connections and wait for clients to disconnect from server before +# shutting down. +# Set NICE_QUIT to "NO" to disable. NICE_TIMEOUT in seconds. +NICE_QUIT="YES" +NICE_TIMEOUT=60 + +# Forecfully disconnect clients from server and shut down. This is performed +# after NICE_QUIT. Terminating a client results in a rollback of open +# transactions for that client. +# Set RUDE_QUIT to "NO" to disable. RUDE_TIMEOUT in seconds. +RUDE_QUIT="YES" +RUDE_TIMEOUT=30 + +# If the server still fails to shutdown, you can force it to quit by setting +# this to yes and a recover-run will execute on the next startup. +# Set FORCE_QUIT to "YES" to enable. FORCE_TIMEOUT in seconds. +FORCE_QUIT="NO" +FORCE_TIMEOUT=2 + +# Extra options to run postmaster with, e.g.: +# -N is the maximal number of client connections +# -B is the number of shared buffers and has to be at least 2x the value for -N +# Please read the man-page to postmaster for more options. Many of +# these options can be set directly in the configuration file. +#PGOPTS="-N 512 -B 1024" + +# Pass extra environment variables. If you have to export environment +# variables for the database process, this can be done here. +# Don't forget to escape quotes. +#PG_EXTRA_ENV="PGPASSFILE=\"/path/to/.pgpass\"" + +############################################################################## +# +# The following values should not be arbitrarily changed. +# emerge --config dev-db/postgresql-server:9.1 uses these values to +# determine where to create the data directory, where to place the +# configuration files and any additional options you'd like to pass to initdb. +# +# The init script also uses these variables to inform pg_ctl where to find +# the same data and configuration files. +# +############################################################################## + +# Location of configuration files +PGDATA="/etc/postgresql-9.1/" + +# Where the data directory is located/to be created +DATA_DIR="/var/lib/postgresql/9.1/data" + +# Additional options to pass to initdb. +# See 'man initdb' for available options. +#PG_INITDB_OPTS="--locale=en_US.UTF-8" diff --git a/conf.d/._cfg0000_postgresql-9.1 b/config-archive/etc/conf.d/postgresql-9.1.dist similarity index 100% rename from conf.d/._cfg0000_postgresql-9.1 rename to config-archive/etc/conf.d/postgresql-9.1.dist diff --git a/config-archive/etc/eselect/postgresql/slots/9.1/base b/config-archive/etc/eselect/postgresql/slots/9.1/base new file mode 100644 index 00000000..25e967a5 --- /dev/null +++ b/config-archive/etc/eselect/postgresql/slots/9.1/base @@ -0,0 +1 @@ +postgres_ebuilds="${postgres_ebuilds} postgresql-base-9.1.1" diff --git a/eselect/postgresql/slots/9.1/._cfg0000_base b/config-archive/etc/eselect/postgresql/slots/9.1/base.dist similarity index 100% rename from eselect/postgresql/slots/9.1/._cfg0000_base rename to config-archive/etc/eselect/postgresql/slots/9.1/base.dist diff --git a/config-archive/etc/eselect/postgresql/slots/9.1/docs b/config-archive/etc/eselect/postgresql/slots/9.1/docs new file mode 100644 index 00000000..133932cf --- /dev/null +++ b/config-archive/etc/eselect/postgresql/slots/9.1/docs @@ -0,0 +1 @@ +postgres_ebuilds="${postgres_ebuilds} postgresql-docs-9.1.1" diff --git a/eselect/postgresql/slots/9.1/._cfg0000_docs b/config-archive/etc/eselect/postgresql/slots/9.1/docs.dist similarity index 100% rename from eselect/postgresql/slots/9.1/._cfg0000_docs rename to config-archive/etc/eselect/postgresql/slots/9.1/docs.dist diff --git a/config-archive/etc/eselect/postgresql/slots/9.1/server b/config-archive/etc/eselect/postgresql/slots/9.1/server new file mode 100644 index 00000000..cc2c76ba --- /dev/null +++ b/config-archive/etc/eselect/postgresql/slots/9.1/server @@ -0,0 +1 @@ +postgres_ebuilds="${postgres_ebuilds} postgresql-server-9.1.1" diff --git a/eselect/postgresql/slots/9.1/._cfg0000_server b/config-archive/etc/eselect/postgresql/slots/9.1/server.dist similarity index 100% rename from eselect/postgresql/slots/9.1/._cfg0000_server rename to config-archive/etc/eselect/postgresql/slots/9.1/server.dist diff --git a/config-archive/etc/init.d/net.lo b/config-archive/etc/init.d/net.lo index 6f8b5b10..23143639 100755 --- a/config-archive/etc/init.d/net.lo +++ b/config-archive/etc/init.d/net.lo @@ -21,11 +21,11 @@ depend() need localmount after bootmisc provide net - keyword -jail -prefix -vserver + keyword -shutdown -jail -prefix -vserver case "${IFACE}" in lo|lo0);; - *) after net.lo net.lo0;; + *) after net.lo net.lo0 dbus;; esac if [ "$(command -v "depend_${IFVAR}")" = "depend_${IFVAR}" ]; then @@ -115,7 +115,7 @@ _wait_for_carrier() eend 0 return 0 fi - timeout=$((${timeout} - 1)) + : $(( timeout -= 1 )) [ "${efunc}" = "einfon" ] && printf "." done @@ -144,9 +144,9 @@ _netmask2cidr() local i= len= local IFS=. for i in $1; do - while [ ${i} != "0" ]; do - len=$((${len} + ${i} % 2)) - i=$((${i} >> 1)) + while [ ${i} -ne 0 ]; do + : $(( len += i % 2 )) + : $(( i >>= 1 )) done done @@ -169,6 +169,36 @@ _configure_variables() done } +_which() +{ + local i OIFS + # Empty + [ -z "$1" ] && return + # check paths + OIFS="$IFS" + IFS=: + for i in $PATH ; do + [ -x $i/$1 ] && echo $i/$1 && break + done + IFS=$OIFS +} + +# Like _which, but also consider shell builtins, and multiple alternatives +_program_available() +{ + [ -z "$1" ] && return 0 + local x= + for x; do + case "${x}" in + /*) [ -x "${x}" ] && break;; + *) type "${x}" >/dev/null 2>&1 && break;; + esac + unset x + done + [ -n "${x}" ] && echo $x && return 0 + return 1 +} + _show_address() { einfo "received address $(_get_inet_address "${IFACE}")" @@ -277,7 +307,7 @@ _gen_module_list() echo "module_${i}_program_start='${PROGRAM_START}'" >> "${MODULESLIST}" echo "module_${i}_program_stop='${PROGRAM_STOP}'" >> "${MODULESLIST}" echo "module_${i}_provide='${PROVIDE}'" >> "${MODULESLIST}" - i=$((${i} + 1)) + : $(( i += 1 )) done echo "module_${i}=" >> "${MODULESLIST}" ) @@ -304,18 +334,17 @@ _load_modules() local i=-1 x= mod= f= provides= while true; do - i=$((${i} + 1)) + : $(( i += 1 )) eval mod=\$module_${i} [ -z "${mod}" ] && break [ -e "${MODULESDIR}/${mod}.sh" ] || continue eval set -- \$module_${i}_program if [ -n "$1" ]; then - x= - for x; do - [ -x "${x}" ] && break - done - [ -x "${x}" ] || continue + if ! _program_available "$@" >/dev/null; then + vewarn "Skipping module $mod due to missing program: $@" + continue + fi fi if ${starting}; then eval set -- \$module_${i}_program_start @@ -323,15 +352,10 @@ _load_modules() eval set -- \$module_${i}_program_stop fi if [ -n "$1" ]; then - x= - for x; do - case "${x}" in - /*) [ -x "${x}" ] && break;; - *) type "${x}" >/dev/null 2>&1 && break;; - esac - unset x - done - [ -n "${x}" ] || continue + if ! _program_available "$@" >/dev/null; then + vewarn "Skipping module $mod due to missing program: $@" + continue + fi fi eval provides=\$module_${i}_provide @@ -407,16 +431,18 @@ _load_config() set -- ${config} # We should support a space separated array for cidr configs + # But only as long as they do not contain other parameters for the address if [ $# = 1 ]; then unset IFS set -- ${config} # Of course, we may have a single address added old style. - case "$2" in - netmask|broadcast|brd|brd+|peer|pointopoint) - local IFS="$__IFS" - set -- ${config} - ;; - esac + # If the NEXT argument is a v4 or v6 address, it's the next config. + # Otherwise, it's arguments to the first config... + if [ "${2#*.*}" = "${2}" -a "${2#*:*}" = "${2}" ]; then + # Not an IPv4/IPv6 + local IFS="$__IFS" + set -- ${config} + fi fi # Ensure that loopback has the correct address @@ -438,7 +464,7 @@ _load_config() # so modules can influence it for cmd; do eval config_${config_index}="'${cmd}'" - config_index=$((${config_index} + 1)) + : $(( config_index += 1 )) done # Terminate the list eval config_${config_index}= @@ -446,7 +472,7 @@ _load_config() config_index=0 for cmd in ${fallback}; do eval fallback_${config_index}="'${cmd}'" - config_index=$((${config_index} + 1)) + : $(( config_index += 1 )) done # Terminate the list eval fallback_${config_index}= @@ -488,7 +514,9 @@ start() { local IFACE=${RC_SVCNAME#*.} oneworked=false fallback=false module= local IFVAR=$(shell_var "${IFACE}") cmd= our_metric= - local metric=0 + local metric=0 _up_before_preup + eval _up_before_preup="\$up_before_preup_${IFVAR}" + [ -z "${_up_before_preup}" ] && _up_before_preup=$up_before_preup einfo "Bringing up interface ${IFACE}" eindent @@ -502,7 +530,7 @@ start() # available in preup and afterwards incase the user inadvertently # brings it down if [ "$(command -v preup)" = "preup" ]; then - _up 2>/dev/null + yesno "${_up_before_preup:-yes}" && _up 2>/dev/null ebegin "Running preup" eindent preup || return 1 @@ -541,7 +569,7 @@ start() if [ -n "${our_metric}" ]; then metric=${our_metric} elif [ "${IFACE}" != "lo" -a "${IFACE}" != "lo0" ]; then - metric=$((${metric} + $(_ifindex))) + : $(( metric += $(_ifindex) )) fi while true; do @@ -581,11 +609,11 @@ start() eindent eval config_${config_index}=\$config unset fallback_${config_index} - config_index=$((${config_index} - 1)) + : $(( config_index -= 1 )) fi fi eoutdent - config_index=$((${config_index} + 1)) + : $(( config_index += 1 )) done if ! ${oneworked}; then diff --git a/init.d/._cfg0000_net.lo b/config-archive/etc/init.d/net.lo.1 similarity index 90% rename from init.d/._cfg0000_net.lo rename to config-archive/etc/init.d/net.lo.1 index a9040a38..6f8b5b10 100755 --- a/init.d/._cfg0000_net.lo +++ b/config-archive/etc/init.d/net.lo.1 @@ -25,7 +25,7 @@ depend() case "${IFACE}" in lo|lo0);; - *) after net.lo net.lo0 dbus;; + *) after net.lo net.lo0;; esac if [ "$(command -v "depend_${IFVAR}")" = "depend_${IFVAR}" ]; then @@ -115,7 +115,7 @@ _wait_for_carrier() eend 0 return 0 fi - : $(( timeout -= 1 )) + timeout=$((${timeout} - 1)) [ "${efunc}" = "einfon" ] && printf "." done @@ -144,9 +144,9 @@ _netmask2cidr() local i= len= local IFS=. for i in $1; do - while [ ${i} -ne 0 ]; do - : $(( len += i % 2 )) - : $(( i >>= 1 )) + while [ ${i} != "0" ]; do + len=$((${len} + ${i} % 2)) + i=$((${i} >> 1)) done done @@ -169,36 +169,6 @@ _configure_variables() done } -_which() -{ - local i OIFS - # Empty - [ -z "$1" ] && return - # check paths - OIFS="$IFS" - IFS=: - for i in $PATH ; do - [ -x $i/$1 ] && echo $i/$1 && break - done - IFS=$OIFS -} - -# Like _which, but also consider shell builtins, and multiple alternatives -_program_available() -{ - [ -z "$1" ] && return 0 - local x= - for x; do - case "${x}" in - /*) [ -x "${x}" ] && break;; - *) type "${x}" >/dev/null 2>&1 && break;; - esac - unset x - done - [ -n "${x}" ] && echo $x && return 0 - return 1 -} - _show_address() { einfo "received address $(_get_inet_address "${IFACE}")" @@ -307,7 +277,7 @@ _gen_module_list() echo "module_${i}_program_start='${PROGRAM_START}'" >> "${MODULESLIST}" echo "module_${i}_program_stop='${PROGRAM_STOP}'" >> "${MODULESLIST}" echo "module_${i}_provide='${PROVIDE}'" >> "${MODULESLIST}" - : $(( i += 1 )) + i=$((${i} + 1)) done echo "module_${i}=" >> "${MODULESLIST}" ) @@ -334,17 +304,18 @@ _load_modules() local i=-1 x= mod= f= provides= while true; do - : $(( i += 1 )) + i=$((${i} + 1)) eval mod=\$module_${i} [ -z "${mod}" ] && break [ -e "${MODULESDIR}/${mod}.sh" ] || continue eval set -- \$module_${i}_program if [ -n "$1" ]; then - if ! _program_available "$@" >/dev/null; then - vewarn "Skipping module $mod due to missing program: $@" - continue - fi + x= + for x; do + [ -x "${x}" ] && break + done + [ -x "${x}" ] || continue fi if ${starting}; then eval set -- \$module_${i}_program_start @@ -352,10 +323,15 @@ _load_modules() eval set -- \$module_${i}_program_stop fi if [ -n "$1" ]; then - if ! _program_available "$@" >/dev/null; then - vewarn "Skipping module $mod due to missing program: $@" - continue - fi + x= + for x; do + case "${x}" in + /*) [ -x "${x}" ] && break;; + *) type "${x}" >/dev/null 2>&1 && break;; + esac + unset x + done + [ -n "${x}" ] || continue fi eval provides=\$module_${i}_provide @@ -431,18 +407,16 @@ _load_config() set -- ${config} # We should support a space separated array for cidr configs - # But only as long as they do not contain other parameters for the address if [ $# = 1 ]; then unset IFS set -- ${config} # Of course, we may have a single address added old style. - # If the NEXT argument is a v4 or v6 address, it's the next config. - # Otherwise, it's arguments to the first config... - if [ "${2#*.*}" = "${2}" -a "${2#*:*}" = "${2}" ]; then - # Not an IPv4/IPv6 - local IFS="$__IFS" - set -- ${config} - fi + case "$2" in + netmask|broadcast|brd|brd+|peer|pointopoint) + local IFS="$__IFS" + set -- ${config} + ;; + esac fi # Ensure that loopback has the correct address @@ -464,7 +438,7 @@ _load_config() # so modules can influence it for cmd; do eval config_${config_index}="'${cmd}'" - : $(( config_index += 1 )) + config_index=$((${config_index} + 1)) done # Terminate the list eval config_${config_index}= @@ -472,7 +446,7 @@ _load_config() config_index=0 for cmd in ${fallback}; do eval fallback_${config_index}="'${cmd}'" - : $(( config_index += 1 )) + config_index=$((${config_index} + 1)) done # Terminate the list eval fallback_${config_index}= @@ -514,9 +488,7 @@ start() { local IFACE=${RC_SVCNAME#*.} oneworked=false fallback=false module= local IFVAR=$(shell_var "${IFACE}") cmd= our_metric= - local metric=0 _up_before_preup - eval _up_before_preup="\$up_before_preup_${IFVAR}" - [ -z "${_up_before_preup}" ] && _up_before_preup=$up_before_preup + local metric=0 einfo "Bringing up interface ${IFACE}" eindent @@ -530,7 +502,7 @@ start() # available in preup and afterwards incase the user inadvertently # brings it down if [ "$(command -v preup)" = "preup" ]; then - yesno "${_up_before_preup:-yes}" && _up 2>/dev/null + _up 2>/dev/null ebegin "Running preup" eindent preup || return 1 @@ -569,7 +541,7 @@ start() if [ -n "${our_metric}" ]; then metric=${our_metric} elif [ "${IFACE}" != "lo" -a "${IFACE}" != "lo0" ]; then - : $(( metric += $(_ifindex) )) + metric=$((${metric} + $(_ifindex))) fi while true; do @@ -609,11 +581,11 @@ start() eindent eval config_${config_index}=\$config unset fallback_${config_index} - : $(( config_index -= 1 )) + config_index=$((${config_index} - 1)) fi fi eoutdent - : $(( config_index += 1 )) + config_index=$((${config_index} + 1)) done if ! ${oneworked}; then diff --git a/config-archive/etc/init.d/net.lo.dist b/config-archive/etc/init.d/net.lo.dist index 23143639..a9040a38 100755 --- a/config-archive/etc/init.d/net.lo.dist +++ b/config-archive/etc/init.d/net.lo.dist @@ -21,7 +21,7 @@ depend() need localmount after bootmisc provide net - keyword -shutdown -jail -prefix -vserver + keyword -jail -prefix -vserver case "${IFACE}" in lo|lo0);; 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 00000000..a5051a33 --- /dev/null +++ b/config-archive/etc/init.d/postgresql-9.1 @@ -0,0 +1,192 @@ +#!/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 $? +} 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/config-archive/etc/init.d/sysfs b/config-archive/etc/init.d/sysfs index 2433d847..dd3fc0ee 100755 --- a/config-archive/etc/init.d/sysfs +++ b/config-archive/etc/init.d/sysfs @@ -50,6 +50,43 @@ mount_misc() eend $? fi fi + + # Setup Kernel Support for configfs + if [ -d /sys/kernel/config ] && ! mountinfo -q /sys/kernel/config; then + if grep -qs configfs /proc/filesystems; then + ebegin "Mounting config filesystem" + mount -n -t configfs -o nodev,noexec,nosuid \ + configfs /sys/kernel/config + eend $? + fi + fi + + # set up kernel support for cgroups + if [ -d /sys/fs/cgroup ] && ! mountinfo -q /sys/fs/cgroup; then + if grep -qs cgroup /proc/filesystems; then + ebegin "Mounting cgroup filesystem" + local opts="nodev,noexec,nosuid,mode=755,size=${rc_cgroupsize:-10m}" + mount -n -t tmpfs -o ${opts} cgroup_root /sys/fs/cgroup + eend $? + fi + fi +} + +mount_cgroups() +{ + yesno ${rc_cgroups:-YES} || return 0 + if [ ! -e /proc/cgroups ]; then + return 0 + fi + + while read name hier groups enabled rest; do + case "${enabled}" in + 1) mkdir /sys/fs/cgroup/${name} + mount -t cgroup -o nodev,noexec,nosuid,${name} \ + ${name} /sys/fs/cgroup/${name} + ;; + esac + done < /proc/cgroups } start() @@ -59,6 +96,11 @@ start() retval=$? if [ $retval -eq 0 ]; then mount_misc + retval=$? + fi + if [ $retval -eq 0 ]; then + mount_cgroups + retval=$? fi return $retval } diff --git a/init.d/._cfg0000_sysfs b/config-archive/etc/init.d/sysfs.1 similarity index 54% rename from init.d/._cfg0000_sysfs rename to config-archive/etc/init.d/sysfs.1 index 50c98a98..2433d847 100755 --- a/init.d/._cfg0000_sysfs +++ b/config-archive/etc/init.d/sysfs.1 @@ -50,41 +50,6 @@ mount_misc() eend $? fi fi - - # Setup Kernel Support for configfs - if [ -d /sys/kernel/config ] && ! mountinfo -q /sys/kernel/config; then - if grep -qs configfs /proc/filesystems; then - ebegin "Mounting config filesystem" - mount -n -t configfs -o nodev,noexec,nosuid \ - configfs /sys/kernel/config - eend $? - fi - fi - - # set up kernel support for cgroups - if [ -d /sys/fs/cgroup ] && ! mountinfo -q /sys/fs/cgroup; then - if grep -qs cgroup /proc/filesystems; then - ebegin "Mounting cgroup filesystem" - local opts="nodev,noexec,nosuid,mode=755,size=${rc_cgroupsize:-10m}" - mount -n -t tmpfs -o ${opts} cgroup_root /sys/fs/cgroup - eend $? - fi - fi -} - -mount_cgroups() -{ - yesno ${rc_cgroups:-YES} && [ -e /proc/cgroups ] && \ - mountinfo -q /sys/fs/cgroup || return 0 - - while read name hier groups enabled rest; do - case "${enabled}" in - 1) mkdir /sys/fs/cgroup/${name} - mount -n -t cgroup -o nodev,noexec,nosuid,${name} \ - ${name} /sys/fs/cgroup/${name} - ;; - esac - done < /proc/cgroups } start() @@ -94,11 +59,6 @@ start() retval=$? if [ $retval -eq 0 ]; then mount_misc - retval=$? - fi - if [ $retval -eq 0 ]; then - mount_cgroups - retval=$? fi return $retval } diff --git a/config-archive/etc/init.d/sysfs.dist b/config-archive/etc/init.d/sysfs.dist index dd3fc0ee..50c98a98 100755 --- a/config-archive/etc/init.d/sysfs.dist +++ b/config-archive/etc/init.d/sysfs.dist @@ -74,15 +74,13 @@ mount_misc() mount_cgroups() { - yesno ${rc_cgroups:-YES} || return 0 - if [ ! -e /proc/cgroups ]; then - return 0 - fi + yesno ${rc_cgroups:-YES} && [ -e /proc/cgroups ] && \ + mountinfo -q /sys/fs/cgroup || return 0 while read name hier groups enabled rest; do case "${enabled}" in 1) mkdir /sys/fs/cgroup/${name} - mount -t cgroup -o nodev,noexec,nosuid,${name} \ + mount -n -t cgroup -o nodev,noexec,nosuid,${name} \ ${name} /sys/fs/cgroup/${name} ;; esac diff --git a/config-archive/etc/ldap.conf.sudo b/config-archive/etc/ldap.conf.sudo new file mode 100644 index 00000000..934f1b99 --- /dev/null +++ b/config-archive/etc/ldap.conf.sudo @@ -0,0 +1,5 @@ +# See ldap.conf(5) and README.LDAP for details\n" +# This file should only be readable by root\n\n" +# supported directives: host, port, ssl, ldap_version\n" +# uri, binddn, bindpw, sudoers_base, sudoers_debug\n" +# tls_{checkpeer,cacertfile,cacertdir,randfile,ciphers,cert,key diff --git a/._cfg0000_ldap.conf.sudo b/config-archive/etc/ldap.conf.sudo.dist similarity index 100% rename from ._cfg0000_ldap.conf.sudo rename to config-archive/etc/ldap.conf.sudo.dist diff --git a/config-archive/etc/mysql/my.cnf b/config-archive/etc/mysql/my.cnf new file mode 100644 index 00000000..b324ed2c --- /dev/null +++ b/config-archive/etc/mysql/my.cnf @@ -0,0 +1,149 @@ +# /etc/mysql/my.cnf: The global mysql configuration file. +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/files/my.cnf-5.1,v 1.2 2010/03/24 18:26:09 robbat2 Exp $ + +# The following options will be passed to all MySQL clients +[client] +#password = your_password +port = 3306 +socket = /var/run/mysqld/mysqld.sock + +[mysql] +character-sets-dir=/usr/share/mysql/charsets +default-character-set=utf8 +prompt = MySQL \u@\h:\d >\_ + +[mysqladmin] +character-sets-dir=/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlcheck] +character-sets-dir=/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqldump] +character-sets-dir=/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlimport] +character-sets-dir=/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlshow] +character-sets-dir=/usr/share/mysql/charsets +default-character-set=utf8 + +[myisamchk] +character-sets-dir=/usr/share/mysql/charsets + +[myisampack] +character-sets-dir=/usr/share/mysql/charsets + +# use [safe_mysqld] with mysql-3 +[mysqld_safe] +err-log = /var/log/mysql/mysql.err + +# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations +[mysqld] +character-set-server = utf8 +default-character-set = utf8 +user = mysql +port = 3306 +socket = /var/run/mysqld/mysqld.sock +pid-file = /var/run/mysqld/mysqld.pid +log-error = /var/log/mysql/mysqld.err +basedir = /usr +#datadir = /var/lib/mysql +datadir = /data/mysql +skip-external-locking +key_buffer = 16M +max_allowed_packet = 1M +table_cache = 64 +sort_buffer_size = 512K +net_buffer_length = 8K +read_buffer_size = 256K +read_rnd_buffer_size = 512K +myisam_sort_buffer_size = 8M +language = /usr/share/mysql/german + +# security: +# using "localhost" in connects uses sockets by default +# skip-networking +#bind-address = 127.0.0.1 + +log-bin +server-id = 1 + +# point the following paths to different dedicated disks +tmpdir = /tmp/ +#log-update = /path-to-dedicated-directory/hostname + +# you need the debug USE flag enabled to use the following directives, +# if needed, uncomment them, start the server and issue +# #tail -f /tmp/mysqld.sql /tmp/mysqld.trace +# this will show you *exactly* what's happening in your server ;) + +#log = /tmp/mysqld.sql +#gdb +#debug = d:t:i:o,/tmp/mysqld.trace +#one-thread + +# uncomment the following directives if you are using BDB tables +#bdb_cache_size = 4M +#bdb_max_lock = 10000 + +# the following is the InnoDB configuration +# if you wish to disable innodb instead +# uncomment just the next line +#skip-innodb +# +# the rest of the innodb config follows: +# don't eat too much memory, we're trying to be safe on 64Mb boxes +# you might want to bump this up a bit on boxes with more RAM +innodb_buffer_pool_size = 16M +# this is the default, increase it if you have lots of tables +innodb_additional_mem_pool_size = 2M +# +# i'd like to use /var/lib/mysql/innodb, but that is seen as a database :-( +# and upstream wants things to be under /var/lib/mysql/, so that's the route +# we have to take for the moment +#innodb_data_home_dir = /var/lib/mysql/ +#innodb_log_arch_dir = /var/lib/mysql/ +#innodb_log_group_home_dir = /var/lib/mysql/ +# you may wish to change this size to be more suitable for your system +# the max is there to avoid run-away growth on your machine +innodb_data_file_path = ibdata1:10M:autoextend:max:128M +# we keep this at around 25% of of innodb_buffer_pool_size +# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size) +innodb_log_file_size = 5M +# this is the default, increase it if you have very large transactions going on +innodb_log_buffer_size = 8M +# this is the default and won't hurt you +# you shouldn't need to tweak it +innodb_log_files_in_group=2 +# see the innodb config docs, the other options are not always safe +innodb_flush_log_at_trx_commit = 1 +innodb_lock_wait_timeout = 50 +innodb_file_per_table + +[mysqldump] +quick +max_allowed_packet = 16M + +[mysql] +# uncomment the next directive if you are not familiar with SQL +#safe-updates + +[isamchk] +key_buffer = 20M +sort_buffer_size = 20M +read_buffer = 2M +write_buffer = 2M + +[myisamchk] +key_buffer = 20M +sort_buffer_size = 20M +read_buffer = 2M +write_buffer = 2M + +[mysqlhotcopy] +interactive-timeout diff --git a/mysql/._cfg0000_my.cnf b/config-archive/etc/mysql/my.cnf.dist similarity index 100% rename from mysql/._cfg0000_my.cnf rename to config-archive/etc/mysql/my.cnf.dist diff --git a/config-archive/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml b/config-archive/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml new file mode 100644 index 00000000..723a10d3 --- /dev/null +++ b/config-archive/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xdg/xfce4/xfconf/xfce-perchannel-xml/._cfg0000_xfce4-keyboard-shortcuts.xml b/config-archive/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml.dist similarity index 100% rename from xdg/xfce4/xfconf/xfce-perchannel-xml/._cfg0000_xfce4-keyboard-shortcuts.xml rename to config-archive/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml.dist diff --git a/cups/printers.conf b/cups/printers.conf index 445dfb1e..cd7e2c2c 100644 --- a/cups/printers.conf +++ b/cups/printers.conf @@ -1,5 +1,5 @@ # Printer configuration file for CUPS v1.4.8 -# Written by cupsd on 2012-02-15 08:16 +# Written by cupsd on 2012-02-26 08:30 # DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING Info Kyocera FS-1020D diff --git a/cups/printers.conf.O b/cups/printers.conf.O index cc3babb7..03627cfd 100644 --- a/cups/printers.conf.O +++ b/cups/printers.conf.O @@ -1,5 +1,5 @@ # Printer configuration file for CUPS v1.4.8 -# Written by cupsd on 2012-02-14 18:43 +# Written by cupsd on 2012-02-25 07:37 # DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING Info Kyocera FS-1020D diff --git a/cups/subscriptions.conf b/cups/subscriptions.conf index 296ddccf..4f651c29 100644 --- a/cups/subscriptions.conf +++ b/cups/subscriptions.conf @@ -1,3 +1,11 @@ # Subscription configuration file for CUPS v1.4.8 -# Written by cupsd on 2012-02-15 08:16 -NextSubscriptionId 130 +# Written by cupsd on 2012-02-25 17:28 +NextSubscriptionId 133 + +Events printer-state-changed printer-restarted printer-shutdown printer-stopped printer-added printer-deleted job-state-changed job-created job-completed job-stopped job-progress +Owner frank +LeaseDuration 86400 +Interval 0 +ExpirationTime 1330273704 +NextEventId 316 + diff --git a/cups/subscriptions.conf.O b/cups/subscriptions.conf.O index 8fe0f129..fc2a6f11 100644 --- a/cups/subscriptions.conf.O +++ b/cups/subscriptions.conf.O @@ -1,11 +1,3 @@ # Subscription configuration file for CUPS v1.4.8 -# Written by cupsd on 2012-02-14 00:40 -NextSubscriptionId 130 - -Events printer-state-changed printer-restarted printer-shutdown printer-stopped printer-added printer-deleted job-state-changed job-created job-completed job-stopped job-progress -Owner frank -LeaseDuration 86400 -Interval 0 -ExpirationTime 1329262791 -NextEventId 627 - +# Written by cupsd on 2012-02-20 16:54 +NextSubscriptionId 132 diff --git a/eselect/postgresql/slots/9.1/base b/eselect/postgresql/slots/9.1/base index 25e967a5..479bd41d 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.1" +postgres_ebuilds="${postgres_ebuilds} postgresql-base-9.1.2" diff --git a/eselect/postgresql/slots/9.1/docs b/eselect/postgresql/slots/9.1/docs index 133932cf..8cec4d40 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.1" +postgres_ebuilds="${postgres_ebuilds} postgresql-docs-9.1.2" diff --git a/eselect/postgresql/slots/9.1/server b/eselect/postgresql/slots/9.1/server index cc2c76ba..7a0a9c0f 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.1" +postgres_ebuilds="${postgres_ebuilds} postgresql-server-9.1.2-r2" diff --git a/init.d/net.lo b/init.d/net.lo index 23143639..a9040a38 100755 --- a/init.d/net.lo +++ b/init.d/net.lo @@ -21,7 +21,7 @@ depend() need localmount after bootmisc provide net - keyword -shutdown -jail -prefix -vserver + keyword -jail -prefix -vserver case "${IFACE}" in lo|lo0);; diff --git a/init.d/postgresql-9.1 b/init.d/postgresql-9.1 index a5051a33..01376910 100755 --- a/init.d/postgresql-9.1 +++ b/init.d/postgresql-9.1 @@ -3,18 +3,33 @@ # 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}" @@ -23,16 +38,19 @@ checkconfig() { 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 @@ -48,10 +66,12 @@ checkconfig() { 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 @@ -62,18 +82,23 @@ start() { 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." @@ -81,112 +106,36 @@ start() { 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 $? } diff --git a/init.d/sysfs b/init.d/sysfs index dd3fc0ee..50c98a98 100755 --- a/init.d/sysfs +++ b/init.d/sysfs @@ -74,15 +74,13 @@ mount_misc() mount_cgroups() { - yesno ${rc_cgroups:-YES} || return 0 - if [ ! -e /proc/cgroups ]; then - return 0 - fi + yesno ${rc_cgroups:-YES} && [ -e /proc/cgroups ] && \ + mountinfo -q /sys/fs/cgroup || return 0 while read name hier groups enabled rest; do case "${enabled}" in 1) mkdir /sys/fs/cgroup/${name} - mount -t cgroup -o nodev,noexec,nosuid,${name} \ + mount -n -t cgroup -o nodev,noexec,nosuid,${name} \ ${name} /sys/fs/cgroup/${name} ;; esac diff --git a/ldap.conf.sudo b/ldap.conf.sudo index 934f1b99..c5d51f95 100644 --- a/ldap.conf.sudo +++ b/ldap.conf.sudo @@ -1,5 +1,6 @@ -# See ldap.conf(5) and README.LDAP for details\n" -# This file should only be readable by root\n\n" -# supported directives: host, port, ssl, ldap_version\n" -# uri, binddn, bindpw, sudoers_base, sudoers_debug\n" +# See ldap.conf(5) and README.LDAP for details +# This file should only be readable by root + +# supported directives: host, port, ssl, ldap_version +# uri, binddn, bindpw, sudoers_base, sudoers_debug # tls_{checkpeer,cacertfile,cacertdir,randfile,ciphers,cert,key diff --git a/mysql/my.cnf b/mysql/my.cnf index b324ed2c..775dce06 100644 --- a/mysql/my.cnf +++ b/mysql/my.cnf @@ -1,5 +1,5 @@ # /etc/mysql/my.cnf: The global mysql configuration file. -# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/files/my.cnf-5.1,v 1.2 2010/03/24 18:26:09 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/files/my.cnf-5.1,v 1.3 2012/02/15 02:07:21 jmbsvicetto Exp $ # The following options will be passed to all MySQL clients [client] @@ -58,6 +58,7 @@ skip-external-locking key_buffer = 16M max_allowed_packet = 1M table_cache = 64 +table_open_cache = 64 sort_buffer_size = 512K net_buffer_length = 8K read_buffer_size = 256K diff --git a/postfix/main.cf b/postfix/main.cf index dba4ff00..76d1551d 100644 --- a/postfix/main.cf +++ b/postfix/main.cf @@ -264,7 +264,7 @@ unknown_local_recipient_reject_code = 550 #mynetworks = 168.100.189.0/28, 127.0.0.0/8 #mynetworks = $config_directory/mynetworks #mynetworks = hash:/etc/postfix/network_table -mynetworks = 10.12.11.0/24 +mynetworks = 10.12.11.0/24, 127.0.0.0/8, [::1]/128, [2001:6f8:1db7::]/64 # The relay_domains parameter restricts what destinations this system will # relay mail to. See the smtpd_recipient_restrictions description in diff --git a/syslog-ng/syslog-ng.conf b/syslog-ng/syslog-ng.conf index 3a3c4f16..20e93366 100644 --- a/syslog-ng/syslog-ng.conf +++ b/syslog-ng/syslog-ng.conf @@ -53,6 +53,13 @@ destination d_console_12 { file("/dev/tty12"); }; #destination d_xconsole { pipe("/dev/xconsole"); }; destination d_xconsole { pipe("/dev/console"); }; +# By default messages are logged to tty12... +#destination console_all { file("/dev/tty12"); }; +# ...if you intend to use /dev/console for programs like xconsole +# you can comment out the destination line above that references /dev/tty12 +# and uncomment the line below. +#destination console_all { file("/dev/console"); }; + ######################################################### # Filter-Definitionen @@ -86,12 +93,5 @@ log { source(src); filter(f_syslog); destination(d_syslog); }; log { source(src); filter(f_debug); destination(d_debug); }; log { source(src); destination(d_all); }; -# By default messages are logged to tty12... -destination console_all { file("/dev/tty12"); }; -# ...if you intend to use /dev/console for programs like xconsole -# you can comment out the destination line above that references /dev/tty12 -# and uncomment the line below. -#destination console_all { file("/dev/console"); }; - #log { source(src); destination(messages); }; #log { source(src); destination(console_all); }; diff --git a/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml b/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml index 723a10d3..47e592c4 100644 --- a/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml +++ b/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml @@ -8,6 +8,8 @@ + + -- 2.39.5