Skip to content

Commit

Permalink
Prevent non-essential services from running in runlevels > 6
Browse files Browse the repository at this point in the history
In case failure-config fails to load, we park the system in runlevel
9. In this state, we only want the most essential services running.
  • Loading branch information
wkz committed Nov 30, 2023
1 parent 445fbf7 commit f4a604f
Show file tree
Hide file tree
Showing 29 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion board/common/rootfs/etc/finit.d/available/rauc.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
set G_MESSAGES_DEBUG=nocolor
service [2345789] <service/dbus/running> \
service [2345] <service/dbus/running> \
env:-/etc/default/rauc log:prio:user.notice \
rauc service $RAUC_ARGS -- Software update service

4 changes: 2 additions & 2 deletions package/confd/confd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ run name:error :1 log:console norestart if:<run/bootstrap/failure> \
[S] /usr/libexec/confd/error --

service name:confd log <run/bootstrap/success> \
[S12345789] sysrepo-plugind -f -p /run/confd.pid -n -v3 -- Configuration daemon
[S12345] sysrepo-plugind -f -p /run/confd.pid -n -v3 -- Configuration daemon

# Bootstrap system with startup-config
run name:startup log:prio:user.notice norestart <pid/confd> \
Expand All @@ -24,7 +24,7 @@ run name:error :2 log:console norestart if:<run/failure/failure> \
[S] /usr/libexec/confd/error --

service name:netopeer notify:none log <pid/confd> \
[12345789] netopeer2-server -F -t 60 \
[12345] netopeer2-server -F -t 60 \
-- NETCONF server

