Turns out the root cause for the odd log message in #896 was that the
system did not properly call `resolvconf -u` when starting in failure
mode.
This patch simplifies the code by moving all `resolvconf -u` calls to
the same Finit task. Ensuring it is first launched when confd has
successfully consumed any configuration at boot, and then every time
a static DNS server is added. (The udhcpc client script already call
`resolvconf -u` when dynamic DNS servers are learned.)
Fixes#896
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Primarily fixes issue with DHCP server multiple subnets test, which
triggers an ordering issue between reconfiguration of dnsmasq and the
`initctl reload` command.
For the full ChangeLog, please see:
https://github.com/troglobit/finit/releases/tag/4.9
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
- dnsmasq:
- allow listening to all interfaces again to serve DHCP leases
- disable most of the default DHCP options, keep broadcast and
netmask because when dnsmasq can infer these they are better
than breaking networking for clients -- note, they can still
be overridden from global/subnet/host scope -- and for relay
setups they need to be supplied anyway
- confd:
- drop per-interface dnsmasq, although practical for many use-cases,
having a per-subnet focused server means improved integration with
future stand-alone dhcp relay setup
- implement suggested, simplified, yang model
Fixes#703
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
For consistency with the new dhcp-server model, which has an option
value 'name', options are now referred to as id's or identifiers.
This means bumping the confd syntax version 1.3 -> 1.4 and adding a
migration script for existing dhcp-client configuration files.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This patch introduces a new yang yang model for DHCP server and relay,
using dnsmasq to provide the functionality on a per-interface basis.
Available DHCP options will be queried by confd on startup and can
then be configured in a flexible manner.
The DHCP option 82 feature has been realized by patching dnsmasq
(see patches/dnsmasq/2.90/0000-relay-agent-info.patch).
Signed-off-by: Stefan Schlosser <sgs@grmmbl.org>
This change introduces the configuration of the tx-interval parameter
for the LLDP service, allowing control over the frequency of LLDP hello
messages. This improvement eliminates the need to toggle the interface
down and up to force the emission of LLDP packets in the test
environment.
The Avahi daemon needs to be restarted when changing its configuration
file in /etc/avahi/avahi-daemon.conf, not sufficient to SIGHUP.
Also, minor reformatting for new style.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Introduce a new approach to dtb-building:
Old way: `rsync` an overlay containing our dt source to the kernel,
and then build via buildroot's `_INTREE_DTS_NAME`. This does not work
in recent kernels (at least since 6.12), which requires all dtb's to
be explicitly listed in a `Makefile`.
New way: Create a separate package for every board, and build the
device trees via the kernel's standard interface for building external
modules. This has two main advantages:
1. We can easily interpose a patched version of an upstream device
tree. E.g., we can easily set the factory password.
2. It is much easier to get an overview of which boards are enabled,
rather than scrolling back and forth in the `_INTREE_DTS_NAME` list.
Enable all fully supported boards in the defconfigs.
The mDNS daemon, Avahi, is very verbose in its syslog output. So much
that it often overshadows other subsystems, and on switches and routers
with more than the "normal" amount of ports and interfaces, it quickly
becomes unbearable.
The patches consist of:
- Add -l LEVEL support to avahi-daemon
- Add missing casll to setlogmask() in libdaemon:daemon_set_verbosity()
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Fix lack of syslog messages from Zebra and add support to easily enable
debug logs for common Zebra subsystems.
Same change made to ospfd for symmetry.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This patch adds latest symlinks to the curiOS containers to make system
upgrades easier. I.e., a user can now reference the bundled image with:
set image oci-archive:/lib/oci/curios-httpd-latest.tar.gz
So that when they upgrade to the latest Infix, which might include an
update of curiOS httpd, they will get a seamless upgrade also of the
container(s) running.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
- Reduce the amount of queues: 3 -> 1
- Simplify post hook
- Refine execd
The resulting simplification of infix_containers_post_hook(), and
touching execd, also ensure container environment variable changes
are propagated.
Fixes#822
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
To be able to handle container restarts, incl. restart policy, at
runtime, most of the container data lives in /var/lib/containers,
which on most systems is backed by a persistent store.
As of issue #823 we no longer keep a writable layer for containers,
nor should we cache container state across reboots, all containers
are recreated at boot. This task cleans up any lingering state.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Container support in Infix was released with v24.02, so this change may
unfortunately break a few use-cases out there. Regrettable as this is,
the default behavior, including how containers are started after boot,
break other use-cases that were considered more important.
As of this commit:
- all containers in Infix run in read-only mode, use volumes and
mounts for persistence across reboot/stop/start/upgrade
- all containers are now "recreated" at boot or related config changes,
this ensures an OCI image embedded in the Infix image, /lib/oci/, is
always used as the base for a running container
Fixes#823
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This update include more backports from Klish 3.1.0, including, but not
limited to:
- Syslog fixes
- Return code fixes
- Changed library and plugin paths (!)
- TTY raw mode fixes
- Use raw mode for interactive commands
- Allow single quotes (') as alternative to regular quotes for commands
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Some services launched at bootstrap must be possible to override per
product. One such service is iitod, which manages the LEDs in Infix.
This change makes allows a product specific init script to clear the
led condtion, preventing Finit from lauching iitod. Also, rename the
ixinit-done condition to match the nomenclature used already.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Backport support for saving and restoring system time from a file on
systems with broken RTC that reset to the future.
With this support a system can be sure time only ever moves forward.
Fix#794
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
The string variable handling in configuring Finit did not follow the
Buildroot best practises. This patch adds stripping quotes from all
string variables before adding them as configure arguments.
This fixes issue with, e.g., this sneaky bastard:
configure --with-rtc-date=""2024-10-12 12:34:56""
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This patch fixes a upstream issue troglobit/finit#415, greatly reducing
the amount of service restarts, needlessly affecting, e.g., iitod when
services like syslogd¹ is reloaded.
____
¹) Traditional UNIX services that properly support SIGHUP.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>