saving uncommitted changes in /etc prior to emerge run
This commit is contained in:
@@ -1,58 +0,0 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License, v2 or later
|
||||
# $Id$
|
||||
|
||||
extra_started_commands="reload"
|
||||
|
||||
depend() {
|
||||
need localmount
|
||||
before postfix
|
||||
after bootmisc ldap mysql ntp-client ntpd postgresql saslauthd slapd
|
||||
use logger net
|
||||
}
|
||||
|
||||
checkconfig() {
|
||||
DOVECOT_INSTANCE=${SVCNAME##*.}
|
||||
if [ -n "${DOVECOT_INSTANCE}" -a "${SVCNAME}" != "dovecot" ]; then
|
||||
DOVECOT_CONF=/etc/dovecot/dovecot.${DOVECOT_INSTANCE}.conf
|
||||
else
|
||||
DOVECOT_CONF=/etc/dovecot/dovecot.conf
|
||||
fi
|
||||
if [ ! -e ${DOVECOT_CONF} ]; then
|
||||
eerror "You will need an ${DOVECOT_CONF} first"
|
||||
return 1
|
||||
fi
|
||||
if [ -x /usr/sbin/dovecot ]; then
|
||||
DOVECOT_BASEDIR=$(/usr/sbin/dovecot -c ${DOVECOT_CONF} -a | grep '^base_dir = ' | sed 's/^base_dir = //')
|
||||
else
|
||||
eerror "dovecot not executable"
|
||||
return 1
|
||||
fi
|
||||
DOVECOT_BASEDIR=${DOVECOT_BASEDIR:-/var/run/dovecot}
|
||||
DOVECOT_PIDFILE=${DOVECOT_BASEDIR}/master.pid
|
||||
}
|
||||
|
||||
start() {
|
||||
checkconfig || return 1
|
||||
ebegin "Starting ${SVCNAME}"
|
||||
start-stop-daemon --start --exec /usr/sbin/dovecot \
|
||||
--pidfile "${DOVECOT_PIDFILE}" -- -c "${DOVECOT_CONF}"
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
checkconfig || return 1
|
||||
ebegin "Stopping ${SVCNAME}"
|
||||
start-stop-daemon --stop --exec /usr/sbin/dovecot \
|
||||
--pidfile "${DOVECOT_PIDFILE}"
|
||||
eend $?
|
||||
}
|
||||
|
||||
reload() {
|
||||
checkconfig || return 1
|
||||
ebegin "Reloading ${SVCNAME} configs and restarting auth/login processes"
|
||||
start-stop-daemon --signal HUP --exec /usr/sbin/dovecot \
|
||||
--pidfile "${DOVECOT_PIDFILE}"
|
||||
eend $?
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
depend() {
|
||||
need net
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting ${SVCNAME}"
|
||||
start-stop-daemon \
|
||||
--start \
|
||||
--exec "/usr/sbin/hiawatha" \
|
||||
--pidfile "/var/run/hiawatha.pid"
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping ${SVCNAME}"
|
||||
start-stop-daemon \
|
||||
--stop \
|
||||
--exec "/usr/sbin/hiawatha" \
|
||||
--pidfile "/var/run/hiawatha.pid"
|
||||
eend $?
|
||||
}
|
||||
@@ -1,97 +0,0 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
extra_commands="reload"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
use mysql postgresql slapd
|
||||
provide jabber-server
|
||||
}
|
||||
|
||||
stopJabberServices() {
|
||||
|
||||
eindent
|
||||
for pidfile in /var/run/jabber/*.pid; do
|
||||
if [ -f "${pidfile}" ]; then
|
||||
service=$(basename ${pidfile} .pid)
|
||||
ebegin "Stopping ${service}"
|
||||
start-stop-daemon \
|
||||
--stop \
|
||||
--pidfile ${pidfile}
|
||||
eend $?
|
||||
fi
|
||||
done
|
||||
eoutdent
|
||||
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
checkpath -d -o jabber /var/run/jabber
|
||||
}
|
||||
|
||||
start() {
|
||||
|
||||
einfo "Starting Jabber Server ..."
|
||||
local services executable cfgfile pidfile
|
||||
services=$(grep -v ^# /etc/jabber/jabberd.cfg | grep '..*' | awk '{print $1 ":" $2}')
|
||||
eindent
|
||||
for service in ${services}; do
|
||||
|
||||
cfgfile=$(echo ${service} | cut -d ':' -f 2)
|
||||
service=$(echo ${service} | cut -d ':' -f 1)
|
||||
if [ ! -f "${cfgfile}" ]; then
|
||||
if [ -f "/etc/jabber/${service}.xml" ]; then
|
||||
cfgfile="/etc/jabber/${service}.xml"
|
||||
else
|
||||
eerror "Can't find: ${cfgfile} or default /etc/jabber/${service}.xml"
|
||||
stopJabberServices
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
executable=/usr/bin/${service}
|
||||
|
||||
if [ ! -f "${executable}" ]; then
|
||||
eerror "Can't find executable: ${executable}"
|
||||
stopJabberServices
|
||||
return 1
|
||||
fi
|
||||
|
||||
ebegin "Starting ${service} (${cfgfile})"
|
||||
pidfile="$(grep -v ^# ${cfgfile} | grep '<pidfile>' | sed 's#<.\?pidfile>##g')"
|
||||
start-stop-daemon \
|
||||
--background \
|
||||
--start \
|
||||
--user jabber:jabber \
|
||||
--exec /usr/bin/${service} \
|
||||
--pid ${pidfile} \
|
||||
-- -c ${cfgfile}
|
||||
eend $?
|
||||
|
||||
done
|
||||
eoutdent
|
||||
|
||||
}
|
||||
|
||||
reload() {
|
||||
eindent
|
||||
for pidfile in /var/run/jabber/*.pid; do
|
||||
if [ -f "${pidfile}" ]; then
|
||||
service=$(basename ${pidfile} .pid)
|
||||
ebegin "Reloading ${service}"
|
||||
kill -HUP $(cat ${pidfile})
|
||||
eend $?
|
||||
fi
|
||||
done
|
||||
eoutdent
|
||||
}
|
||||
|
||||
stop() {
|
||||
|
||||
einfo "Stopping Jabber Server"
|
||||
stopJabberServices
|
||||
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2004 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
depend() {
|
||||
before bootmisc hdparm
|
||||
after localmount
|
||||
}
|
||||
|
||||
checkconfig() {
|
||||
if [ ! -f /etc/conf.d/pciparm ]; then
|
||||
ewarn "/etc/conf.d/pciparm does not exist, skipping"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -z "${PCIPARM_ALL}" -a -z "${PCIPARM_BUS_0}" -a -z "${PCIPARM_VENDOR_0}" ]; then
|
||||
ewarn "None of PCIPARM_ALL, PCIPARM_BUS_* or PCIPARM_VENDOR_* set in /etc/conf.d/pciparm"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
do_setpci() {
|
||||
#ewarn "do_setpci: /usr/sbin/setpci $SETPCI_OPT $@"
|
||||
SWITCH=$1
|
||||
SPEC_ID=$2
|
||||
shift 2
|
||||
case "$SWITCH" in
|
||||
-d) DESC=vendor ;;
|
||||
-s) DESC=bus ;;
|
||||
*) eerror "Unknown setpci type: $SWITCH" ; return 1 ;;
|
||||
esac
|
||||
|
||||
if [ -z "$SPEC_ID" ]; then
|
||||
eerror "Missing device specifier!"
|
||||
return 1
|
||||
fi
|
||||
if [ -z "$*" ]; then
|
||||
eerror "Missing configuration to set for ($DESC) $SPEC_ID!"
|
||||
return 1
|
||||
fi
|
||||
|
||||
ebegin "Setting PCI params for ($DESC) $SPEC_ID to $@"
|
||||
/usr/sbin/setpci $SETPCI_OPT $SWITCH $SPEC_ID "$@"
|
||||
rc=$?
|
||||
eend $rc
|
||||
return $rc
|
||||
}
|
||||
|
||||
do_setpci_array() {
|
||||
name=$1
|
||||
shift
|
||||
i=0
|
||||
while true; do
|
||||
eval opt="\$${name}_$i"
|
||||
# End of loop
|
||||
[ -z "${opt}" ] && break
|
||||
# Pass in all other parameters here, in case we want to use multiple
|
||||
# arguments later.
|
||||
do_setpci "$@" $opt #|| return 1
|
||||
i=$(($i+1))
|
||||
done
|
||||
}
|
||||
|
||||
start() {
|
||||
if get_bootparam "nopciparm" ; then
|
||||
ewarn "Skipping pciparm init as requested in kernel cmdline"
|
||||
return 0
|
||||
fi
|
||||
|
||||
checkconfig || return 1
|
||||
|
||||
# We do not exit after any errors presently, because it might be a
|
||||
# stability-related fix after a failure.
|
||||
[ -n "$PCIPARM_ALL" ] && \
|
||||
do_setpci -d '*:*' $PCIPARM_ALL #|| return 1
|
||||
|
||||
do_setpci_array PCIPARM_BUS -s #|| return 1
|
||||
do_setpci_array PCIPARM_VENDOR -d #|| return 1
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2014 Gentoo Technologies, Inc.
|
||||
# Distributed under the terms of the GNU General Public Licence v2
|
||||
# $Id$
|
||||
|
||||
start() {
|
||||
local pydoc_port="${PYDOC2_7_PORT-${PYDOC_PORT}}"
|
||||
|
||||
if [ -z "${pydoc_port}" ]; then
|
||||
eerror "Port not set"
|
||||
return 1
|
||||
fi
|
||||
|
||||
ebegin "Starting pydoc server on port ${pydoc_port}"
|
||||
start-stop-daemon --start --background --make-pidfile \
|
||||
--pidfile /var/run/pydoc2.7.pid \
|
||||
--exec /usr/bin/pydoc2.7 -- -p "${pydoc_port}"
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping pydoc server"
|
||||
start-stop-daemon --stop --quiet --pidfile /var/run/pydoc2.7.pid
|
||||
eend $?
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2014 Gentoo Technologies, Inc.
|
||||
# Distributed under the terms of the GNU General Public Licence v2
|
||||
# $Id$
|
||||
|
||||
start() {
|
||||
local pydoc_port="${PYDOC3_4_PORT-${PYDOC_PORT}}"
|
||||
|
||||
if [ -z "${pydoc_port}" ]; then
|
||||
eerror "Port not set"
|
||||
return 1
|
||||
fi
|
||||
|
||||
ebegin "Starting pydoc server on port ${pydoc_port}"
|
||||
start-stop-daemon --start --background --make-pidfile \
|
||||
--pidfile /var/run/pydoc3.4.pid \
|
||||
--exec /usr/bin/pydoc3.4 -- -p "${pydoc_port}"
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping pydoc server"
|
||||
start-stop-daemon --stop --quiet --pidfile /var/run/pydoc3.4.pid
|
||||
eend $?
|
||||
}
|
||||
@@ -1,139 +0,0 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
# enable automatic i386/ARM/M68K/MIPS/SPARC/PPC/s390 program execution by the kernel
|
||||
|
||||
# Defaulting to OC should be safe because it comes down to:
|
||||
# - do we trust the interp itself to not be malicious? yes; we built it.
|
||||
# - do we trust the programs we're running? ish; same permission as native
|
||||
# binaries apply. so if user can do bad stuff natively, cross isn't worse.
|
||||
: ${QEMU_BINFMT_FLAGS:=OC}
|
||||
|
||||
depend() {
|
||||
after procfs
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Registering qemu-user binaries (flags: ${QEMU_BINFMT_FLAGS})"
|
||||
|
||||
if [ ! -d /proc/sys/fs/binfmt_misc ] ; then
|
||||
modprobe -q binfmt_misc
|
||||
fi
|
||||
|
||||
if [ ! -d /proc/sys/fs/binfmt_misc ] ; then
|
||||
eend $? "You need support for 'misc binaries' in your kernel!" || return
|
||||
fi
|
||||
|
||||
if [ ! -f /proc/sys/fs/binfmt_misc/register ] ; then
|
||||
mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc >/dev/null 2>&1
|
||||
eend $? || return
|
||||
fi
|
||||
|
||||
# probe cpu type
|
||||
cpu=`uname -m`
|
||||
case "$cpu" in
|
||||
i386|i486|i586|i686|i86pc|BePC|x86_64)
|
||||
cpu="i386"
|
||||
;;
|
||||
m68k)
|
||||
cpu="m68k"
|
||||
;;
|
||||
mips*)
|
||||
cpu="mips"
|
||||
;;
|
||||
"Power Macintosh"|ppc|ppc64)
|
||||
cpu="ppc"
|
||||
;;
|
||||
armv[4-9]*)
|
||||
cpu="arm"
|
||||
;;
|
||||
sparc*)
|
||||
cpu="sparc"
|
||||
;;
|
||||
esac
|
||||
|
||||
# register the interpreter for each cpu except for the native one
|
||||
if [ $cpu != "i386" -a -x "/usr/bin/qemu-i386" ] ; then
|
||||
echo ':i386:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-i386:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
|
||||
echo ':i486:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x06\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-i386:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
|
||||
fi
|
||||
if [ $cpu != "alpha" -a -x "/usr/bin/qemu-alpha" ] ; then
|
||||
echo ':alpha:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x26\x90:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-alpha:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
|
||||
fi
|
||||
if [ $cpu != "arm" -a -x "/usr/bin/qemu-arm" ] ; then
|
||||
echo ':arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\x00\xff\xfe\xff\xff\xff:/usr/bin/qemu-arm:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
|
||||
fi
|
||||
if [ $cpu != "arm" -a -x "/usr/bin/qemu-armeb" ] ; then
|
||||
echo ':armeb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-armeb:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
|
||||
fi
|
||||
if [ $cpu != "aarch64" -a -x "/usr/bin/qemu-aarch64" ] ; then
|
||||
echo ':aarch64:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-aarch64:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
|
||||
fi
|
||||
if [ $cpu != "sparc" -a -x "/usr/bin/qemu-sparc" ] ; then
|
||||
echo ':sparc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sparc:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
|
||||
fi
|
||||
if [ $cpu != "ppc" -a -x "/usr/bin/qemu-ppc" ] ; then
|
||||
echo ':ppc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x14:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-ppc:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
|
||||
fi
|
||||
if [ $cpu != "m68k" -a -x "/usr/bin/qemu-m68k" ] ; then
|
||||
#echo 'Please check cpu value and header information for m68k!'
|
||||
echo ':m68k:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-m68k:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
|
||||
fi
|
||||
if [ $cpu != "mips" -a -x "/usr/bin/qemu-mips" ] ; then
|
||||
# FIXME: We could use the other endianness on a MIPS host.
|
||||
echo ':mips:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
|
||||
fi
|
||||
if [ $cpu != "mips" -a -x "/usr/bin/qemu-mipsel" ] ; then
|
||||
echo ':mipsel:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mipsel:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
|
||||
fi
|
||||
if [ $cpu != "mips" -a -x "/usr/bin/qemu-mipsn32" ] ; then
|
||||
echo ':mipsn32:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mipsn32:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
|
||||
fi
|
||||
if [ $cpu != "mips" -a -x "/usr/bin/qemu-mipsn32el" ] ; then
|
||||
echo ':mipsn32el:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mipsn32el:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
|
||||
fi
|
||||
if [ $cpu != "mips" -a -x "/usr/bin/qemu-mips64" ] ; then
|
||||
echo ':mips64:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips64:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
|
||||
fi
|
||||
if [ $cpu != "mips" -a -x "/usr/bin/qemu-mips64el" ] ; then
|
||||
echo ':mips64el:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mips64el:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
|
||||
fi
|
||||
if [ $cpu != "sh" -a -x "/usr/bin/qemu-sh4" ] ; then
|
||||
echo ':sh4:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a\x00:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-sh4:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
|
||||
fi
|
||||
if [ $cpu != "sh" -a -x "/usr/bin/qemu-sh4eb" ] ; then
|
||||
echo ':sh4eb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sh4eb:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
|
||||
fi
|
||||
if [ $cpu != "s390x" -a -x "/usr/bin/qemu-s390x" ] ; then
|
||||
echo ':s390x:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x16:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-s390x:'"${QEMU_BINFMT_FLAGS}" > /proc/sys/fs/binfmt_misc/register
|
||||
fi
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Unregistering qemu-user binaries"
|
||||
local arches
|
||||
|
||||
arches="${arches} i386 i486"
|
||||
arches="${arches} alpha"
|
||||
arches="${arches} arm armeb"
|
||||
arches="${arches} aarch64"
|
||||
arches="${arches} sparc"
|
||||
arches="${arches} ppc"
|
||||
arches="${arches} m68k"
|
||||
arches="${arches} mips mipsel mipsn32 mipsn32el mips64 mips64el"
|
||||
arches="${arches} sh4 sh4eb"
|
||||
arches="${arches} s390x"
|
||||
|
||||
for a in ${arches}; do
|
||||
if [ -f /proc/sys/fs/binfmt_misc/$a ] ; then
|
||||
echo '-1' > /proc/sys/fs/binfmt_misc/$a
|
||||
fi
|
||||
done
|
||||
|
||||
eend $?
|
||||
}
|
||||
|
||||
# vim: ts=4 :
|
||||
@@ -1,44 +0,0 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
# NB: Config is in /etc/conf.d/spamd
|
||||
|
||||
# Provide a default location if they haven't in /etc/conf.d/spamd
|
||||
PIDFILE=${PIDFILE:-/run/spamd.pid}
|
||||
|
||||
extra_started_commands="reload"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
before mta
|
||||
use logger
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting spamd"
|
||||
start-stop-daemon --start --quiet \
|
||||
--name spamd \
|
||||
--nicelevel ${SPAMD_NICELEVEL:-0} \
|
||||
--pidfile ${PIDFILE} \
|
||||
--exec /usr/sbin/spamd -- -d -r ${PIDFILE} \
|
||||
${SPAMD_OPTS}
|
||||
retval=$?
|
||||
if ! [ -f "${PIDFILE}" ]; then
|
||||
sleep 1
|
||||
fi
|
||||
eend ${retval} "Failed to start spamd"
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping spamd"
|
||||
start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
|
||||
eend $? "Failed to stop spamd"
|
||||
}
|
||||
|
||||
reload() {
|
||||
ebegin "Reloading configuration"
|
||||
start-stop-daemon --signal HUP --quiet --pidfile ${PIDFILE}
|
||||
eend $?
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License, v2 or later
|
||||
# $Id$
|
||||
|
||||
description="svn server"
|
||||
pidfile="/var/run/svnserve.pid"
|
||||
command="/usr/bin/svnserve"
|
||||
command_args="--foreground --daemon ${SVNSERVE_OPTS:---root=/var/svn}"
|
||||
command_background="true"
|
||||
start_stop_daemon_args="-u ${SVNSERVE_USER:-svn} -g ${SVNSERVE_GROUP:-svnusers}"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
# Ensure that we run from a readable working dir, and that we do not
|
||||
# lock filesystems when being run from such a location.
|
||||
cd /
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
SYSLOG_NG_CONFIGFILE=${SYSLOG_NG_CONFIGFILE:-/etc/syslog-ng/${RC_SVCNAME}.conf}
|
||||
SYSLOG_NG_STATEFILE_DIR=${SYSLOG_NG_STATEFILE_DIR:-/var/lib/syslog-ng}
|
||||
SYSLOG_NG_STATEFILE=${SYSLOG_NG_STATEFILE:-${SYSLOG_NG_STATEFILE_DIR}/syslog-ng.persist}
|
||||
SYSLOG_NG_PIDFILE_DIR=${SYSLOG_NG_PIDFILE_DIR:-/run}
|
||||
SYSLOG_NG_PIDFILE=${SYSLOG_NG_PIDFILE:-${SYSLOG_NG_PIDFILE_DIR}/${RC_SVCNAME}.pid}
|
||||
|
||||
SYSLOG_NG_GROUP=${SYSLOG_NG_GROUP:-root}
|
||||
SYSLOG_NG_USER=${SYSLOG_NG_USER:-root}
|
||||
|
||||
command="/usr/sbin/syslog-ng"
|
||||
command_args="--persist-file \"${SYSLOG_NG_STATEFILE}\" --cfgfile \"${SYSLOG_NG_CONFIGFILE}\" --pidfile \"${SYSLOG_NG_PIDFILE}\" ${SYSLOG_NG_OPTS}"
|
||||
extra_commands="checkconfig"
|
||||
extra_started_commands="reload"
|
||||
pidfile="${SYSLOG_NG_PIDFILE}"
|
||||
start_stop_daemon_args="--user \"${SYSLOG_NG_USER}\":\"${SYSLOG_NG_GROUP}\""
|
||||
description="Syslog-ng is a syslog replacement with advanced filtering features."
|
||||
description_checkconfig="Check the configuration file that will be used by \"start\""
|
||||
description_reload="Reload the configuration without exiting"
|
||||
required_files="${SYSLOG_NG_CONFIGFILE}"
|
||||
required_dirs="${SYSLOG_NG_PIDFILE_DIR}"
|
||||
|
||||
depend() {
|
||||
use clock
|
||||
need hostname localmount
|
||||
after bootmisc
|
||||
provide logger
|
||||
}
|
||||
|
||||
checkconfig() {
|
||||
ebegin "Checking your configfile (${SYSLOG_NG_CONFIGFILE})"
|
||||
syslog-ng -s -f "${SYSLOG_NG_CONFIGFILE}"
|
||||
eend $? "Configuration error. Please fix your configfile (${SYSLOG_NG_CONFIGFILE})"
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
checkconfig || return 1
|
||||
checkpath \
|
||||
-d \
|
||||
--mode 0700 \
|
||||
--owner "${SYSLOG_NG_USER}:${SYSLOG_NG_GROUP}" \
|
||||
"${SYSLOG_NG_STATEFILE_DIR}"
|
||||
}
|
||||
|
||||
stop_pre() {
|
||||
[ "$RC_CMD" = restart ] && sleep 1
|
||||
return 0
|
||||
}
|
||||
|
||||
reload() {
|
||||
checkconfig || return 1
|
||||
ebegin "Reloading configuration and re-opening log files"
|
||||
start-stop-daemon --signal HUP --pidfile "${pidfile}"
|
||||
eend $?
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License, v2 or later
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/files/dovecot.init-r4,v 1.1 2012/12/01 10:40:49 eras Exp $
|
||||
# $Id$
|
||||
|
||||
extra_started_commands="reload"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
# $Id$
|
||||
|
||||
depend() {
|
||||
need net
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-im/jabberd2/files/jabberd2-2.3.2.init,v 1.1 2014/06/01 20:09:54 hasufell Exp $
|
||||
# $Id$
|
||||
|
||||
extra_commands="reload"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2004 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/pciutils/files/init.d-pciparm,v 1.3 2008/10/11 02:47:50 robbat2 Exp $
|
||||
# $Id$
|
||||
|
||||
depend() {
|
||||
before bootmisc hdparm
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2014 Gentoo Technologies, Inc.
|
||||
# Distributed under the terms of the GNU General Public Licence v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/files/pydoc.init,v 1.5 2014/10/12 12:37:07 djc Exp $
|
||||
# $Id$
|
||||
|
||||
start() {
|
||||
local pydoc_port="${PYDOC2_7_PORT-${PYDOC_PORT}}"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2014 Gentoo Technologies, Inc.
|
||||
# Distributed under the terms of the GNU General Public Licence v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/files/pydoc.init,v 1.5 2014/10/12 12:37:07 djc Exp $
|
||||
# $Id$
|
||||
|
||||
start() {
|
||||
local pydoc_port="${PYDOC3_4_PORT-${PYDOC_PORT}}"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/files/qemu-binfmt.initd-r1,v 1.5 2014/08/04 06:47:22 vapier Exp $
|
||||
# $Id$
|
||||
|
||||
# enable automatic i386/ARM/M68K/MIPS/SPARC/PPC/s390 program execution by the kernel
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/mail-filter/spamassassin/files/3.3.1-spamd.init,v 1.6 2013/10/17 11:44:12 zlogene Exp $
|
||||
# $Id$
|
||||
|
||||
# NB: Config is in /etc/conf.d/spamd
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License, v2 or later
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-vcs/subversion/files/svnserve.initd3,v 1.1 2015/04/09 12:58:45 polynomial-c Exp $
|
||||
# $Id$
|
||||
|
||||
description="svn server"
|
||||
pidfile="/var/run/svnserve.pid"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/3.6/syslog-ng.rc6,v 1.3 2015/03/29 07:27:06 mr_bones_ Exp $
|
||||
# $Id$
|
||||
|
||||
SYSLOG_NG_CONFIGFILE=${SYSLOG_NG_CONFIGFILE:-/etc/syslog-ng/${RC_SVCNAME}.conf}
|
||||
SYSLOG_NG_STATEFILE_DIR=${SYSLOG_NG_STATEFILE_DIR:-/var/lib/syslog-ng}
|
||||
|
||||
Reference in New Issue
Block a user