# Create initial /etc/resolv.conf after successful bootstrap
Expand Down
2 changes: 1 addition & 1 deletion package/klish/klish.svc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
service <!> log [2345789] /usr/bin/klishd -d -- CLI backend daemon
service <!> log [2345] /usr/bin/klishd -d -- CLI backend daemon
Original file line number Diff line number Diff line change
@@ -1 +1 @@
service [2345789] avahi-dnsconfd -s -- Avahi unicast DNS configuration daemon
service [2345] avahi-dnsconfd -s -- Avahi unicast DNS configuration daemon
Original file line number Diff line number Diff line change
@@ -1 +1 @@
service [2345789] name:mdns avahi-daemon -s -- Avahi mDNS-SD daemon
service [2345] name:mdns avahi-daemon -s -- Avahi mDNS-SD daemon
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Requires /etc/chrony.conf to start, see https://chrony.tuxfamily.org/doc/3.4/chrony.conf.html
service [2345789] <!> env:-/etc/default/chronyd chronyd -n $CHRONY_ARGS -- Chrony NTP v3/v4 daemon
service [2345] <!> env:-/etc/default/chronyd chronyd -n $CHRONY_ARGS -- Chrony NTP v3/v4 daemon
Original file line number Diff line number Diff line change
@@ -1 +1 @@
service [2345789] env:-/etc/default/conntrackd conntrackd $CONNTRACKD_ARGS -- Connection tracking daemon
service [2345] env:-/etc/default/conntrackd conntrackd $CONNTRACKD_ARGS -- Connection tracking daemon
Original file line number Diff line number Diff line change
@@ -1 +1 @@
service [S12345789] <pid/syslogd> dnsmasq -k -u root -- DHCP/DNS proxy
service [S12345] <pid/syslogd> dnsmasq -k -u root -- DHCP/DNS proxy
Original file line number Diff line number Diff line change
@@ -1 +1 @@
service [2345789] log:null <!pid/zebra> babled -A 127.0.0.1 -u frr -g frr -- Babel routing daemon
service [2345] log:null <!pid/zebra> babled -A 127.0.0.1 -u frr -g frr -- Babel routing daemon
Original file line number Diff line number Diff line change
@@ -1 +1 @@
service [2345789] log:null <!pid/zebra> bfdd -A 127.0.0.1 -u frr -g frr -- BFD daemon
service [2345] log:null <!pid/zebra> bfdd -A 127.0.0.1 -u frr -g frr -- BFD daemon
Original file line number Diff line number Diff line change
@@ -1 +1 @@
service [2345789] log:null <!pid/zebra> bgpd -A 127.0.0.1 -u frr -g frr -- BGP daemon
service [2345] log:null <!pid/zebra> bgpd -A 127.0.0.1 -u frr -g frr -- BGP daemon
Original file line number Diff line number Diff line change
@@ -1 +1 @@
service [2345789] log:null <!pid/zebra> eigrpd -A 127.0.0.1 -u frr -g frr -- EIGRP daemon
service [2345] log:null <!pid/zebra> eigrpd -A 127.0.0.1 -u frr -g frr -- EIGRP daemon
Original file line number Diff line number Diff line change
@@ -1 +1 @@
service [2345789] log:null <!pid/zebra> isisd -A 127.0.0.1 -u frr -g frr -- IS-IS daemon
service [2345] log:null <!pid/zebra> isisd -A 127.0.0.1 -u frr -g frr -- IS-IS daemon
Original file line number Diff line number Diff line change
@@ -1 +1 @@
service [2345789] log:null <!pid/zebra> ldpd -A 127.0.0.1 -u frr -g frr -- LDP daemon
service [2345] log:null <!pid/zebra> ldpd -A 127.0.0.1 -u frr -g frr -- LDP daemon
Original file line number Diff line number Diff line change
@@ -1 +1 @@
service [2345789] log:null <!pid/zebra> ospf6d -A 127.0.0.1 -u frr -g frr -- OSPF IPv6 daemon
service [2345] log:null <!pid/zebra> ospf6d -A 127.0.0.1 -u frr -g frr -- OSPF IPv6 daemon
Original file line number Diff line number Diff line change
@@ -1 +1 @@
service [2345789] log:null <!pid/zebra> ospfd -A 127.0.0.1 -u frr -g frr -f /etc/frr/ospfd.conf-- OSPF daemon
service [2345] log:null <!pid/zebra> ospfd -A 127.0.0.1 -u frr -g frr -f /etc/frr/ospfd.conf-- OSPF daemon
Original file line number Diff line number Diff line change
@@ -1 +1 @@
service [2345789] log:null <!pid/zebra> pathd -A 127.0.0.1 -u frr -g frr -- PCEP daemon
service [2345] log:null <!pid/zebra> pathd -A 127.0.0.1 -u frr -g frr -- PCEP daemon
Original file line number Diff line number Diff line change
@@ -1 +1 @@
service [2345789] log:null <!pid/zebra> pim6d -A 127.0.0.1 -u frr -g frr -- PIM6 daemon
service [2345] log:null <!pid/zebra> pim6d -A 127.0.0.1 -u frr -g frr -- PIM6 daemon
Original file line number Diff line number Diff line change
@@ -1 +1 @@
service [2345789] log:null <!pid/zebra> pimd -A 127.0.0.1 -u frr -g frr -- PIM daemon
service [2345] log:null <!pid/zebra> pimd -A 127.0.0.1 -u frr -g frr -- PIM daemon
Original file line number Diff line number Diff line change
@@ -1 +1 @@
service [2345789] log:null <pid/zebra> ripd -A 127.0.0.1 -u frr -g frr -- RIP daemon
service [2345] log:null <pid/zebra> ripd -A 127.0.0.1 -u frr -g frr -- RIP daemon
Original file line number Diff line number Diff line change
@@ -1 +1 @@
service [2345789] log:null <pid/zebra> ripngd -A 127.0.0.1 -u frr -g frr -- RIP IPv6 daemon
service [2345] log:null <pid/zebra> ripngd -A 127.0.0.1 -u frr -g frr -- RIP IPv6 daemon
Original file line number Diff line number Diff line change
@@ -1 +1 @@
service [2345789] log:null <!pid/zebra> staticd -A 127.0.0.1 -u frr -g frr -f /etc/frr/staticd.conf -- Static routing daemon
service [2345] log:null <!pid/zebra> staticd -A 127.0.0.1 -u frr -g frr -f /etc/frr/staticd.conf -- Static routing daemon
Original file line number Diff line number Diff line change
@@ -1 +1 @@
service [2345789] log:null <!pid/zebra> vrrpd -A 127.0.0.1 -u frr -g frr -- VRRP daemon
service [2345] log:null <!pid/zebra> vrrpd -A 127.0.0.1 -u frr -g frr -- VRRP daemon
Original file line number Diff line number Diff line change
@@ -1 +1 @@
service [2345789] <!> pid:!/run/frr/zebra.pid zebra -A 127.0.0.1 -u frr -g frr -- Zebra routing daemon
service [2345] <!> pid:!/run/frr/zebra.pid zebra -A 127.0.0.1 -u frr -g frr -- Zebra routing daemon
Original file line number Diff line number Diff line change
@@ -1 +1 @@
service [2345789] env:-/etc/default/lldpd lldpd -d $LLDPD_ARGS -- LLDP daemon (IEEE 802.1ab)
service [2345] env:-/etc/default/lldpd lldpd -d $LLDPD_ARGS -- LLDP daemon (IEEE 802.1ab)
Original file line number Diff line number Diff line change
@@ -1,4 +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 [0123456789] pid:!/run/mstpd.pid bridge-stp br0 -- MSTP daemon
sysv name:mstpd [0123456] pid:!/run/mstpd.pid bridge-stp br0 -- MSTP daemon
Original file line number Diff line number Diff line change
@@ -1 +1 @@
service [2345789] env:-/etc/default/querierd querierd -sn $QUERIERD_ARGS -- Multicast query daemon
service [2345] env:-/etc/default/querierd querierd -sn $QUERIERD_ARGS -- Multicast query daemon
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
service [2345789] env:-/etc/default/smcrouted \
service [2345] env:-/etc/default/smcrouted \
smcrouted -ns $SMCROUTE_OPTS $SMCROUTE_ARGS -- Static multicast routing daemon
2 changes: 1 addition & 1 deletion package/statd/statd.conf
Original file line number Diff line number Diff line change
@@ -1 +1 @@
service name:statd log [S12345789] <pid/confd> statd -f -p /run/statd.pid -n -- Status daemon
service name:statd log [S12345] <pid/confd> statd -f -p /run/statd.pid -n -- Status daemon

0 comments on commit f4a604f

Please sign in to comment.