mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 01:13:00 +02:00
packages/skeleton-init-finit: sync Finit start scripts with myLinux
This adds Finit support for starting chronydy and mstpd, as well as an update to inadyn supporting env file for custom args. Also included is a patch to the start script of mstpd for BusyBox pidof, which don't have the '-c' option. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
# Requires /etc/chrony.conf to star, see https://chrony.tuxfamily.org/doc/3.4/chrony.conf.html
|
||||
service [2345789] env:-/etc/default/inadyn chronyd -n $CHRONY_ARGS -- Chrony NTP v3/v4 daemon
|
||||
@@ -1,2 +1 @@
|
||||
service [2345] <net/route/default> inadyn -ns -t 30 -- DDNS client
|
||||
|
||||
service [2345] <net/route/default> env:-/etc/default/inadyn inadyn -ns $INADYN_ARGS -- In-a-Dyn DDNS client
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
# Make sure to configure the bridge to run on before starting mstpd
|
||||
# Note: all 'sysv' type services are handed an extra 'start' or 'stop'
|
||||
# argument when starting and stopping.
|
||||
sysv name:mstpd [123456789] pid:!/run/mstpd.pid bridge-stp br0 -- MSTP daemon
|
||||
@@ -0,0 +1,26 @@
|
||||
--- mstpd-0.1.0/bridge-stp.in.orig 2022-02-04 11:49:59.764280663 +0100
|
||||
+++ mstpd-0.1.0/bridge-stp.in 2022-02-04 11:51:00.212347703 +0100
|
||||
@@ -139,7 +139,7 @@
|
||||
fi
|
||||
|
||||
# Start mstpd if necessary.
|
||||
- if ! pidof -c -s mstpd >/dev/null; then
|
||||
+ if ! pidof -s mstpd >/dev/null; then
|
||||
if [ "$MANAGE_MSTPD" != 'y' ]; then
|
||||
errmsg 'mstpd is not running'
|
||||
exit 3
|
||||
@@ -212,12 +212,12 @@
|
||||
done
|
||||
|
||||
# Kill mstpd, since no bridges are currently using it.
|
||||
- kill $(pidof -c mstpd)
|
||||
+ kill $(pidof mstpd)
|
||||
;;
|
||||
restart|restart_config)
|
||||
if [ "$action" = 'restart' ]; then
|
||||
# Kill mstpd.
|
||||
- pids="$(pidof -c mstpd)" ; Err=$?
|
||||
+ pids="$(pidof mstpd)" ; Err=$?
|
||||
if [ $Err -eq 0 ]; then
|
||||
echo 'Stopping mstpd ...'
|
||||
kill $pids
|
||||
Reference in New Issue
Block a user