@@ -1,227 +0,0 @@ | |||
# Global OpenRC configuration settings | |||
# Set to "YES" if you want the rc system to try and start services | |||
# in parallel for a slight speed improvement. When running in parallel we | |||
# prefix the service output with its name as the output will get | |||
# jumbled up. | |||
# WARNING: whilst we have improved parallel, it can still potentially lock | |||
# the boot process. Don't file bugs about this unless you can supply | |||
# patches that fix it without breaking other things! | |||
#rc_parallel="NO" | |||
# Set rc_interactive to "YES" and you'll be able to press the I key during | |||
# boot so you can choose to start specific services. Set to "NO" to disable | |||
# this feature. This feature is automatically disabled if rc_parallel is | |||
# set to YES. | |||
#rc_interactive="YES" | |||
# If we need to drop to a shell, you can specify it here. | |||
# If not specified we use $SHELL, otherwise the one specified in /etc/passwd, | |||
# otherwise /bin/sh | |||
# Linux users could specify /sbin/sulogin | |||
rc_shell=/sbin/sulogin | |||
# Do we allow any started service in the runlevel to satisfy the dependency | |||
# or do we want all of them regardless of state? For example, if net.eth0 | |||
# and net.eth1 are in the default runlevel then with rc_depend_strict="NO" | |||
# both will be started, but services that depend on 'net' will work if either | |||
# one comes up. With rc_depend_strict="YES" we would require them both to | |||
# come up. | |||
#rc_depend_strict="YES" | |||
# rc_hotplug is a list of services that we allow to be hotplugged. | |||
# By default we do not allow hotplugging. | |||
# A hotplugged service is one started by a dynamic dev manager when a matching | |||
# hardware device is found. | |||
# This service is intrinsically included in the boot runlevel. | |||
# To disable services, prefix with a ! | |||
# Example - rc_hotplug="net.wlan !net.*" | |||
# This allows net.wlan and any service not matching net.* to be plugged. | |||
# Example - rc_hotplug="*" | |||
# This allows all services to be hotplugged | |||
#rc_hotplug="*" | |||
# rc_logger launches a logging daemon to log the entire rc process to | |||
# /var/log/rc.log | |||
# NOTE: Linux systems require the devfs service to be started before | |||
# logging can take place and as such cannot log the sysinit runlevel. | |||
#rc_logger="YES" | |||
# Through rc_log_path you can specify a custom log file. | |||
# The default value is: /var/log/rc.log | |||
#rc_log_path="/var/log/rc.log" | |||
# If you want verbose output for OpenRC, set this to yes. If you want | |||
# verbose output for service foo only, set it to yes in /etc/conf.d/foo. | |||
#rc_verbose=no | |||
# By default we filter the environment for our running scripts. To allow other | |||
# variables through, add them here. Use a * to allow all variables through. | |||
#rc_env_allow="VAR1 VAR2" | |||
# By default we assume that all daemons will start correctly. | |||
# However, some do not - a classic example is that they fork and return 0 AND | |||
# then child barfs on a configuration error. Or the daemon has a bug and the | |||
# child crashes. You can set the number of milliseconds start-stop-daemon | |||
# waits to check that the daemon is still running after starting here. | |||
# The default is 0 - no checking. | |||
#rc_start_wait=100 | |||
# rc_nostop is a list of services which will not stop when changing runlevels. | |||
# This still allows the service itself to be stopped when called directly. | |||
#rc_nostop="" | |||
# rc will attempt to start crashed services by default. | |||
# However, it will not stop them by default as that could bring down other | |||
# critical services. | |||
#rc_crashed_stop=NO | |||
#rc_crashed_start=YES | |||
# Set rc_nocolor to yes if you do not want colors displayed in OpenRC | |||
# output. | |||
#rc_nocolor=NO | |||
############################################################################## | |||
# MISC CONFIGURATION VARIABLES | |||
# There variables are shared between many init scripts | |||
# Set unicode to YES to turn on unicode support for keyboards and screens. | |||
unicode="YES" | |||
# This is how long fuser should wait for a remote server to respond. The | |||
# default is 60 seconds, but it can be adjusted here. | |||
#rc_fuser_timeout=60 | |||
# Below is the default list of network fstypes. | |||
# | |||
# afs ceph cifs coda davfs fuse fuse.sshfs gfs glusterfs lustre ncpfs | |||
# nfs nfs4 ocfs2 shfs smbfs | |||
# | |||
# If you would like to add to this list, you can do so by adding your | |||
# own fstypes to the following variable. | |||
#extra_net_fs_list="" | |||
############################################################################## | |||
# SERVICE CONFIGURATION VARIABLES | |||
# These variables are documented here, but should be configured in | |||
# /etc/conf.d/foo for service foo and NOT enabled here unless you | |||
# really want them to work on a global basis. | |||
# If your service has characters in its name which are not legal in | |||
# shell variable names and you configure the variables for it in this | |||
# file, those characters should be replaced with underscores in the | |||
# variable names as shown below. | |||
# Some daemons are started and stopped via start-stop-daemon. | |||
# We can set some things on a per service basis, like the nicelevel. | |||
#SSD_NICELEVEL="-19" | |||
# Pass ulimit parameters | |||
# If you are using bash in POSIX mode for your shell, note that the | |||
# ulimit command uses a block size of 512 bytes for the -c and -f | |||
# options | |||
#rc_ulimit="-u 30" | |||
# It's possible to define extra dependencies for services like so | |||
#rc_config="/etc/foo" | |||
#rc_need="openvpn" | |||
#rc_use="net.eth0" | |||
#rc_after="clock" | |||
#rc_before="local" | |||
#rc_provide="!net" | |||
# You can also enable the above commands here for each service. Below is an | |||
# example for service foo. | |||
#rc_foo_config="/etc/foo" | |||
#rc_foo_need="openvpn" | |||
#rc_foo_after="clock" | |||
# Below is an example for service foo-bar. Note that the '-' is illegal | |||
# in a shell variable name, so we convert it to an underscore. | |||
# example for service foo-bar. | |||
#rc_foo_bar_config="/etc/foo-bar" | |||
#rc_foo_bar_need="openvpn" | |||
#rc_foo_bar_after="clock" | |||
# You can also remove dependencies. | |||
# This is mainly used for saying which servies do NOT provide net. | |||
#rc_net_tap0_provide="!net" | |||
############################################################################## | |||
# LINUX SPECIFIC OPTIONS | |||
# This is the subsystem type. Valid options on Linux: | |||
# "" - nothing special | |||
# "lxc" - Linux Containers | |||
# "openvz" - Linux OpenVZ | |||
# "prefix" - Prefix | |||
# "uml" - Usermode Linux | |||
# "vserver" - Linux vserver | |||
# "systemd-nspawn" - Container created by the systemd-nspawn utility | |||
# "xen0" - Xen0 Domain | |||
# "xenU" - XenU Domain | |||
# If this is commented out, automatic detection will be used. | |||
# | |||
# This should be set to the value representing the environment this file is | |||
# PRESENTLY in, not the virtualization the environment is capable of. | |||
#rc_sys="" | |||
# This is the number of tty's used in most of the rc-scripts (like | |||
# consolefont, numlock, etc ...) | |||
rc_tty_number=12 | |||
############################################################################## | |||
# CGROUPS RESOURCE MANAGEMENT | |||
# If you have cgroups turned on in your kernel, this switch controls | |||
# whether or not a group for each controller is mounted under | |||
# /sys/fs/cgroup. | |||
# None of the other options in this section work if this is set to "NO". | |||
#rc_controller_cgroups="YES" | |||
# The following settings allow you to set up values for the cgroup | |||
# controllers for your services. | |||
# They can be set in this file;, however, if you do this, the settings | |||
# will apply to all of your services. | |||
# If you want different settings for each service, place the settings in | |||
# /etc/conf.d/foo for service foo. | |||
# The format is to specify the names of the settings followed by their | |||
# values. Each variable can hold multiple settings. | |||
# For example, you would use this to set the cpu.shares setting in the | |||
# cpu controller to 512 for your service. | |||
# rc_cgroup_cpu=" | |||
# cpu.shares 512 | |||
# " | |||
# | |||
#For more information about the adjustments that can be made with | |||
#cgroups, see Documentation/cgroups/* in the linux kernel source tree. | |||
# Set the blkio controller settings for this service. | |||
#rc_cgroup_blkio="" | |||
# Set the cpu controller settings for this service. | |||
#rc_cgroup_cpu="" | |||
# Add this service to the cpuacct controller (any value means yes). | |||
#rc_cgroup_cpuacct="" | |||
# Set the cpuset controller settings for this service. | |||
#rc_cgroup_cpuset="" | |||
# Set the devices controller settings for this service. | |||
#rc_cgroup_devices="" | |||
# Set the memory controller settings for this service. | |||
#rc_cgroup_memory="" | |||
# Set the net_prio controller settings for this service. | |||
#rc_cgroup_net_prio="" | |||
# Set this to YES if yu want all of the processes in a service's cgroup | |||
# killed when the service is stopped or restarted. | |||
# This should not be set globally because it kills all of the service's | |||
# child processes, and most of the time this is undesirable. Please set | |||
# it in /etc/conf.d/<service>. | |||
# To perform this cleanup manually for a stopped service, you can | |||
# execute cgroup_cleanup with /etc/init.d/<service> cgroup_cleanup or | |||
# rc-service <service> cgroup_cleanup. | |||
# rc_cgroup_cleanup="NO" |
@@ -1,20 +0,0 @@ | |||
## | |||
## LMTP specific settings | |||
## | |||
# Support proxying to other LMTP/SMTP servers by performing passdb lookups. | |||
#lmtp_proxy = no | |||
# When recipient address includes the detail (e.g. user+detail), try to save | |||
# the mail to the detail mailbox. See also recipient_delimiter and | |||
# lda_mailbox_autocreate settings. | |||
#lmtp_save_to_detail_mailbox = no | |||
# Verify quota before replying to RCPT TO. This adds a small overhead. | |||
#lmtp_rcpt_check_quota = no | |||
protocol lmtp { | |||
# Space separated list of plugins to load (default is global mail_plugins). | |||
#mail_plugins = $mail_plugins | |||
} | |||
@@ -13,14 +13,8 @@ | |||
# Verify quota before replying to RCPT TO. This adds a small overhead. | |||
#lmtp_rcpt_check_quota = no | |||
# Which recipient address to use for Delivered-To: header and Received: | |||
# header. The default is "final", which is the same as the one given to | |||
# RCPT TO command. "original" uses the address given in RCPT TO's ORCPT | |||
# parameter, "none" uses nothing. Note that "none" is currently always used | |||
# when a mail has multiple recipients. | |||
#lmtp_hdr_delivery_address = final | |||
protocol lmtp { | |||
# Space separated list of plugins to load (default is global mail_plugins). | |||
#mail_plugins = $mail_plugins | |||
} | |||
@@ -1,88 +0,0 @@ | |||
#!/sbin/runscript | |||
# $Id$ | |||
# Copyright 1999-2014 Gentoo Foundation | |||
# Distributed under the terms of the GNU General Public License v2 | |||
alsastatedir=/var/lib/alsa | |||
alsascrdir=/etc/alsa.d | |||
alsahomedir=/var/run/alsasound | |||
extra_commands="save restore" | |||
depend() { | |||
need localmount | |||
after bootmisc modules isapnp coldplug hotplug | |||
} | |||
restore() { | |||
ebegin "Restoring Mixer Levels" | |||
checkpath -q -d -m 0700 -o root:root ${alsahomedir} || return 1 | |||
if [ ! -r "${alsastatedir}/asound.state" ] ; then | |||
ewarn "No mixer config in ${alsastatedir}/asound.state, you have to unmute your card!" | |||
eend 0 | |||
return 0 | |||
fi | |||
local cards="$(sed -n -e 's/ *\([[:digit:]]*\) .*/\1/p' /proc/asound/cards)" | |||
local CARDNUM | |||
for cardnum in ${cards}; do | |||
[ -e /dev/snd/controlC${cardnum} ] || sleep 2 | |||
[ -e /dev/snd/controlC${cardnum} ] || sleep 2 | |||
[ -e /dev/snd/controlC${cardnum} ] || sleep 2 | |||
[ -e /dev/snd/controlC${cardnum} ] || sleep 2 | |||
alsactl -E HOME="${alsahomedir}" -I -f "${alsastatedir}/asound.state" restore ${cardnum} \ | |||
|| ewarn "Errors while restoring defaults, ignoring" | |||
done | |||
for ossfile in "${alsastatedir}"/oss/card*_pcm* ; do | |||
[ -e "${ossfile}" ] || continue | |||
# We use cat because I'm not sure if cp works properly on /proc | |||
local procfile=${ossfile##${alsastatedir}/oss} | |||
procfile="$(echo "${procfile}" | sed -e 's,_,/,g')" | |||
if [ -e /proc/asound/"${procfile}"/oss ] ; then | |||
cat "${ossfile}" > /proc/asound/"${procfile}"/oss | |||
fi | |||
done | |||
eend 0 | |||
} | |||
save() { | |||
ebegin "Storing ALSA Mixer Levels" | |||
checkpath -q -d -m 0700 -o root:root ${alsahomedir} || return 1 | |||
mkdir -p "${alsastatedir}" | |||
if ! alsactl -E HOME="${alsahomedir}" -f "${alsastatedir}/asound.state" store; then | |||
eerror "Error saving levels." | |||
eend 1 | |||
return 1 | |||
fi | |||
for ossfile in /proc/asound/card*/pcm*/oss; do | |||
[ -e "${ossfile}" ] || continue | |||
local device=${ossfile##/proc/asound/} ; device=${device%%/oss} | |||
device="$(echo "${device}" | sed -e 's,/,_,g')" | |||
mkdir -p "${alsastatedir}/oss/" | |||
cp "${ossfile}" "${alsastatedir}/oss/${device}" | |||
done | |||
eend 0 | |||
} | |||
start() { | |||
if [ "${RESTORE_ON_START}" = "yes" ]; then | |||
restore | |||
fi | |||
return 0 | |||
} | |||
stop() { | |||
if [ "${SAVE_ON_STOP}" = "yes" ]; then | |||
save | |||
fi | |||
return 0 | |||
} |
@@ -1,13 +0,0 @@ | |||
#!/sbin/runscript | |||
# Copyright 1999-2012 Gentoo Foundation | |||
# Distributed under the terms of the GNU General Public License v2 | |||
# $Id$ | |||
command="/bin/busybox ntpd" | |||
command_args="${NTPD_OPTS}" | |||
pidfile="/var/run/ntpd.pid" | |||
depend() { | |||
use net dns logger | |||
after ntp-client | |||
} |
@@ -1,8 +0,0 @@ | |||
#!/sbin/runscript | |||
# Copyright 1999-2013 Gentoo Foundation | |||
# Distributed under the terms of the GNU General Public License v2 | |||
# $Id$ | |||
command="/bin/busybox watchdog" | |||
command_args="${WATCHDOG_OPTS}" | |||
pidfile="/var/run/watchdog.pid" |
@@ -1,335 +0,0 @@ | |||
#!/sbin/runscript | |||
# Copyright 1999-2015 Gentoo Foundation | |||
# Distributed under the terms of the GNU General Public License v2 | |||
# $Id$ | |||
depend() { | |||
before checkfs fsck | |||
if grep -qs ^swap= "${conf_file}" ; then | |||
before swap | |||
fi | |||
} | |||
# We support multiple dmcrypt instances based on $SVCNAME | |||
conf_file="/etc/conf.d/${SVCNAME}" | |||
# Get splash helpers if available. | |||
if [ -e /sbin/splash-functions.sh ] ; then | |||
. /sbin/splash-functions.sh | |||
fi | |||
# Setup mappings for an individual target/swap | |||
# Note: This relies on variables localized in the main body below. | |||
dm_crypt_execute() { | |||
local dev ret mode foo | |||
if [ -z "${target}" -a -z "${swap}" ] ; then | |||
return | |||
fi | |||
# Handle automatic look up of the source path. | |||
if [ -z "${source}" -a -n "${loop_file}" ] ; then | |||
source=$(losetup --show -f "${loop_file}") | |||
fi | |||
case ${source} in | |||
*=*) | |||
source=$(blkid -l -t "${source}" -o device) | |||
;; | |||
esac | |||
if [ -z "${source}" ] || [ ! -e "${source}" ] ; then | |||
ewarn "source \"${source}\" for ${target} missing, skipping..." | |||
return | |||
fi | |||
if [ -n "${target}" ] ; then | |||
# let user set options, otherwise leave empty | |||
: ${options:=' '} | |||
elif [ -n "${swap}" ] ; then | |||
if cryptsetup isLuks ${source} 2>/dev/null ; then | |||
ewarn "The swap you have defined is a LUKS partition. Aborting crypt-swap setup." | |||
return | |||
fi | |||
target=${swap} | |||
# swap contents do not need to be preserved between boots, luks not required. | |||
# suspend2 users should have initramfs's init handling their swap partition either way. | |||
: ${options:='-c aes -h sha1 -d /dev/urandom'} | |||
: ${pre_mount:='mkswap ${dev}'} | |||
fi | |||
if [ -n "${loop_file}" ] ; then | |||
dev="/dev/mapper/${target}" | |||
ebegin " Setting up loop device ${source}" | |||
losetup ${source} ${loop_file} | |||
fi | |||
# cryptsetup: | |||
# open <device> <name> # <device> is $source | |||
# create <name> <device> # <name> is $target | |||
local arg1="create" arg2="${target}" arg3="${source}" | |||
if cryptsetup isLuks ${source} 2>/dev/null ; then | |||
arg1="open" | |||
arg2="${source}" | |||
arg3="${target}" | |||
fi | |||
# Older versions reported: | |||
# ${target} is active: | |||
# Newer versions report: | |||
# ${target} is active[ and is in use.] | |||
if cryptsetup status ${target} | egrep -q ' is active' ; then | |||
einfo "dm-crypt mapping ${target} is already configured" | |||
return | |||
fi | |||
splash svc_input_begin ${SVCNAME} >/dev/null 2>&1 | |||
# Handle keys | |||
if [ -n "${key}" ] ; then | |||
read_abort() { | |||
# some colors | |||
local ans savetty resettty | |||
[ -z "${NORMAL}" ] && eval $(eval_ecolors) | |||
einfon " $1? (${WARN}yes${NORMAL}/${GOOD}No${NORMAL}) " | |||
shift | |||
# This is ugly as s**t. But POSIX doesn't provide `read -t`, so | |||
# we end up having to implement our own crap with stty/etc... | |||
savetty=$(stty -g) | |||
resettty='stty ${savetty}; trap - EXIT HUP INT TERM' | |||
trap 'eval "${resettty}"' EXIT HUP INT TERM | |||
stty -icanon | |||
[ "${1}" = -t ] && stty min 0 time "$(( $2 * 10 ))" | |||
ans=$(dd count=1 bs=1 2>/dev/null) || ans='' | |||
eval "${resettty}" | |||
if [ -z "${ans}" ] ; then | |||
printf '\r' | |||
else | |||
echo | |||
fi | |||
case ${ans} in | |||
[yY]) return 0;; | |||
*) return 1;; | |||
esac | |||
} | |||
# Notes: sed not used to avoid case where /usr partition is encrypted. | |||
mode=${key##*:} && ( [ "${mode}" = "${key}" ] || [ -z "${mode}" ] ) && mode=reg | |||
key=${key%:*} | |||
case "${mode}" in | |||
gpg|reg) | |||
# handle key on removable device | |||
if [ -n "${remdev}" ] ; then | |||
# temp directory to mount removable device | |||
local mntrem="${RC_SVCDIR}/dm-crypt-remdev.$$" | |||
if [ ! -d "${mntrem}" ] ; then | |||
if ! mkdir -p "${mntrem}" ; then | |||
ewarn "${source} will not be decrypted ..." | |||
einfo "Reason: Unable to create temporary mount point '${mntrem}'" | |||
return | |||
fi | |||
fi | |||
i=0 | |||
einfo "Please insert removable device for ${target}" | |||
while [ ${i} -lt ${dmcrypt_max_timeout:-120} ] ; do | |||
foo="" | |||
if mount -n -o ro "${remdev}" "${mntrem}" 2>/dev/null >/dev/null ; then | |||
# keyfile exists? | |||
if [ ! -e "${mntrem}${key}" ] ; then | |||
umount -n "${mntrem}" | |||
rmdir "${mntrem}" | |||
einfo "Cannot find ${key} on removable media." | |||
read_abort "Abort" ${read_timeout:--t 1} && return | |||
else | |||
key="${mntrem}${key}" | |||
break | |||
fi | |||
else | |||
[ -e "${remdev}" ] \ | |||
&& foo="mount failed" \ | |||
|| foo="mount source not found" | |||
fi | |||
: $((i += 1)) | |||
read_abort "Stop waiting after $i attempts (${foo})" -t 1 && return | |||
done | |||
else # keyfile ! on removable device | |||
if [ ! -e "${key}" ] ; then | |||
ewarn "${source} will not be decrypted ..." | |||
einfo "Reason: keyfile ${key} does not exist." | |||
return | |||
fi | |||
fi | |||
;; | |||
*) | |||
ewarn "${source} will not be decrypted ..." | |||
einfo "Reason: mode ${mode} is invalid." | |||
return | |||
;; | |||
esac | |||
else | |||
mode=none | |||
fi | |||
ebegin " ${target} using: ${options} ${arg1} ${arg2} ${arg3}" | |||
if [ "${mode}" = "gpg" ] ; then | |||
: ${gpg_options:='-q -d'} | |||
# gpg available ? | |||
if command -v gpg >/dev/null ; then | |||
for i in 0 1 2 ; do | |||
# paranoid, don't store key in a variable, pipe it so it stays very little in ram unprotected. | |||
# save stdin stdout stderr "values" | |||
gpg ${gpg_options} ${key} 2>/dev/null | cryptsetup --key-file - ${options} ${arg1} ${arg2} ${arg3} | |||
ret=$? | |||
[ ${ret} -eq 0 ] && break | |||
done | |||
eend ${ret} "failure running cryptsetup" | |||
else | |||
ewarn "${source} will not be decrypted ..." | |||
einfo "Reason: cannot find gpg application." | |||
einfo "You have to install app-crypt/gnupg first." | |||
einfo "If you have /usr on its own partition, try copying gpg to /bin ." | |||
fi | |||
else | |||
if [ "${mode}" = "reg" ] ; then | |||
cryptsetup ${options} -d ${key} ${arg1} ${arg2} ${arg3} | |||
ret=$? | |||
eend ${ret} "failure running cryptsetup" | |||
else | |||
cryptsetup ${options} ${arg1} ${arg2} ${arg3} | |||
ret=$? | |||
eend ${ret} "failure running cryptsetup" | |||
fi | |||
fi | |||
if [ -d "${mntrem}" ] ; then | |||
umount -n ${mntrem} 2>/dev/null >/dev/null | |||
rmdir ${mntrem} 2>/dev/null >/dev/null | |||
fi | |||
splash svc_input_end ${SVCNAME} >/dev/null 2>&1 | |||
if [ ${ret} -ne 0 ] ; then | |||
cryptfs_status=1 | |||
else | |||
if [ -n "${pre_mount}" ] ; then | |||
dev="/dev/mapper/${target}" | |||
eval ebegin \"" pre_mount: ${pre_mount}"\" | |||
eval "${pre_mount}" > /dev/null | |||
ewend $? || cryptfs_status=1 | |||
fi | |||
fi | |||
} | |||
# Lookup optional bootparams | |||
get_bootparam_val() { | |||
# We're given something like: | |||
# foo=bar=cow | |||
# Return the "bar=cow" part. | |||
case $1 in | |||
*\=*) | |||
local key=$(echo "$1" | cut -f1 -d=) | |||
echo "$1" | cut -c $(( ${#key} + 2 )) | |||
;; | |||
esac | |||
} | |||
start() { | |||
local header=true cryptfs_status=0 | |||
local gpg_options key loop_file target targetline options pre_mount post_mount source swap remdev | |||
local x | |||
for x in $(cat /proc/cmdline) ; do | |||
case "${x}" in | |||
key_timeout\=*) | |||
local KEY_TIMEOUT=$(get_bootparam_val "${x}") | |||
if [ ${KEY_TIMEOUT} -gt 0 ] ; then | |||
read_timeout="-t ${KEY_TIMEOUT}" | |||
fi | |||
;; | |||
esac | |||
done | |||
while read targetline <&3 ; do | |||
case ${targetline} in | |||
# skip comments and blank lines | |||
""|"#"*) continue ;; | |||
# skip service-specific openrc configs #377927 | |||
rc_*) continue ;; | |||
esac | |||
${header} && ebegin "Setting up dm-crypt mappings" | |||
header=false | |||
# check for the start of a new target/swap | |||
case ${targetline} in | |||
target=*|swap=*) | |||
# If we have a target queued up, then execute it | |||
dm_crypt_execute | |||
# Prepare for the next target/swap by resetting variables | |||
unset gpg_options key loop_file target options pre_mount post_mount source swap remdev | |||
;; | |||
gpg_options=*|remdev=*|key=*|loop_file=*|options=*|pre_mount=*|post_mount=*|source=*) | |||
if [ -z "${target}${swap}" ] ; then | |||
ewarn "Ignoring setting outside target/swap section: ${targetline}" | |||
continue | |||
fi | |||
;; | |||
dmcrypt_max_timeout=*) | |||
# ignore global options | |||
continue | |||
;; | |||
*) | |||
ewarn "Skipping invalid line in ${conf_file}: ${targetline}" | |||
;; | |||
esac | |||
# Queue this setting for the next call to dm_crypt_execute | |||
eval "${targetline}" | |||
done 3< ${conf_file} | |||
# If we have a target queued up, then execute it | |||
dm_crypt_execute | |||
ewend ${cryptfs_status} "Failed to setup dm-crypt devices" | |||
} | |||
stop() { | |||
local line header | |||
# Break down all mappings | |||
header=true | |||
egrep "^(target|swap)=" ${conf_file} | \ | |||
while read line ; do | |||
${header} && einfo "Removing dm-crypt mappings" | |||
header=false | |||
target= swap= | |||
eval ${line} | |||
[ -n "${swap}" ] && target=${swap} | |||
if [ -z "${target}" ] ; then | |||
ewarn "invalid line in ${conf_file}: ${line}" | |||
continue | |||
fi | |||
ebegin " ${target}" | |||
cryptsetup remove ${target} | |||
eend $? | |||
done | |||
# Break down loop devices | |||
header=true | |||
grep '^source=./dev/loop' ${conf_file} | \ | |||
while read line ; do | |||
${header} && einfo "Detaching dm-crypt loop devices" | |||
header=false | |||
source= | |||
eval ${line} | |||
ebegin " ${source}" | |||
losetup -d "${source}" | |||
eend $? | |||
done | |||
return 0 | |||
} |
@@ -1,34 +0,0 @@ | |||
#!/sbin/runscript | |||
# Copyright 1999-2013 Gentoo Foundation | |||
# Distributed under the terms of the GNU General Public License v2 | |||
# $Header: $ | |||
DOCKER_LOGFILE=${DOCKER_LOGFILE:-/var/log/${SVCNAME}.log} | |||
DOCKER_PIDFILE=${DOCKER_PIDFILE:-/run/${SVCNAME}.pid} | |||
DOCKER_BINARY=${DOCKER_BINARY:-/usr/bin/docker} | |||
DOCKER_OPTS=${DOCKER_OPTS:-} | |||
start() { | |||
checkpath -f -m 0644 -o root:docker "$DOCKER_LOGFILE" | |||
ulimit -n 1048576 | |||
ulimit -u 1048576 | |||
ebegin "Starting docker daemon" | |||
start-stop-daemon --start --background \ | |||
--exec "$DOCKER_BINARY" \ | |||
--pidfile "$DOCKER_PIDFILE" \ | |||
--stdout "$DOCKER_LOGFILE" \ | |||
--stderr "$DOCKER_LOGFILE" \ | |||
-- daemon -p "$DOCKER_PIDFILE" \ | |||
$DOCKER_OPTS | |||
eend $? | |||
} | |||
stop() { | |||
ebegin "Stopping docker daemon" | |||
start-stop-daemon --stop \ | |||
--exec "$DOCKER_BINARY" \ | |||
--pidfile "$DOCKER_PIDFILE" | |||
eend $? | |||
} |
@@ -1,29 +0,0 @@ | |||
#!/sbin/runscript | |||
# Copyright 1999-2012 Gentoo Foundation | |||
# Distributed under the terms of the GNU General Public License v2 | |||
# $Id$ | |||
#NB: Config is in /etc/conf.d/gpm | |||
command=/usr/sbin/gpm | |||
command_args=" | |||
-m ${MOUSEDEV} | |||
-t ${MOUSE} | |||
${RESPONSIVENESS:+ -r ${RESPONSIVENESS}} | |||
${REPEAT_TYPE:+ -R${REPEAT_TYPE}} | |||
${APPEND} | |||
" | |||
pidfile=/var/run/gpm.pid | |||
depend() { | |||
need localmount | |||
use hotplug logger | |||
} | |||
start_pre() { | |||
if [ -z "${MOUSEDEV}" ] || [ -z "${MOUSE}" ] ; then | |||
eerror "You need to setup MOUSEDEV and MOUSE in /etc/conf.d/gpm first" | |||
return 1 | |||
fi | |||
} |
@@ -1,89 +0,0 @@ | |||
#!/sbin/runscript | |||
# Copyright 1999-2013 Gentoo Foundation | |||
# Distributed under the terms of the GNU General Public License v2 | |||
# $Id$ | |||
extra_commands="configtest" | |||
extra_started_commands="upgrade reload" | |||
description="Robust, small and high performance http and reverse proxy server" | |||
description_configtest="Run nginx' internal config check." | |||
description_upgrade="Upgrade the nginx binary without losing connections." | |||
description_reload="Reload the nginx configuration without losing connections." | |||
nginx_config=${nginx_config:-/etc/nginx/nginx.conf} | |||
command="/usr/sbin/nginx" | |||
command_args="-c ${nginx_config}" | |||
pidfile=${pidfile:-/run/nginx.pid} | |||
user=${user:-nginx} | |||
group=${group:-nginx} | |||
depend() { | |||
need net | |||
use dns logger netmount | |||
} | |||
start_pre() { | |||
if [ "${RC_CMD}" != "restart" ]; then | |||
configtest || return 1 | |||
fi | |||
} | |||
stop_pre() { | |||
if [ "${RC_CMD}" = "restart" ]; then | |||
configtest || return 1 | |||
fi | |||
} | |||
stop_post() { | |||
rm -f ${pidfile} | |||
} | |||
reload() { | |||
configtest || return 1 | |||
ebegin "Refreshing nginx' configuration" | |||
kill -HUP `cat ${pidfile}` &>/dev/null | |||
eend $? "Failed to reload nginx" | |||
} | |||
upgrade() { | |||
configtest || return 1 | |||
ebegin "Upgrading nginx" | |||
einfo "Sending USR2 to old binary" | |||
kill -USR2 `cat ${pidfile}` &>/dev/null | |||
einfo "Sleeping 3 seconds before pid-files checking" | |||
sleep 3 | |||
if [ ! -f ${pidfile}.oldbin ]; then | |||
eerror "File with old pid not found" | |||
return 1 | |||
fi | |||
if [ ! -f ${pidfile} ]; then | |||
eerror "New binary failed to start" | |||
return 1 | |||
fi | |||
einfo "Sleeping 3 seconds before WINCH" | |||
sleep 3 ; kill -WINCH `cat ${pidfile}.oldbin` | |||
einfo "Sending QUIT to old binary" | |||
kill -QUIT `cat ${pidfile}.oldbin` | |||
einfo "Upgrade completed" | |||
eend $? "Upgrade failed" | |||
} | |||
configtest() { | |||
ebegin "Checking nginx' configuration" | |||
${command} -c ${nginx_config} -t -q | |||
if [ $? -ne 0 ]; then | |||
${command} -c ${nginx_config} -t | |||
fi | |||
eend $? "failed, please correct errors above" | |||
} |
@@ -1,86 +0,0 @@ | |||
#!/sbin/runscript | |||
# Copyright 1999-2012 Gentoo Foundation | |||
# Distributed under the terms of the GNU General Public License v2 | |||
# $Id$ | |||
extra_started_commands="reload abort flush" | |||
description_reload="Re-read configuration files. Running processes terminate at their earliest convenience." | |||
description_abort="Stop the Postfix mail system abruptly. Running processes are signaled to stop immediately." | |||
description_flush="Force delivery: attempt to deliver every message in the deferred mail queue." | |||
# Please read http://www.postfix.org/MULTI_INSTANCE_README.html for multi instance support | |||
CONF_DIR="/etc/postfix" | |||
CONF_OPT="${SVCNAME##*.}" | |||
if [ -n ${CONF_OPT} -a ${SVCNAME} != "postfix" ]; then | |||
CONF_DIR="${CONF_DIR}.${CONF_OPT}" | |||
fi | |||
if [ "${CONF_DIR}" = "/etc/postfix" ]; then | |||
CONF_PARAM="" | |||
CONF_MESSAGE="" | |||
else | |||
CONF_PARAM="-c ${CONF_DIR}" | |||
CONF_MESSAGE="(${CONF_DIR})" | |||
fi | |||
depend() { | |||
use logger dns ypbind amavisd antivirus postfix_greylist net saslauthd | |||
if [ "${SVCNAME}" = "postfix" ]; then | |||
provide mta | |||
fi | |||
} | |||
start() { | |||
if [ ! -z "${CONF_PARAM}" ]; then | |||
einfo "Please consider updating your config for postmulti support." | |||
fi | |||
ebegin "Starting postfix ${CONF_MESSAGE}" | |||
if [ ! -d ${CONF_DIR} ]; then | |||
eend 1 "${CONF_DIR} does not exist" | |||
return 1 | |||
fi | |||
/usr/sbin/postfix ${CONF_PARAM} start >/dev/null 2>&1 | |||
eend $? | |||
} | |||
stop() { | |||
ebegin "Stopping postfix ${CONF_MESSAGE}" | |||
/usr/sbin/postfix ${CONF_PARAM} stop >/dev/null 2>&1 | |||
eend | |||
} | |||
status() { | |||
local _retval | |||
einfon "" | |||
/usr/sbin/postfix ${CONF_PARAM} status | |||
_retval=$? | |||
if [ x${_retval} = 'x0' ]; then | |||
mark_service_started "${SVCNAME}" | |||
eend 0 | |||
else | |||
mark_service_stopped "${SVCNAME}" | |||
eend 3 | |||
fi | |||
} | |||
reload() { | |||
ebegin "Reloading postfix ${CONF_MESSAGE}" | |||
/usr/sbin/postfix ${CONF_PARAM} reload >/dev/null 2>&1 | |||
eend $? | |||
} | |||
abort() { | |||
ebegin "Aborting postfix ${CONF_MESSAGE}" | |||
if service_started "${SVCNAME}"; then | |||
mark_service_stopped "${SVCNAME}" | |||
fi | |||
/usr/sbin/postfix ${CONF_PARAM} abort >/dev/null 2>&1 | |||
eend $? | |||
} | |||
flush() { | |||
ebegin "Flushing postfix ${CONF_MESSAGE}" | |||
/usr/sbin/postfix ${CONF_PARAM} flush >/dev/null 2>&1 | |||
eend $? | |||
} |
@@ -1,12 +0,0 @@ | |||
#!/sbin/runscript | |||
# Copyright 1999-2012 Gentoo Foundation | |||
# Distributed under the terms of the GNU General Public License v2 | |||
# $Id$ | |||
command="/usr/bin/rsync" | |||
command_args="--daemon ${RSYNC_OPTS}" | |||
pidfile="/var/run/${SVCNAME}.pid" | |||
depend() { | |||
use net | |||
} |
@@ -1,73 +0,0 @@ | |||
#!/sbin/runscript | |||
# Copyright 1999-2013 Gentoo Foundation | |||
# Distributed under the terms of the GNU General Public License v2 | |||
# $Id$ | |||
extra_started_commands="reload" | |||
description="Transmission is a fast, easy and free bittorrent client" | |||
description_start="Start transmission-daemon server and web interface" | |||
description_stop="Stop transmission-daemon server and web interface" | |||
description_reload="Reload transmission-daemon settings" | |||
rundir=${rundir:-/var/run/transmission} | |||
pidfile=${pidfile:-${rundir}/transmission.pid} | |||
config_dir=${config_dir:-/var/lib/transmission/config} | |||
download_dir=${download_dir:-/var/lib/transmission/downloads} | |||
logfile=${logfile:-/var/log/transmission/transmission.log} | |||
runas_user=${runas_user:-transmission:transmission} | |||
SSD_OPTIONS="" | |||
depend() { | |||
need net | |||
} | |||
check_config() { | |||
if [ ! -d "${rundir}" ]; then | |||
mkdir "${rundir}" | |||
if [ -n "${runas_user}" ]; then | |||
chown -R ${runas_user} "${rundir}" | |||
fi | |||
fi | |||
# In case no config directory option passed use default | |||
if ! $(echo ${TRANSMISSION_OPTIONS} | grep -q -e '\B-g' -e '\B--config-dir'); then | |||
TRANSMISSION_OPTIONS="${TRANSMISSION_OPTIONS} --config-dir ${config_dir}" | |||
# put download dir location on first run (and take it from config later) | |||
if [ ! -f ${config_dir}/settings.json ]; then | |||
TRANSMISSION_OPTIONS="${TRANSMISSION_OPTIONS} --download-dir ${download_dir}" | |||
fi | |||
fi | |||
if [ -n "${runas_user}" ]; then | |||
if [ -f /etc/init.d/sysfs ]; then | |||
SSD_OPTIONS="${SSD_OPTIONS} --user ${runas_user}" | |||
else | |||
SSD_OPTIONS="${SSD_OPTIONS} --chuid ${runas_user}" | |||
fi | |||
fi | |||
} | |||
start() { | |||
check_config | |||
ebegin "Starting transmission daemon" | |||
start-stop-daemon --start --quiet --pidfile ${pidfile} ${SSD_OPTIONS} \ | |||
--exec /usr/bin/transmission-daemon -- --pid-file ${pidfile} \ | |||
$(test ${logfile} != "syslog" && echo --logfile ${logfile}) \ | |||
${TRANSMISSION_OPTIONS} | |||
eend $? | |||
} | |||
stop() { | |||
ebegin "Stopping transmission daemon" | |||
start-stop-daemon --stop --quiet --retry TERM/45/QUIT/15 --pidfile ${pidfile} | |||
eend $? | |||
} | |||
reload() { | |||
ebegin "Reloading transmission configuration" | |||
start-stop-daemon --signal HUP --pidfile ${pidfile} | |||
eend $? | |||
} | |||
@@ -1,231 +0,0 @@ | |||
#!/sbin/runscript | |||
# Copyright 1999-2014 Gentoo Foundation | |||
# Distributed under the terms of the GNU General Public License, v2 | |||
# $Id$ | |||
# This is here to serve as a note to myself, and future developers. | |||
# | |||
# Any Display manager (gdm,kdm,xdm) has the following problem: if | |||
# it is started before any getty, and no vt is specified, it will | |||
# usually run on vt2. When the getty on vt2 then starts, and the | |||
# DM is already started, the getty will take control of the keyboard, | |||
# leaving us with a "dead" keyboard. | |||
# | |||
# Resolution: add the following line to /etc/inittab | |||
# | |||
# x:a:once:/etc/X11/startDM.sh | |||
# | |||
# and have /etc/X11/startDM.sh start the DM in daemon mode if | |||
# a lock is present (with the info of what DM should be started), | |||
# else just fall through. | |||
# | |||
# How this basically works, is the "a" runlevel is a additional | |||
# runlevel that you can use to fork processes with init, but the | |||
# runlevel never gets changed to this runlevel. Along with the "a" | |||
# runlevel, the "once" key word means that startDM.sh will only be | |||
# run when we specify it to run, thus eliminating respawning | |||
# startDM.sh when "xdm" is not added to the default runlevel, as was | |||
# done previously. | |||
# | |||
# This script then just calls "telinit a", and init will run | |||
# /etc/X11/startDM.sh after the current runlevel completes (this | |||
# script should only be added to the actual runlevel the user is | |||
# using). | |||
# | |||
# Martin Schlemmer | |||
# aka Azarah | |||
# 04 March 2002 | |||
depend() { | |||
need localmount xdm-setup | |||
# this should start as early as possible | |||
# we can't do 'before *' as that breaks it | |||
# (#139824) Start after ypbind and autofs for network authentication | |||
# (#145219 #180163) Could use lirc mouse as input device | |||
# (#70689 comment #92) Start after consolefont to avoid display corruption | |||
# (#291269) Start after quota, since some dm need readable home | |||
# (#390609) gdm-3 will fail when dbus is not running | |||
# (#366753) starting keymaps after X causes problems | |||
after bootmisc consolefont modules netmount | |||
after readahead-list ypbind autofs openvpn gpm lircmd | |||
after quota keymaps | |||
before alsasound | |||
# Start before X | |||
use consolekit dbus xfs | |||
} | |||
setup_dm() { | |||
local MY_XDM | |||
MY_XDM=$(echo "${DISPLAYMANAGER}" | tr '[:upper:]' '[:lower:]') | |||
# Load our root path from profile.env | |||
# Needed for kdm | |||
PATH=${PATH}:$(. /etc/profile.env; echo "${ROOTPATH}") | |||
NAME= | |||
case "${MY_XDM}" in | |||
kdm|kde) | |||
EXE=/usr/bin/kdm | |||
PIDFILE=/run/kdm.pid | |||
;; | |||
entrance*) | |||
EXE=/usr/sbin/entrance | |||
PIDFILE=/run/entrance.pid | |||
;; | |||
gdm|gnome) | |||
# gdm-3 and above has different paths | |||
if [ -f /usr/sbin/gdm ]; then | |||
EXE=/usr/sbin/gdm | |||
PIDFILE=/run/gdm/gdm.pid | |||
START_STOP_ARGS="--background" | |||
AUTOCLEAN_CGROUP="yes" | |||
else | |||
EXE=/usr/bin/gdm | |||
PIDFILE=/run/gdm.pid | |||
fi | |||
[ "${RC_UNAME}" != "Linux" ] && NAME=gdm-binary | |||
;; | |||
wdm) | |||
EXE=/usr/bin/wdm | |||
PIDFILE= | |||
;; | |||
gpe) | |||
EXE=/usr/bin/gpe-dm | |||
PIDFILE=/run/gpe-dm.pid | |||
;; | |||
lxdm) | |||
EXE=/usr/sbin/lxdm-binary | |||
PIDFILE=/run/lxdm.pid | |||
START_STOP_ARGS="--background" | |||
;; | |||
lightdm) | |||
EXE=/usr/sbin/lightdm | |||
PIDFILE=/run/lightdm.pid | |||
START_STOP_ARGS="--background" | |||
;; | |||
sddm) | |||
EXE="/usr/bin/sddm" | |||
START_STOP_ARGS="-m --background" | |||
PIDFILE=/run/sddm.pid | |||
;; | |||
*) | |||
# first find out if there is such executable | |||
EXE="$(command -v ${MY_XDM} 2>/dev/null)" | |||
PIDFILE="/run/${MY_XDM}.pid" | |||
# warn user that he is doing sick things if the exe was not found | |||
if [ -z "${EXE}" ]; then | |||
echo "ERROR: Your XDM value is invalid." | |||
echo " No ${MY_XDM} executable could be found on your system." | |||
fi | |||
;; | |||
esac | |||
if ! [ -x "${EXE}" ]; then | |||
EXE=/usr/bin/xdm | |||
PIDFILE=/run/xdm.pid | |||
if ! [ -x "/usr/bin/xdm" ]; then | |||
echo "ERROR: Please set your DISPLAYMANAGER variable in /etc/conf.d/xdm," | |||
echo " or install x11-apps/xdm package" | |||
eend 255 | |||
fi | |||
fi | |||
} | |||
# Check to see if something is defined on our VT | |||
vtstatic() { | |||
if [ -e /etc/inittab ] ; then | |||
grep -Eq "^[^#]+.*\<tty$1\>" /etc/inittab | |||
elif [ -e /etc/ttys ] ; then | |||
grep -q "^ttyv$(($1 - 1))" /etc/ttys | |||
else | |||
return 1 | |||
fi | |||
} | |||
start() { | |||
local EXE NAME PIDFILE AUTOCLEAN_CGROUP | |||
setup_dm | |||
if [ -f /etc/.noxdm ]; then | |||
einfo "Skipping ${EXE##*/}, /etc/.noxdm found or \"nox\" bootparam passed." | |||
rm /etc/.noxdm | |||
return 0 | |||
fi | |||
ebegin "Setting up ${EXE##*/}" | |||
# save the prefered DM | |||
save_options "service" "${EXE}" | |||
save_options "name" "${NAME}" | |||
save_options "pidfile" "${PIDFILE}" | |||
save_options "start_stop_args" "${START_STOP_ARGS}" | |||
save_options "autoclean_cgroup" "${AUTOCLEAN_CGROUP:-no}" | |||
if [ -n "${CHECKVT-y}" ] ; then | |||
if vtstatic "${CHECKVT:-7}" ; then | |||
if [ -x /sbin/telinit ] && [ "${SOFTLEVEL}" != "BOOT" ] && [ "${RC_SOFTLEVEL}" != "BOOT" ]; then | |||
ewarn "Something is already defined on VT ${CHECKVT:-7}, will start X later" | |||
telinit a >/dev/null 2>&1 | |||
return 0 | |||
else | |||
eerror "Something is already defined on VT ${CHECKVT:-7}, not starting" | |||
return 1 | |||
fi | |||
fi | |||
fi | |||
/etc/X11/startDM.sh | |||
eend 0 | |||
} | |||
stop() { | |||
local curvt retval | |||
retval=0 | |||
if [ -t 0 ]; then | |||
if type fgconsole >/dev/null 2>&1; then | |||
curvt=$(fgconsole 2>/dev/null) | |||
else | |||
curvt=$(tty) | |||
case "${curvt}" in | |||
/dev/ttyv[0-9]*) curvt=${curvt#/dev/ttyv} ;; | |||
*) curvt= ;; | |||
esac | |||
fi | |||
fi | |||
local myexe myname mypidfile myservice | |||
myexe=$(get_options "service") | |||
myname=$(get_options "name") | |||
mypidfile=$(get_options "pidfile") | |||
myservice=${myexe##*/} | |||
yesno "${rc_cgroup_cleanup:-no}" || rc_cgroup_cleanup=$(get_options "autoclean_cgroup") | |||
[ -z "${myexe}" ] && return 0 | |||
ebegin "Stopping ${myservice}" | |||
if start-stop-daemon --quiet --test --stop --exec "${myexe}"; then | |||
start-stop-daemon --stop --exec "${myexe}" --retry TERM/5/TERM/5 \ | |||
${mypidfile:+--pidfile} ${mypidfile} \ | |||
${myname:+--name} ${myname} | |||
retval=${?} | |||
fi | |||
# switch back to original vt | |||
if [ -n "${curvt}" ]; then | |||
if type chvt >/dev/null 2>&1; then | |||
chvt "${curvt}" | |||
else | |||
vidcontrol -s "$((curvt + 1))" | |||
fi | |||
fi | |||
eend ${retval} "Error stopping ${myservice}" | |||
return ${retval} | |||
} | |||
# vim: set ts=4 : |
@@ -1,14 +0,0 @@ | |||
#!/sbin/runscript | |||
# Copyright 1999-2009 Gentoo Foundation | |||
# Distributed under the terms of the GNU General Public License v2 | |||
# $Id$ | |||
depend() { | |||
need localmount | |||
} | |||
start() { | |||
if get_bootparam "nox" ; then | |||
touch /etc/.noxdm | |||
fi | |||
} |
@@ -1,5 +1,5 @@ | |||
#!/sbin/runscript | |||
# $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-utils/files/alsasound.initd-r6,v 1.1 2014/06/23 21:34:42 ssuominen Exp $ | |||
# $Id$ | |||
# Copyright 1999-2014 Gentoo Foundation | |||
# Distributed under the terms of the GNU General Public License v2 | |||
@@ -1,7 +1,7 @@ | |||
#!/sbin/runscript | |||
# Copyright 1999-2012 Gentoo Foundation | |||
# Distributed under the terms of the GNU General Public License v2 | |||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/files/ntpd.initd,v 1.2 2012/12/21 03:15:28 blueness Exp $ | |||
# $Id$ | |||
command="/bin/busybox ntpd" | |||
command_args="${NTPD_OPTS}" | |||
@@ -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/sys-apps/busybox/files/watchdog.initd,v 1.3 2013/04/27 07:47:23 vapier Exp $ | |||
# $Id$ | |||
command="/bin/busybox watchdog" | |||
command_args="${WATCHDOG_OPTS}" | |||
@@ -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/sys-fs/cryptsetup/files/1.5.1-dmcrypt.rc,v 1.9 2015/04/12 22:04:22 vapier Exp $ | |||
# $Id$ | |||
depend() { | |||
before checkfs fsck | |||
@@ -20,7 +20,7 @@ start() { | |||
--pidfile "$DOCKER_PIDFILE" \ | |||
--stdout "$DOCKER_LOGFILE" \ | |||
--stderr "$DOCKER_LOGFILE" \ | |||
-- -d -p "$DOCKER_PIDFILE" \ | |||
-- daemon -p "$DOCKER_PIDFILE" \ | |||
$DOCKER_OPTS | |||
eend $? | |||
} | |||
@@ -1,7 +1,7 @@ | |||
#!/sbin/runscript | |||
# Copyright 1999-2012 Gentoo Foundation | |||
# Distributed under the terms of the GNU General Public License v2 | |||
# $Header: /var/cvsroot/gentoo-x86/sys-libs/gpm/files/gpm.rc6-2,v 1.2 2012/10/28 11:35:56 vapier Exp $ | |||
# $Id$ | |||
#NB: Config is in /etc/conf.d/gpm | |||
@@ -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/www-servers/nginx/files/nginx.initd-r2,v 1.1 2013/05/13 12:18:11 dev-zero Exp $ | |||
# $Id$ | |||
extra_commands="configtest" | |||
extra_started_commands="upgrade reload" | |||
@@ -1,7 +1,7 @@ | |||
#!/sbin/runscript | |||
# Copyright 1999-2012 Gentoo Foundation | |||
# Distributed under the terms of the GNU General Public License v2 | |||
# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/files/postfix.rc6.2.7,v 1.2 2012/03/07 10:27:37 eras Exp $ | |||
# $Id$ | |||
extra_started_commands="reload abort flush" | |||
@@ -1,7 +1,7 @@ | |||
#!/sbin/runscript | |||
# Copyright 1999-2012 Gentoo Foundation | |||
# Distributed under the terms of the GNU General Public License v2 | |||
# $Header: /var/cvsroot/gentoo-x86/net-misc/rsync/files/rsyncd.init.d-r1,v 1.1 2012/03/22 22:01:21 idl0r Exp $ | |||
# $Id$ | |||
command="/usr/bin/rsync" | |||
command_args="--daemon ${RSYNC_OPTS}" | |||
@@ -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/net-p2p/transmission/files/transmission-daemon.initd.9,v 1.1 2013/09/07 12:10:01 ssuominen Exp $ | |||
# $Id$ | |||
extra_started_commands="reload" | |||
description="Transmission is a fast, easy and free bittorrent client" | |||
@@ -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/x11-base/xorg-server/files/xdm.initd-11,v 1.1 2014/04/14 16:19:25 chithanh Exp $ | |||
# $Id$ | |||
# This is here to serve as a note to myself, and future developers. | |||
# | |||
@@ -1,7 +1,7 @@ | |||
#!/sbin/runscript | |||
# Copyright 1999-2009 Gentoo Foundation | |||
# Distributed under the terms of the GNU General Public License v2 | |||
# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-server/files/xdm-setup.initd-1,v 1.1 2010/04/13 10:07:39 scarabeus Exp $ | |||
# $Id$ | |||
depend() { | |||
need localmount | |||
@@ -1,12 +0,0 @@ | |||
# Copyright 1999-2014 Gentoo Foundation | |||
# Distributed under the terms of the GNU General Public License v2 | |||
# $Id$ | |||
/var/log/nginx/*_log { | |||
missingok | |||
delaycompress | |||
sharedscripts | |||
postrotate | |||
test -r /run/nginx.pid && kill -USR1 `cat /run/nginx.pid` | |||
endscript | |||
} |
@@ -1,6 +1,6 @@ | |||
# Copyright 1999-2014 Gentoo Foundation | |||
# Distributed under the terms of the GNU General Public License v2 | |||
# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/files/nginx.logrotate-r1,v 1.1 2014/06/19 09:52:24 dev-zero Exp $ | |||
# $Id$ | |||
/var/log/nginx/*_log { | |||
missingok | |||
@@ -1,14 +0,0 @@ | |||
# Nvidia drivers support | |||
alias char-major-195 nvidia | |||
alias /dev/nvidiactl char-major-195 | |||
# To tweak the driver the following options can be used, note that | |||
# you should be careful, as it could cause instability!! For more | |||
# options see /usr/share/doc/nvidia-drivers-352.30/README | |||
# | |||
# !!! SECURITY WARNING !!! | |||
# DO NOT MODIFY OR REMOVE THE DEVICE FILE RELATED OPTIONS UNLESS YOU KNOW | |||
# WHAT YOU ARE DOING. | |||
# ONLY ADD TRUSTED USERS TO THE VIDEO GROUP, THESE USERS MAY BE ABLE TO CRASH, | |||
# COMPROMISE, OR IRREPARABLY DAMAGE THE MACHINE. | |||
options nvidia NVreg_DeviceFileMode=432 NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=27 NVreg_ModifyDeviceFiles=1 |
@@ -4,7 +4,7 @@ alias /dev/nvidiactl char-major-195 | |||
# To tweak the driver the following options can be used, note that | |||
# you should be careful, as it could cause instability!! For more | |||
# options see /usr/share/doc/nvidia-drivers-346.87/README | |||
# options see /usr/share/doc/nvidia-drivers-352.30/README | |||
# | |||
# !!! SECURITY WARNING !!! | |||
# DO NOT MODIFY OR REMOVE THE DEVICE FILE RELATED OPTIONS UNLESS YOU KNOW | |||
@@ -1,141 +0,0 @@ | |||
# /etc/mysql/my.cnf: The global mysql configuration file. | |||
# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/files/my.cnf-5.6,v 1.1 2014/10/08 16:42:41 grknight 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 | |||
[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 | |||
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 | |||
skip-external-locking | |||
key_buffer_size = 16M | |||
max_allowed_packet = 4M | |||
table_open_cache = 400 | |||
sort_buffer_size = 512K | |||
net_buffer_length = 16K | |||
read_buffer_size = 256K | |||
read_rnd_buffer_size = 512K | |||
myisam_sort_buffer_size = 8M | |||
lc_messages_dir = /usr/share/mysql | |||
#Set this to your desired error message language | |||
lc_messages = en_US | |||
# 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 | |||
# 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 = 128M | |||
# | |||
# 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 = 48M | |||
# 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 | |||
# Uncomment this to get FEDERATED engine support | |||
#plugin-load=federated=ha_federated.so | |||
loose-federated | |||
[mysqldump] | |||
quick | |||
max_allowed_packet = 16M | |||
[mysql] | |||
# uncomment the next directive if you are not familiar with SQL | |||
#safe-updates | |||
[isamchk] | |||
key_buffer_size = 20M | |||
sort_buffer_size = 20M | |||
read_buffer = 2M | |||
write_buffer = 2M | |||
[myisamchk] | |||
key_buffer_size = 20M | |||
sort_buffer_size = 20M | |||
read_buffer_size = 2M | |||
write_buffer_size = 2M | |||
[mysqlhotcopy] | |||
interactive-timeout |
@@ -1,5 +1,5 @@ | |||
# /etc/mysql/my.cnf: The global mysql configuration file. | |||
# $Id$ | |||
# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/files/my.cnf-5.6,v 1.1 2014/10/08 16:42:41 grknight Exp $ | |||
# The following options will be passed to all MySQL clients | |||
[client] | |||
@@ -95,6 +95,7 @@ innodb_buffer_pool_size = 128M | |||
# 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 | |||
@@ -1,7 +1,7 @@ | |||
# | |||
# Automatically generated make config: don't edit | |||
# Busybox version: 1.23.1 | |||
# Fri Feb 27 00:46:46 2015 | |||
# Sat Sep 5 20:24:54 2015 | |||
# | |||
CONFIG_HAVE_DOT_CONFIG=y | |||
@@ -1,3 +0,0 @@ | |||
# $Id$ | |||
# | |||
# remotehost user:password |
@@ -1,3 +1,3 @@ | |||
# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/files/smtp.pass,v 1.2 2004/07/18 03:26:56 dragonheart Exp $ | |||
# $Id$ | |||
# | |||
# remotehost user:password |
@@ -1,41 +0,0 @@ | |||
# /etc/zsh/zprofile | |||
# $Id$ | |||
# Load environment settings from profile.env, which is created by | |||
# env-update from the files in /etc/env.d | |||
if [ -e /etc/profile.env ] ; then | |||
. /etc/profile.env | |||
fi | |||
# You should override these in your ~/.zprofile (or equivalent) for per-user | |||
# settings. For system defaults, you can add a new file in /etc/profile.d/. | |||
export EDITOR=${EDITOR:-/bin/nano} | |||
export PAGER=${PAGER:-/usr/bin/less} | |||
# 077 would be more secure, but 022 is generally quite realistic | |||
umask 022 | |||
# Set up PATH depending on whether we're root or a normal user. | |||
# There's no real reason to exclude sbin paths from the normal user, | |||
# but it can make tab-completion easier when they aren't in the | |||
# user's PATH to pollute the executable namespace. | |||
# | |||
# It is intentional in the following line to use || instead of -o. | |||
# This way the evaluation can be short-circuited and calling whoami is | |||
# avoided. | |||
if [ "$EUID" = "0" ] || [ "$USER" = "root" ] ; then | |||
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${ROOTPATH}" | |||
else | |||
PATH="/usr/local/bin:/usr/bin:/bin:${PATH}" | |||
fi | |||
export PATH | |||
unset ROOTPATH | |||
shopts=$- | |||
setopt nullglob | |||
for sh in /etc/profile.d/*.sh ; do | |||
[ -r "$sh" ] && . "$sh" | |||
done | |||
unsetopt nullglob | |||
set -$shopts | |||
unset sh shopts |
@@ -1,5 +1,5 @@ | |||
# /etc/zsh/zprofile | |||
# $Header: /var/cvsroot/gentoo-x86/app-shells/zsh/files/zprofile-1,v 1.1 2010/08/15 12:21:56 tove Exp $ | |||
# $Id$ | |||
# Load environment settings from profile.env, which is created by | |||
# env-update from the files in /etc/env.d | |||