Files
infix/package/confd/clean-etc
T
Joachim WibergandTobias Waldekranz 0fffb1296f package/confd: allow avahi (mDNS/SD) and sshd to be enabled by default
The idea is to, as a plain Infix default, start up devices with DHCP and
IPv4LL/ZeroConf and IPv6 link-local address.  Using mDNS the user can
then and push a NETCONF configuration over SSH.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-04-27 09:59:35 +02:00

21 lines
459 B
Bash
Executable File

#!/bin/sh
# This is an unmanaged node, leave /etc as-is
/lib/infix/use-etc && exit 0
# This is a managed node, ignore all default configuration ...
# ... except for some core services
reserved()
{
for svc in avahi dnsmasq getty klish lldpd nginx ssdpd sshd sysklogd sysrepo; do
[ "$1" = "${svc}.conf" ] && return 0
done
return 1
}
for file in /etc/finit.d/enabled/*.conf; do
reserved "$(basename "$file")" && continue
rm "$file"
done