aboutsummaryrefslogtreecommitdiff
path: root/init.d.misc
diff options
context:
space:
mode:
Diffstat (limited to 'init.d.misc')
-rw-r--r--init.d.misc/.gitignore11
-rw-r--r--init.d.misc/Makefile11
-rw-r--r--init.d.misc/avahi-dnsconfd.in22
-rw-r--r--init.d.misc/avahid.in22
-rw-r--r--init.d.misc/dbus.in26
-rw-r--r--init.d.misc/dhcpcd.in34
-rw-r--r--init.d.misc/dnsmasq.in31
-rw-r--r--init.d.misc/hald.in20
-rw-r--r--init.d.misc/named.in119
-rw-r--r--init.d.misc/ntpd.in44
-rw-r--r--init.d.misc/openvpn.in74
-rw-r--r--init.d.misc/polkitd.in20
-rw-r--r--init.d.misc/sshd.in42
-rw-r--r--init.d.misc/wpa_supplicant.in82
14 files changed, 0 insertions, 558 deletions
diff --git a/init.d.misc/.gitignore b/init.d.misc/.gitignore
deleted file mode 100644
index 9f1ce287..00000000
--- a/init.d.misc/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-avahi-dnsconfd
-avahid
-dhcpcd
-dbus
-hald
-named
-ntpd
-openvpn
-polkitd
-sshd
-wpa_supplicant
diff --git a/init.d.misc/Makefile b/init.d.misc/Makefile
deleted file mode 100644
index ce973c1b..00000000
--- a/init.d.misc/Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-DIR= ${INITDIR}
-SRCS= avahi-dnsconfd.in avahid.in dhcpcd.in dbus.in \
- hald.in named.in ntpd.in \
- openvpn.in polkitd.in sshd.in wpa_supplicant.in
-
-MK= ../mk
-
-SED_EXTRA+= -e 's:@VARBASE@:/var:g'
-
-include ${MK}/os.mk
-include ${MK}/scripts.mk
diff --git a/init.d.misc/avahi-dnsconfd.in b/init.d.misc/avahi-dnsconfd.in
deleted file mode 100644
index b87b6d58..00000000
--- a/init.d.misc/avahi-dnsconfd.in
+++ /dev/null
@@ -1,22 +0,0 @@
-#!@SBINDIR@/openrc-run
-# Copyright (c) 2007-2015 The OpenRC Authors.
-# See the Authors file at the top-level directory of this distribution and
-# https://github.com/OpenRC/openrc/blob/master/AUTHORS
-#
-# This file is part of OpenRC. It is subject to the license terms in
-# the LICENSE file found in the top-level directory of this
-# distribution and at https://github.com/OpenRC/openrc/blob/master/LICENSE
-# This file may not be copied, modified, propagated, or distributed
-# except according to the terms contained in the LICENSE file.
-
-command=@PKG_PREFIX@/sbin/avahi-dnsconfd
-command_args="$avahi_dnsconfd_args -D"
-pidfile=@VARBASE@/run/avahi-dnsconfd.pid
-name="Avahi DNS Configuration Daemon"
-
-depend()
-{
- use dns
- need localmount dbus
- after bootmisc
-}
diff --git a/init.d.misc/avahid.in b/init.d.misc/avahid.in
deleted file mode 100644
index b809d7b0..00000000
--- a/init.d.misc/avahid.in
+++ /dev/null
@@ -1,22 +0,0 @@
-#!@SBINDIR@/openrc-run
-# Copyright (c) 2007-2015 The OpenRC Authors.
-# See the Authors file at the top-level directory of this distribution and
-# https://github.com/OpenRC/openrc/blob/master/AUTHORS
-#
-# This file is part of OpenRC. It is subject to the license terms in
-# the LICENSE file found in the top-level directory of this
-# distribution and at https://github.com/OpenRC/openrc/blob/master/LICENSE
-# This file may not be copied, modified, propagated, or distributed
-# except according to the terms contained in the LICENSE file.
-
-command=@PKG_PREFIX@/sbin/avahi-daemon
-command_args="$avahid_args -D"
-pidfile=@VARBASE@/run/avahi-daemon/pid
-name="Avahi Service Advertisement Daemon"
-
-depend()
-{
- use dns
- need localmount dbus
- after bootmisc
-}
diff --git a/init.d.misc/dbus.in b/init.d.misc/dbus.in
deleted file mode 100644
index 0275767d..00000000
--- a/init.d.misc/dbus.in
+++ /dev/null
@@ -1,26 +0,0 @@
-#!@SBINDIR@/openrc-run
-# Copyright (c) 2007-2015 The OpenRC Authors.
-# See the Authors file at the top-level directory of this distribution and
-# https://github.com/OpenRC/openrc/blob/master/AUTHORS
-#
-# This file is part of OpenRC. It is subject to the license terms in
-# the LICENSE file found in the top-level directory of this
-# distribution and at https://github.com/OpenRC/openrc/blob/master/LICENSE
-# This file may not be copied, modified, propagated, or distributed
-# except according to the terms contained in the LICENSE file.
-
-command=@PKG_PREFIX@/bin/dbus-daemon
-pidfile=@VARBASE@/run/dbus/pid
-command_args="${dbusd_args---system}"
-name="Message Bus Daemon"
-
-depend()
-{
- need localmount net
- after bootmisc
-}
-
-start_pre()
-{
- mkdir -p $(dirname $pidfile)
-}
diff --git a/init.d.misc/dhcpcd.in b/init.d.misc/dhcpcd.in
deleted file mode 100644
index 1eee3d13..00000000
--- a/init.d.misc/dhcpcd.in
+++ /dev/null
@@ -1,34 +0,0 @@
-#!@SBINDIR@/openrc-run
-# Copyright (c) 2007-2015 The OpenRC Authors.
-# See the Authors file at the top-level directory of this distribution and
-# https://github.com/OpenRC/openrc/blob/master/AUTHORS
-#
-# This file is part of OpenRC. It is subject to the license terms in
-# the LICENSE file found in the top-level directory of this
-# distribution and at https://github.com/OpenRC/openrc/blob/master/LICENSE
-# This file may not be copied, modified, propagated, or distributed
-# except according to the terms contained in the LICENSE file.
-
-command=/sbin/dhcpcd
-pidfile=/var/run/dhcpcd.pid
-command_args=-q
-name="DHCP Client Daemon"
-
-depend()
-{
- provide net
- need localmount
- use logger
- after bootmisc modules
- before dns
-}
-
-stop_pre()
-{
- # When shutting down, kill dhcpcd but preserve network
- # We do this as /var/run/dhcpcd could be cleaned out when we
- # return to multiuser.
- if yesno $RC_GOINGDOWN; then
- : ${stopsig:=SIGKILL}
- fi
-}
diff --git a/init.d.misc/dnsmasq.in b/init.d.misc/dnsmasq.in
deleted file mode 100644
index f711b2e3..00000000
--- a/init.d.misc/dnsmasq.in
+++ /dev/null
@@ -1,31 +0,0 @@
-#!@SBINDIR@/openrc-run
-# Copyright (c) 2007-2015 The OpenRC Authors.
-# See the Authors file at the top-level directory of this distribution and
-# https://github.com/OpenRC/openrc/blob/master/AUTHORS
-#
-# This file is part of OpenRC. It is subject to the license terms in
-# the LICENSE file found in the top-level directory of this
-# distribution and at https://github.com/OpenRC/openrc/blob/master/LICENSE
-# This file may not be copied, modified, propagated, or distributed
-# except according to the terms contained in the LICENSE file.
-
-command=@PKG_PREFIX@/sbin/dnsmasq
-command_args=$dnsmasq_args
-pidfile=@VARBASE@/run/dnsmasq.pid
-required_files=/etc/dnsmasq.conf
-
-extra_started_commands="reload"
-
-depend()
-{
- provide dns
- need localmount net
- after bootmisc
-}
-
-reload()
-{
- ebegin "Reloading $RC_SVCNAME"
- start-stop-daemon --signal SIGHUP --pidfile "$pidfile"
- eend $?
-}
diff --git a/init.d.misc/hald.in b/init.d.misc/hald.in
deleted file mode 100644
index bde173c2..00000000
--- a/init.d.misc/hald.in
+++ /dev/null
@@ -1,20 +0,0 @@
-#!@SBINDIR@/openrc-run
-# Copyright (c) 2007-2015 The OpenRC Authors.
-# See the Authors file at the top-level directory of this distribution and
-# https://github.com/OpenRC/openrc/blob/master/AUTHORS
-#
-# This file is part of OpenRC. It is subject to the license terms in
-# the LICENSE file found in the top-level directory of this
-# distribution and at https://github.com/OpenRC/openrc/blob/master/LICENSE
-# This file may not be copied, modified, propagated, or distributed
-# except according to the terms contained in the LICENSE file.
-
-command=@PKG_PREFIX@/sbin/hald
-pidfile=@VARBASE@/run/hald/hald.pid
-command_args=$hald_args
-name="Hardware Abstraction Layer Daemon"
-
-depend()
-{
- need dbus
-}
diff --git a/init.d.misc/named.in b/init.d.misc/named.in
deleted file mode 100644
index 1348787f..00000000
--- a/init.d.misc/named.in
+++ /dev/null
@@ -1,119 +0,0 @@
-#!@SBINDIR@/openrc-run
-# Copyright (c) 2007-2015 The OpenRC Authors.
-# See the Authors file at the top-level directory of this distribution and
-# https://github.com/OpenRC/openrc/blob/master/AUTHORS
-#
-# This file is part of OpenRC. It is subject to the license terms in
-# the LICENSE file found in the top-level directory of this
-# distribution and at https://github.com/OpenRC/openrc/blob/master/LICENSE
-# This file may not be copied, modified, propagated, or distributed
-# except according to the terms contained in the LICENSE file.
-
-command=/usr/sbin/named
-command_args=$named_args
-pidfile=@VARBASE@/run/named.pid
-name="Domain Name server"
-extra_started_commands="reload"
-
-namedb=/etc/namedb
-uid=named
-case "$RC_UNAME" in
- FreeBSD)
- uid=bind
- pidfile=@VARBASE@/run/named/pid
- ;;
- Linux)
- uid=bind
- ;;
-esac
-: ${named_uid:=${uid}}
-
-depend()
-{
- provide dns
- need localmount
- after bootmisc
-}
-
-start_pre()
-{
- if [ -n "$named_chroot" ]; then
- # Create (or update) the chroot directory structure
- if [ -r /etc/mtree/BIND.chroot.dist ]; then
- mtree -deU -f /etc/mtree/BIND.chroot.dist -p "$named_chroot"
- else
- ewarn "/etc/mtree/BIND.chroot.dist missing,"
- ewarn "chroot directory structure not updated"
- fi
-
- if [ ! -d "$named_chroot"/. ]; then
- eerror "chroot directory $named_chroot missing"
- exit 1
- fi
-
- # Create /etc/namedb symlink
- if [ ! -L "$namedb" ]; then
- if [ -d "$namedb" ]; then
- ewarn "named chroot: $namedb is a directory!"
- elif [ -e "$namedb" ]; then
- ewarn "named chroot: $namedb exists!"
- else
- ln -s "$named_chroot$namedb" "$namedb"
- fi
- else
- # Make sure it points to the right place.
- ln -shf "$named_chroot$namedb" "$namedb"
- fi
-
- case "$RC_UNAME" in
- *BSD|DragonFly)
- # Mount a devfs in the chroot directory if needed
- umount "$named_chroot"/dev 2>/dev/null
- mount -t devfs dev "$named_chroot"/dev
- devfs -m "$named_chroot"/dev \
- ruleset devfsrules_hide_all
- devfs -m "$named_chroot"/dev \
- rule apply path null unhide
- devfs -m "$named_chroot"/dev \
- rule apply path random unhide
- ;;
- esac
-
- # Copy local timezone information if it is not up to date.
- if [ -r /etc/localtime ]; then
- cmp -s /etc/localtime "$named_chroot/etc/localtime" ||
- cp -p /etc/localtime "$named_chroot/etc/localtime"
- fi
-
- command_args="$command_args -t $named_chroot"
-
- ln -fs "$named_chroot$pidfile" "$pidfile"
- fi
-
- if [ ! -s "$named_chroot$namedb/rndc.conf" ]; then
- local confgen="${command%/named}/rndc-confgen -a -b256 -u $named_uid \
- -c $named_chrootdir/etc/namedb/rndc.key"
- if [ -s "$named_chroot$namedb/rndc.key" ]; then
- local getuser="stat -f%Su"
- [ "$RC_UNAME" = Linux ] && getuser="stat -c%U"
- case $(${getuser} "$named_chroot$namedb"/rndc.key) in
- root|"$named_uid");;
- *) $confgen;;
- esac
- else
- $confgen
- fi
- fi
-}
-
-reload()
-{
- rndc reload
-}
-
-stop_post()
-{
- if [ -n "$named_chroot" -a -c "$named_chroot"/dev/null ]; then
- umount "$named_chroot"/dev 2>/dev/null || true
- fi
-}
diff --git a/init.d.misc/ntpd.in b/init.d.misc/ntpd.in
deleted file mode 100644
index 786c022d..00000000
--- a/init.d.misc/ntpd.in
+++ /dev/null
@@ -1,44 +0,0 @@
-#!@SBINDIR@/openrc-run
-# Copyright (c) 2007-2015 The OpenRC Authors.
-# See the Authors file at the top-level directory of this distribution and
-# https://github.com/OpenRC/openrc/blob/master/AUTHORS
-#
-# This file is part of OpenRC. It is subject to the license terms in
-# the LICENSE file found in the top-level directory of this
-# distribution and at https://github.com/OpenRC/openrc/blob/master/LICENSE
-# This file may not be copied, modified, propagated, or distributed
-# except according to the terms contained in the LICENSE file.
-
-: ${ntpd_config:=/etc/ntp.conf}
-: ${ntpd_drift:=/var/db/ntpd.drift}
-
-command=/usr/sbin/ntpd
-required_files=$ntpd_config
-pidfile=/var/run/ntpd.pid
-command_args="$ntpd_args -c $ntpd_config -f $ntpd_drift -p $pidfile"
-name="Network Time Protocol Daemon"
-
-depend()
-{
- use dns
- need localmount
- after bootmisc ntp-client
-}
-
-start_pre()
-{
- if [ -n "$ntpd_chroot" ]; then
- case "$RC_UNAME" in
- *BSD|DragonFly)
- if [ ! -c "$ntpd_chroot/dev/clockctl" ]; then
- rm -f "$ntpd_chroot/dev/clockctl"
- (cd /dev; /bin/pax -rw -pe clockctl \
- "$ntpd_chroot/dev")
- fi
- ;;
- esac
- ln -fs "$ntpd_chroot$ntpd_drift" "$ntpd_drift"
-
- command_args="$command_args -u ntpd:ntpd -i $ntpd_chroot"
- fi
-}
diff --git a/init.d.misc/openvpn.in b/init.d.misc/openvpn.in
deleted file mode 100644
index 95e94821..00000000
--- a/init.d.misc/openvpn.in
+++ /dev/null
@@ -1,74 +0,0 @@
-#!@SBINDIR@/openrc-run
-# Copyright (c) 2007-2015 The OpenRC Authors.
-# See the Authors file at the top-level directory of this distribution and
-# https://github.com/OpenRC/openrc/blob/master/AUTHORS
-#
-# This file is part of OpenRC. It is subject to the license terms in
-# the LICENSE file found in the top-level directory of this
-# distribution and at https://github.com/OpenRC/openrc/blob/master/LICENSE
-# This file may not be copied, modified, propagated, or distributed
-# except according to the terms contained in the LICENSE file.
-
-vpn=${RC_SVCNAME#*.}
-name="OpenVPN"
-[ "$vpn" != openvpn ] && name="$name ($vpn)"
-command=@PKG_PREFIX@/sbin/openvpn
-
-pidfile=@VARBASE@/run/"$RC_SVCNAME".pid
-: ${openvpn_dir:=@PKG_PREFIX@/etc/openvpn}
-: ${openvpn_config:=$openvpn_dir/$vpn.conf}
-command_args="$openvpn_args --daemon --config $openvpn_config"
-command_args="$command_args --writepid $pidfile"
-required_dirs=$openvpn_dir
-required_files=$openvpn_config
-
-# If we're an openvpn client, then supply a nice default config
-# You can find sample up/down scripts in the OpenRC support/openvpn dir
-if yesno $openvpn_client; then
- : ${openvpn_up:=${openvpn_dir}/up.sh}
- : ${openvpn_down:=${openvpn_dir}/down.sh}
- command_args="$command_args --nobind --up-delay --up-restart --down-pre"
- command_args="$command_args --up $openvpn_up"
- command_args="$command_args --down $openvpn_down"
- required_files="$required_files $openvpn_up $openvpn_down"
-
- in_background_fake="start stop"
- start_inactive=YES
-fi
-
-depend()
-{
- need localmount net
- use dns
- after bootmisc
-}
-
-start_pre()
-{
- # Linux has good dynamic tun/tap creation
- if [ "$RC_UNAME" = Linux ]; then
- if [ ! -e /dev/net/tun ]; then
- if ! modprobe tun; then
- eerror "TUN/TAP support is not available in this kernel"
- return 1
- fi
- fi
- if [ -h /dev/net/tun -a -c /dev/misc/net/tun ]; then
- ebegin "Detected broken /dev/net/tun symlink, fixing..."
- rm -f /dev/net/tun
- ln -s /dev/misc/net/tun /dev/net/tun
- eend $?
- fi
- else
- if command -v kldload >/dev/null 2>&1; then
- # Hammer the modules home by default
- sysctl -a | grep -q '\.tun\.' || kldload if_tun
- sysctl -a | grep -q '\.tap\.' || kldload if_tap
- fi
- fi
-
- # If the config file does not specify the cd option, we do
- if ! grep -q "^[ \t]*cd[ \t].*" "$openvpn_config"; then
- command_args="$command_args --cd $openvpn_dir"
- fi
-}
diff --git a/init.d.misc/polkitd.in b/init.d.misc/polkitd.in
deleted file mode 100644
index a36e3395..00000000
--- a/init.d.misc/polkitd.in
+++ /dev/null
@@ -1,20 +0,0 @@
-#!@SBINDIR@/openrc-run
-# Copyright (c) 2007-2015 The OpenRC Authors.
-# See the Authors file at the top-level directory of this distribution and
-# https://github.com/OpenRC/openrc/blob/master/AUTHORS
-#
-# This file is part of OpenRC. It is subject to the license terms in
-# the LICENSE file found in the top-level directory of this
-# distribution and at https://github.com/OpenRC/openrc/blob/master/LICENSE
-# This file may not be copied, modified, propagated, or distributed
-# except according to the terms contained in the LICENSE file.
-
-command=@PKG_PREFIX@/sbin/polkitd
-pidfile=@VARBASE@/run/polkitd/polkitd.pid
-command_args="$polkitd_args"
-name="PolicyKit Daemon"
-
-depend()
-{
- need dbus
-}
diff --git a/init.d.misc/sshd.in b/init.d.misc/sshd.in
deleted file mode 100644
index d89224d3..00000000
--- a/init.d.misc/sshd.in
+++ /dev/null
@@ -1,42 +0,0 @@
-#!@SBINDIR@/openrc-run
-# Copyright (c) 2007-2015 The OpenRC Authors.
-# See the Authors file at the top-level directory of this distribution and
-# https://github.com/OpenRC/openrc/blob/master/AUTHORS
-#
-# This file is part of OpenRC. It is subject to the license terms in
-# the LICENSE file found in the top-level directory of this
-# distribution and at https://github.com/OpenRC/openrc/blob/master/LICENSE
-# This file may not be copied, modified, propagated, or distributed
-# except according to the terms contained in the LICENSE file.
-
-command=/usr/sbin/sshd
-command_args=$sshd_args
-pidfile=@VARBASE@/run/sshd.pid
-required_files=/etc/ssh/sshd_config
-
-depend()
-{
- use logger dns
- need net
-}
-
-start_pre()
-{
- if [ ! -e /etc/ssh/ssh_host_key ]; then
- ebegin "Generating Hostkey"
- ssh-keygen -t rsa1 -b 1024 -f /etc/ssh/ssh_host_key -N ''
- eend $? || return 1
- fi
- if [ ! -e /etc/ssh/ssh_host_dsa_key ]; then
- ebegin "Generating DSA Hostkey"
- ssh-keygen -d -f /etc/ssh/ssh_host_dsa_key -N ''
- eend $? || return 1
- fi
- if [ ! -e /etc/ssh/ssh_host_rsa_key ]; then
- ebegin "Generating RSA Hostkey"
- ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''
- eend $? || return 1
- fi
-
- $command -t
-}
diff --git a/init.d.misc/wpa_supplicant.in b/init.d.misc/wpa_supplicant.in
deleted file mode 100644
index 7b7ddc57..00000000
--- a/init.d.misc/wpa_supplicant.in
+++ /dev/null
@@ -1,82 +0,0 @@
-#!@SBINDIR@/openrc-run
-# Copyright (c) 2007-2015 The OpenRC Authors.
-# See the Authors file at the top-level directory of this distribution and
-# https://github.com/OpenRC/openrc/blob/master/AUTHORS
-#
-# This file is part of OpenRC. It is subject to the license terms in
-# the LICENSE file found in the top-level directory of this
-# distribution and at https://github.com/OpenRC/openrc/blob/master/LICENSE
-# This file may not be copied, modified, propagated, or distributed
-# except according to the terms contained in the LICENSE file.
-
-command=/usr/sbin/wpa_supplicant
-: ${wpa_supplicant_conf:=/etc/wpa_supplicant.conf}
-wpa_supplicant_if=${wpa_supplicant_if:+-i}$wpa_supplicant_if
-command_args="$wpa_supplicant_args -B -c$wpa_supplicant_conf $wpa_supplicant_if"
-name="WPA Supplicant Daemon"
-
-depend()
-{
- need localmount
- use logger
- after bootmisc modules
- before dns dhcpcd net
- keyword -shutdown
-}
-
-find_wireless()
-{
- local iface=
-
- case "$RC_UNAME" in
- Linux)
- for iface in /sys/class/net/*; do
- if [ -e "$iface"/wireless -o \
- -e "$iface"/phy80211 ]
- then
- echo "${iface##*/}"
- return 0
- fi
- done
- ;;
- FreeBSD)
- for iface in $(sysctl -b net.wlan.devices 2>/dev/null); do
- echo "${iface##*/}"
- done
- ;;
- *)
- for iface in /dev/net/* $(ifconfig -l 2>/dev/null); do
- if ifconfig "${iface##*/}" 2>/dev/null | \
- grep -q "[ ]*ssid "
- then
- echo "${iface##*/}"
- return 0
- fi
- done
- ;;
- esac
-
- return 1
-}
-
-append_wireless()
-{
- local iface= i=
-
- iface=$(find_wireless)
- if [ -n "$iface" ]; then
- for i in $iface; do
- command_args="$command_args -i$i"
- done
- else
- eerror "Could not find a wireless interface"
- fi
-}
-
-start_pre()
-{
- case " $command_args" in
- *" -i"*) ;;
- *) append_wireless;;
- esac
-}