sps-core · log · files · refs · tags · releases · people · languages · GitHub · commit
d8ceeb2
Ship init scripts for every PID 1 with core daemons.
Parents
Stat
base/eudev/files/dinit-udevd | 4 ++++ base/eudev/files/openrc-udevd | 10 +++++++++ base/eudev/files/runit-udevd | 3 +++ base/eudev/files/s6-udevd | 3 +++ base/eudev/files/shepherd-udevd.scm | 9 ++++++++ base/eudev/files/sysvinit-udevd | 41 +++++++++++++++++++++++++++++++++++ base/eudev/files/udevd.service | 9 ++++++++ base/eudev/recipe | 10 ++++++++- libs/dbus/files/dbus.service | 7 +----- libs/dbus/files/dinit-dbus | 4 ++++ libs/dbus/files/openrc-dbus | 5 ++--- libs/dbus/files/runit-dbus | 4 ++++ libs/dbus/files/s6-dbus | 4 ++++ libs/dbus/files/shepherd-dbus.scm | 9 ++++++++ libs/dbus/files/sysvinit-dbus | 42 ++++++++++++++++++++++++++++++++++++ libs/dbus/recipe | 9 ++++++-- net/dhcpcd/files/dhcpcd.service | 6 ++---- net/dhcpcd/files/dinit-dhcpcd | 4 ++++ net/dhcpcd/files/openrc-dhcpcd | 5 +++-- net/dhcpcd/files/runit-dhcpcd | 3 +++ net/dhcpcd/files/s6-dhcpcd | 3 +++ net/dhcpcd/files/shepherd-dhcpcd.scm | 9 ++++++++ net/dhcpcd/files/sysvinit-dhcpcd | 41 +++++++++++++++++++++++++++++++++++ net/dhcpcd/recipe | 9 ++++++-- net/openssh/files/dinit-sshd | 4 ++++ net/openssh/files/openrc-sshd | 11 ++++------ net/openssh/files/runit-sshd | 4 ++++ net/openssh/files/s6-sshd | 4 ++++ net/openssh/files/shepherd-sshd.scm | 9 ++++++++ net/openssh/files/sshd.service | 3 +-- net/openssh/files/sysvinit-sshd | 42 ++++++++++++++++++++++++++++++++++++ net/openssh/recipe | 9 ++++++-- 32 files changed, 308 insertions(+), 31 deletions(-)
Diff
diff --git a/base/eudev/files/dinit-udevd b/base/eudev/files/dinit-udevd
new file mode 100644
index 0000000..df837e9
--- /dev/null
+++ b/base/eudev/files/dinit-udevd
@@ -0,0 +1,4 @@
+type = process
+command = /usr/sbin/udevd
+restart = true
+smooth-recovery = true
diff --git a/base/eudev/files/openrc-udevd b/base/eudev/files/openrc-udevd
new file mode 100755
index 0000000..8f3292f
--- /dev/null
+++ b/base/eudev/files/openrc-udevd
@@ -0,0 +1,10 @@
+#!/sbin/openrc-run
+description="eudev device manager"
+command="/usr/sbin/udevd"
+command_args=""
+command_background="yes"
+pidfile="/run/udevd.pid"
+
+depend() {
+ need localmount
+}
diff --git a/base/eudev/files/runit-udevd b/base/eudev/files/runit-udevd
new file mode 100755
index 0000000..0f6df7d
--- /dev/null
+++ b/base/eudev/files/runit-udevd
@@ -0,0 +1,3 @@
+#!/bin/sh
+exec 2>&1
+exec /usr/sbin/udevd
diff --git a/base/eudev/files/s6-udevd b/base/eudev/files/s6-udevd
new file mode 100755
index 0000000..0f6df7d
--- /dev/null
+++ b/base/eudev/files/s6-udevd
@@ -0,0 +1,3 @@
+#!/bin/sh
+exec 2>&1
+exec /usr/sbin/udevd
diff --git a/base/eudev/files/shepherd-udevd.scm b/base/eudev/files/shepherd-udevd.scm
new file mode 100644
index 0000000..3f4d44b
--- /dev/null
+++ b/base/eudev/files/shepherd-udevd.scm
@@ -0,0 +1,9 @@
+(use-modules (shepherd service))
+(register-services
+ (list (service
+ '(udevd)
+ #:requirement '()
+ #:documentation "eudev device manager"
+ #:start (make-forkexec-constructor '("/usr/sbin/udevd"))
+ #:stop (make-kill-destructor)
+ #:respawn? #t)))
diff --git a/base/eudev/files/sysvinit-udevd b/base/eudev/files/sysvinit-udevd
new file mode 100755
index 0000000..2dd8b82
--- /dev/null
+++ b/base/eudev/files/sysvinit-udevd
@@ -0,0 +1,41 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: udevd
+# Required-Start: $remote_fs
+# Required-Stop: $remote_fs
+# Default-Start: S
+# Default-Stop:
+# Short-Description: eudev device manager
+### END INIT INFO
+
+if [ -f /etc/rc.d/init.d/functions ]; then
+ . /etc/rc.d/init.d/functions
+elif [ -f /etc/init.d/functions ]; then
+ . /etc/init.d/functions
+fi
+
+NAME=udevd
+DAEMON="/usr/sbin/udevd"
+DAEMON_ARGS=""
+PIDFILE="/run/udevd.pid"
+USER=""
+
+start() {
+ start_daemon -p "$PIDFILE" ${USER:+-c "$USER"} "$DAEMON" $DAEMON_ARGS
+}
+
+stop() {
+ killproc -p "$PIDFILE" "$DAEMON"
+}
+
+status() {
+ pidofproc -p "$PIDFILE" "$DAEMON"
+}
+
+case $1 in
+ start) start ;;
+ stop) stop ;;
+ restart) stop; start ;;
+ status) status ;;
+ *) printf '%s\n' "Usage: $0 {start|stop|restart|status}" >&2; exit 1 ;;
+esac
diff --git a/base/eudev/files/udevd.service b/base/eudev/files/udevd.service
new file mode 100644
index 0000000..2ec09dc
--- /dev/null
+++ b/base/eudev/files/udevd.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=eudev device manager
+
+[Service]
+ExecStart=/usr/sbin/udevd
+Restart=on-failure
+
+[Install]
+WantedBy=sysinit.target
diff --git a/base/eudev/recipe b/base/eudev/recipe
index 89bd433..15e6c7d 100644
--- a/base/eudev/recipe
+++ b/base/eudev/recipe
@@ -1,6 +1,6 @@
name eudev
version 3.2.14
-release 2
+release 3
description eudev: device manager
source https://github.com/eudev-project/eudev/releases/download/v3.2.14/eudev-3.2.14.tar.gz
@@ -13,3 +13,11 @@ conflict systemd
configure ./configure --prefix=/usr
build make -j"$MAKEJOBS"
install make install DESTDIR="$PKG"
+install mkdir -p "$PKG/usr/lib/systemd/system" "$PKG/etc/init.d" "$PKG/etc/sv/udevd" "$PKG/etc/s6/sv/udevd" "$PKG/etc/dinit.d" "$PKG/etc/shepherd.d" "$PKG/etc/rc.d/init.d"
+install install -m 0644 "$SRC/files/udevd.service" "$PKG/usr/lib/systemd/system/udevd.service"
+install install -m 0755 "$SRC/files/openrc-udevd" "$PKG/etc/init.d/udevd"
+install install -m 0755 "$SRC/files/runit-udevd" "$PKG/etc/sv/udevd/run"
+install install -m 0755 "$SRC/files/s6-udevd" "$PKG/etc/s6/sv/udevd/run"
+install install -m 0644 "$SRC/files/dinit-udevd" "$PKG/etc/dinit.d/udevd"
+install install -m 0644 "$SRC/files/shepherd-udevd.scm" "$PKG/etc/shepherd.d/udevd.scm"
+install install -m 0755 "$SRC/files/sysvinit-udevd" "$PKG/etc/rc.d/init.d/udevd"
diff --git a/libs/dbus/files/dbus.service b/libs/dbus/files/dbus.service
index 11cf4f2..0e20c6b 100644
--- a/libs/dbus/files/dbus.service
+++ b/libs/dbus/files/dbus.service
@@ -1,13 +1,8 @@
[Unit]
-Description=D-Bus System Message Bus
-Documentation=man:dbus-daemon(1)
-DefaultDependencies=no
-After=local-fs.target
+Description=D-Bus system message bus
[Service]
-ExecStartPre=/bin/mkdir -p /run/dbus
ExecStart=/usr/bin/dbus-daemon --system --nofork --nopidfile --nosyslog
-ExecReload=/usr/bin/dbus-send --print-reply --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig
Restart=on-failure
[Install]
diff --git a/libs/dbus/files/dinit-dbus b/libs/dbus/files/dinit-dbus
new file mode 100644
index 0000000..b356f3b
--- /dev/null
+++ b/libs/dbus/files/dinit-dbus
@@ -0,0 +1,4 @@
+type = process
+command = /usr/bin/dbus-daemon --system --nofork --nopidfile --nosyslog
+restart = true
+smooth-recovery = true
diff --git a/libs/dbus/files/openrc-dbus b/libs/dbus/files/openrc-dbus
old mode 100644
new mode 100755
index 48bd671..8ef95c5
--- a/libs/dbus/files/openrc-dbus
+++ b/libs/dbus/files/openrc-dbus
@@ -3,11 +3,10 @@ description="D-Bus system message bus"
command="/usr/bin/dbus-daemon"
command_args="--system --nofork --nopidfile --nosyslog"
command_background="yes"
-pidfile="/run/dbus/dbus.pid"
+pidfile="/run/dbus.pid"
depend() {
- need localmount
- provide dbus
+ need localmount
}
start_pre() {
diff --git a/libs/dbus/files/runit-dbus b/libs/dbus/files/runit-dbus
new file mode 100755
index 0000000..486471a
--- /dev/null
+++ b/libs/dbus/files/runit-dbus
@@ -0,0 +1,4 @@
+#!/bin/sh
+exec 2>&1
+mkdir -p /run/dbus /var/lib/dbus
+exec /usr/bin/dbus-daemon --system --nofork --nopidfile --nosyslog
diff --git a/libs/dbus/files/s6-dbus b/libs/dbus/files/s6-dbus
new file mode 100755
index 0000000..486471a
--- /dev/null
+++ b/libs/dbus/files/s6-dbus
@@ -0,0 +1,4 @@
+#!/bin/sh
+exec 2>&1
+mkdir -p /run/dbus /var/lib/dbus
+exec /usr/bin/dbus-daemon --system --nofork --nopidfile --nosyslog
diff --git a/libs/dbus/files/shepherd-dbus.scm b/libs/dbus/files/shepherd-dbus.scm
new file mode 100644
index 0000000..60f0415
--- /dev/null
+++ b/libs/dbus/files/shepherd-dbus.scm
@@ -0,0 +1,9 @@
+(use-modules (shepherd service))
+(register-services
+ (list (service
+ '(dbus)
+ #:requirement '()
+ #:documentation "D-Bus system message bus"
+ #:start (make-forkexec-constructor '("/usr/bin/dbus-daemon" "--system" "--nofork" "--nopidfile" "--nosyslog"))
+ #:stop (make-kill-destructor)
+ #:respawn? #t)))
diff --git a/libs/dbus/files/sysvinit-dbus b/libs/dbus/files/sysvinit-dbus
new file mode 100755
index 0000000..492da8e
--- /dev/null
+++ b/libs/dbus/files/sysvinit-dbus
@@ -0,0 +1,42 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: dbus
+# Required-Start: $remote_fs
+# Required-Stop: $remote_fs
+# Default-Start: S
+# Default-Stop:
+# Short-Description: D-Bus system message bus
+### END INIT INFO
+
+if [ -f /etc/rc.d/init.d/functions ]; then
+ . /etc/rc.d/init.d/functions
+elif [ -f /etc/init.d/functions ]; then
+ . /etc/init.d/functions
+fi
+
+NAME=dbus
+DAEMON="/usr/bin/dbus-daemon"
+DAEMON_ARGS="--system --nofork --nopidfile --nosyslog"
+PIDFILE="/run/dbus.pid"
+USER=""
+
+start() {
+ mkdir -p /run/dbus /var/lib/dbus
+ start_daemon -p "$PIDFILE" ${USER:+-c "$USER"} "$DAEMON" $DAEMON_ARGS
+}
+
+stop() {
+ killproc -p "$PIDFILE" "$DAEMON"
+}
+
+status() {
+ pidofproc -p "$PIDFILE" "$DAEMON"
+}
+
+case $1 in
+ start) start ;;
+ stop) stop ;;
+ restart) stop; start ;;
+ status) status ;;
+ *) printf '%s\n' "Usage: $0 {start|stop|restart|status}" >&2; exit 1 ;;
+esac
diff --git a/libs/dbus/recipe b/libs/dbus/recipe
index 2937821..bf2144a 100644
--- a/libs/dbus/recipe
+++ b/libs/dbus/recipe
@@ -1,6 +1,6 @@
name dbus
version 1.16.2
-release 3
+release 4
description dbus: message bus
source https://dbus.freedesktop.org/releases/dbus/dbus-1.16.2.tar.xz
@@ -12,6 +12,11 @@ depend expat
configure meson setup build --prefix=/usr --libdir=lib64 --buildtype=release -Dsystemd=disabled -Dselinux=disabled
build meson compile -C build
install DESTDIR="$PKG" meson install -C build --no-rebuild
-install mkdir -p "$PKG/usr/lib/systemd/system" "$PKG/etc/init.d"
+install mkdir -p "$PKG/usr/lib/systemd/system" "$PKG/etc/init.d" "$PKG/etc/sv/dbus" "$PKG/etc/s6/sv/dbus" "$PKG/etc/dinit.d" "$PKG/etc/shepherd.d" "$PKG/etc/rc.d/init.d"
install install -m 0644 "$SRC/files/dbus.service" "$PKG/usr/lib/systemd/system/dbus.service"
install install -m 0755 "$SRC/files/openrc-dbus" "$PKG/etc/init.d/dbus"
+install install -m 0755 "$SRC/files/runit-dbus" "$PKG/etc/sv/dbus/run"
+install install -m 0755 "$SRC/files/s6-dbus" "$PKG/etc/s6/sv/dbus/run"
+install install -m 0644 "$SRC/files/dinit-dbus" "$PKG/etc/dinit.d/dbus"
+install install -m 0644 "$SRC/files/shepherd-dbus.scm" "$PKG/etc/shepherd.d/dbus.scm"
+install install -m 0755 "$SRC/files/sysvinit-dbus" "$PKG/etc/rc.d/init.d/dbus"
diff --git a/net/dhcpcd/files/dhcpcd.service b/net/dhcpcd/files/dhcpcd.service
index 1534c40..19198a0 100644
--- a/net/dhcpcd/files/dhcpcd.service
+++ b/net/dhcpcd/files/dhcpcd.service
@@ -1,8 +1,6 @@
[Unit]
-Description=DHCP Client Daemon
-After=network-pre.target
-Wants=network.target
-Before=network.target
+Description=DHCP client daemon
+After=network.target
[Service]
ExecStart=/usr/sbin/dhcpcd --nobackground
diff --git a/net/dhcpcd/files/dinit-dhcpcd b/net/dhcpcd/files/dinit-dhcpcd
new file mode 100644
index 0000000..10791cd
--- /dev/null
+++ b/net/dhcpcd/files/dinit-dhcpcd
@@ -0,0 +1,4 @@
+type = process
+command = /usr/sbin/dhcpcd --nobackground
+restart = true
+smooth-recovery = true
diff --git a/net/dhcpcd/files/openrc-dhcpcd b/net/dhcpcd/files/openrc-dhcpcd
old mode 100644
new mode 100755
index 64a6b93..04473c5
--- a/net/dhcpcd/files/openrc-dhcpcd
+++ b/net/dhcpcd/files/openrc-dhcpcd
@@ -1,10 +1,11 @@
#!/sbin/openrc-run
-description="DHCP client"
+description="DHCP client daemon"
command="/usr/sbin/dhcpcd"
command_args="--nobackground"
command_background="yes"
pidfile="/run/dhcpcd.pid"
depend() {
- provide net
+ use net
+ after net
}
diff --git a/net/dhcpcd/files/runit-dhcpcd b/net/dhcpcd/files/runit-dhcpcd
new file mode 100755
index 0000000..ad3de1d
--- /dev/null
+++ b/net/dhcpcd/files/runit-dhcpcd
@@ -0,0 +1,3 @@
+#!/bin/sh
+exec 2>&1
+exec /usr/sbin/dhcpcd --nobackground
diff --git a/net/dhcpcd/files/s6-dhcpcd b/net/dhcpcd/files/s6-dhcpcd
new file mode 100755
index 0000000..ad3de1d
--- /dev/null
+++ b/net/dhcpcd/files/s6-dhcpcd
@@ -0,0 +1,3 @@
+#!/bin/sh
+exec 2>&1
+exec /usr/sbin/dhcpcd --nobackground
diff --git a/net/dhcpcd/files/shepherd-dhcpcd.scm b/net/dhcpcd/files/shepherd-dhcpcd.scm
new file mode 100644
index 0000000..230303f
--- /dev/null
+++ b/net/dhcpcd/files/shepherd-dhcpcd.scm
@@ -0,0 +1,9 @@
+(use-modules (shepherd service))
+(register-services
+ (list (service
+ '(dhcpcd)
+ #:requirement '()
+ #:documentation "DHCP client daemon"
+ #:start (make-forkexec-constructor '("/usr/sbin/dhcpcd" "--nobackground"))
+ #:stop (make-kill-destructor)
+ #:respawn? #t)))
diff --git a/net/dhcpcd/files/sysvinit-dhcpcd b/net/dhcpcd/files/sysvinit-dhcpcd
new file mode 100755
index 0000000..b2829c7
--- /dev/null
+++ b/net/dhcpcd/files/sysvinit-dhcpcd
@@ -0,0 +1,41 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: dhcpcd
+# Required-Start: $remote_fs
+# Required-Stop: $remote_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: DHCP client daemon
+### END INIT INFO
+
+if [ -f /etc/rc.d/init.d/functions ]; then
+ . /etc/rc.d/init.d/functions
+elif [ -f /etc/init.d/functions ]; then
+ . /etc/init.d/functions
+fi
+
+NAME=dhcpcd
+DAEMON="/usr/sbin/dhcpcd"
+DAEMON_ARGS="--nobackground"
+PIDFILE="/run/dhcpcd.pid"
+USER=""
+
+start() {
+ start_daemon -p "$PIDFILE" ${USER:+-c "$USER"} "$DAEMON" $DAEMON_ARGS
+}
+
+stop() {
+ killproc -p "$PIDFILE" "$DAEMON"
+}
+
+status() {
+ pidofproc -p "$PIDFILE" "$DAEMON"
+}
+
+case $1 in
+ start) start ;;
+ stop) stop ;;
+ restart) stop; start ;;
+ status) status ;;
+ *) printf '%s\n' "Usage: $0 {start|stop|restart|status}" >&2; exit 1 ;;
+esac
diff --git a/net/dhcpcd/recipe b/net/dhcpcd/recipe
index e9b23c6..c26547a 100644
--- a/net/dhcpcd/recipe
+++ b/net/dhcpcd/recipe
@@ -1,6 +1,6 @@
name dhcpcd
version 10.2.4
-release 2
+release 3
description dhcpcd: DHCP client
source https://github.com/NetworkConfiguration/dhcpcd/archive/refs/tags/v10.2.4.tar.gz
@@ -11,6 +11,11 @@ depend filesystem
configure ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib/dhcpcd --dbdir=/var/lib/dhcpcd
build make -j"$MAKEJOBS"
install make install DESTDIR="$PKG"
-install mkdir -p "$PKG/usr/lib/systemd/system" "$PKG/etc/init.d"
+install mkdir -p "$PKG/usr/lib/systemd/system" "$PKG/etc/init.d" "$PKG/etc/sv/dhcpcd" "$PKG/etc/s6/sv/dhcpcd" "$PKG/etc/dinit.d" "$PKG/etc/shepherd.d" "$PKG/etc/rc.d/init.d"
install install -m 0644 "$SRC/files/dhcpcd.service" "$PKG/usr/lib/systemd/system/dhcpcd.service"
install install -m 0755 "$SRC/files/openrc-dhcpcd" "$PKG/etc/init.d/dhcpcd"
+install install -m 0755 "$SRC/files/runit-dhcpcd" "$PKG/etc/sv/dhcpcd/run"
+install install -m 0755 "$SRC/files/s6-dhcpcd" "$PKG/etc/s6/sv/dhcpcd/run"
+install install -m 0644 "$SRC/files/dinit-dhcpcd" "$PKG/etc/dinit.d/dhcpcd"
+install install -m 0644 "$SRC/files/shepherd-dhcpcd.scm" "$PKG/etc/shepherd.d/dhcpcd.scm"
+install install -m 0755 "$SRC/files/sysvinit-dhcpcd" "$PKG/etc/rc.d/init.d/dhcpcd"
diff --git a/net/openssh/files/dinit-sshd b/net/openssh/files/dinit-sshd
new file mode 100644
index 0000000..333257d
--- /dev/null
+++ b/net/openssh/files/dinit-sshd
@@ -0,0 +1,4 @@
+type = process
+command = /usr/sbin/sshd -D
+restart = true
+smooth-recovery = true
diff --git a/net/openssh/files/openrc-sshd b/net/openssh/files/openrc-sshd
old mode 100644
new mode 100755
index 8c8ec2c..5c14569
--- a/net/openssh/files/openrc-sshd
+++ b/net/openssh/files/openrc-sshd
@@ -1,18 +1,15 @@
#!/sbin/openrc-run
-description="OpenSSH server"
+description="OpenSSH daemon"
command="/usr/sbin/sshd"
command_args="-D"
command_background="yes"
pidfile="/run/sshd.pid"
depend() {
- use net
- after net
+ use net
+ after net
}
start_pre() {
- if command -v ssh-keygen >/dev/null 2>&1; then
- ssh-keygen -A
- fi
- mkdir -p /var/lib/sshd
+ if command -v ssh-keygen >/dev/null 2>&1; then ssh-keygen -A >/dev/null 2>&1 || :; fi
}
diff --git a/net/openssh/files/runit-sshd b/net/openssh/files/runit-sshd
new file mode 100755
index 0000000..0e2d74b
--- /dev/null
+++ b/net/openssh/files/runit-sshd
@@ -0,0 +1,4 @@
+#!/bin/sh
+exec 2>&1
+if command -v ssh-keygen >/dev/null 2>&1; then ssh-keygen -A >/dev/null 2>&1 || :; fi
+exec /usr/sbin/sshd -D
diff --git a/net/openssh/files/s6-sshd b/net/openssh/files/s6-sshd
new file mode 100755
index 0000000..0e2d74b
--- /dev/null
+++ b/net/openssh/files/s6-sshd
@@ -0,0 +1,4 @@
+#!/bin/sh
+exec 2>&1
+if command -v ssh-keygen >/dev/null 2>&1; then ssh-keygen -A >/dev/null 2>&1 || :; fi
+exec /usr/sbin/sshd -D
diff --git a/net/openssh/files/shepherd-sshd.scm b/net/openssh/files/shepherd-sshd.scm
new file mode 100644
index 0000000..c593d4f
--- /dev/null
+++ b/net/openssh/files/shepherd-sshd.scm
@@ -0,0 +1,9 @@
+(use-modules (shepherd service))
+(register-services
+ (list (service
+ '(sshd)
+ #:requirement '()
+ #:documentation "OpenSSH daemon"
+ #:start (make-forkexec-constructor '("/usr/sbin/sshd" "-D"))
+ #:stop (make-kill-destructor)
+ #:respawn? #t)))
diff --git a/net/openssh/files/sshd.service b/net/openssh/files/sshd.service
index a6a2d33..052400a 100644
--- a/net/openssh/files/sshd.service
+++ b/net/openssh/files/sshd.service
@@ -1,9 +1,8 @@
[Unit]
-Description=OpenSSH server daemon
+Description=OpenSSH daemon
After=network.target
[Service]
-ExecStartPre=/bin/sh -c 'if command -v ssh-keygen >/dev/null 2>&1; then ssh-keygen -A; fi'
ExecStart=/usr/sbin/sshd -D
Restart=on-failure
diff --git a/net/openssh/files/sysvinit-sshd b/net/openssh/files/sysvinit-sshd
new file mode 100755
index 0000000..12b88b3
--- /dev/null
+++ b/net/openssh/files/sysvinit-sshd
@@ -0,0 +1,42 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: sshd
+# Required-Start: $remote_fs
+# Required-Stop: $remote_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: OpenSSH daemon
+### END INIT INFO
+
+if [ -f /etc/rc.d/init.d/functions ]; then
+ . /etc/rc.d/init.d/functions
+elif [ -f /etc/init.d/functions ]; then
+ . /etc/init.d/functions
+fi
+
+NAME=sshd
+DAEMON="/usr/sbin/sshd"
+DAEMON_ARGS="-D"
+PIDFILE="/run/sshd.pid"
+USER=""
+
+start() {
+ if command -v ssh-keygen >/dev/null 2>&1; then ssh-keygen -A >/dev/null 2>&1 || :; fi
+ start_daemon -p "$PIDFILE" ${USER:+-c "$USER"} "$DAEMON" $DAEMON_ARGS
+}
+
+stop() {
+ killproc -p "$PIDFILE" "$DAEMON"
+}
+
+status() {
+ pidofproc -p "$PIDFILE" "$DAEMON"
+}
+
+case $1 in
+ start) start ;;
+ stop) stop ;;
+ restart) stop; start ;;
+ status) status ;;
+ *) printf '%s\n' "Usage: $0 {start|stop|restart|status}" >&2; exit 1 ;;
+esac
diff --git a/net/openssh/recipe b/net/openssh/recipe
index df280ad..500d65d 100644
--- a/net/openssh/recipe
+++ b/net/openssh/recipe
@@ -1,6 +1,6 @@
name openssh
version 10.5p1
-release 2
+release 3
description OpenSSH: remote login client and server
source https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${version}.tar.gz
@@ -13,6 +13,11 @@ depend openssl
configure ./configure --prefix=/usr --sysconfdir=/etc/ssh --with-privsep-path=/var/lib/sshd --with-privsep-user=nobody --with-default-path=/usr/bin:/bin --with-superuser-path=/usr/sbin:/usr/bin:/sbin:/bin
build make -j"$MAKEJOBS"
install make install-nokeys DESTDIR="$PKG" && install -dm700 "$PKG/var/lib/sshd"
-install mkdir -p "$PKG/usr/lib/systemd/system" "$PKG/etc/init.d"
+install mkdir -p "$PKG/usr/lib/systemd/system" "$PKG/etc/init.d" "$PKG/etc/sv/sshd" "$PKG/etc/s6/sv/sshd" "$PKG/etc/dinit.d" "$PKG/etc/shepherd.d" "$PKG/etc/rc.d/init.d"
install install -m 0644 "$SRC/files/sshd.service" "$PKG/usr/lib/systemd/system/sshd.service"
install install -m 0755 "$SRC/files/openrc-sshd" "$PKG/etc/init.d/sshd"
+install install -m 0755 "$SRC/files/runit-sshd" "$PKG/etc/sv/sshd/run"
+install install -m 0755 "$SRC/files/s6-sshd" "$PKG/etc/s6/sv/sshd/run"
+install install -m 0644 "$SRC/files/dinit-sshd" "$PKG/etc/dinit.d/sshd"
+install install -m 0644 "$SRC/files/shepherd-sshd.scm" "$PKG/etc/shepherd.d/sshd.scm"
+install install -m 0755 "$SRC/files/sysvinit-sshd" "$PKG/etc/rc.d/init.d/sshd"