Running 'shred' on files stored on eMMC is pointless since the writes
are spread out over other sectors rather than overwriting the content
of the files as it was supposed to on old rotating media.
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>
A sane interface name is at least two characters long, and in Linux the
interface name (using ip link) is at most 15 characthers long.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
With interactive mode (out="tty") klish puts the tty in raw mode which
fixes all weird issues reported around paged output in the CLI.
Fixes#659
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
These are basically the same flags as was passed to klish, but now we
use -R instead of -r to make sure only ANSI coloŕ escapes can affect
the behavior of less.
This change will make it posslbe to shop off too long lines and scroll
vertically on really long lines instead for them breaking output.
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>
When we opportunistically set up mqprio on all interfaces, we pass over
interfaces without offloading support. Catch that error message and log
an informational message about which interfaces are skipped.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Check if the "usb-ports" key exists in /run/system.json before calling jq,
otherise we get the following error message:
Nov 8 05:11:45 ix bootstrap[3349]: jq: error (at <stdin>:0): Cannot iterate over null (null)
Also, minor whitespace cleanup and bashisms fixes.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
In 0f410eb a patch was added to RAUC to allow native logging to syslog,
it was however never enabled. This patch enables logging to syslog.
Fix#809
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Bootstrapping a system with D-Bus using Finit will create the machine-id
file /var/lib/dbus/machine-id, this can be used as the unique machine-id
for services like RAUC, so let's set that as /etc/machine-id to reduce
the log spam we get otherwise:
Nov 7 06:18:08 test-05-25-f8 rauc[5512]: Failed to get machine-id: Failed to open file <E2>M-^@M-^\/etc/machine-id<E2>M-^@M-^]: No such file or directory
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
After the initial probe, set up all port leds:
- Disable all LEDs
- Enable netdev trigger for all green LEDs (tp + sfp)
- Enable link statux and rx/tx activity
- Skip all aux LEDs
Also in script, a neat little flash function that can be used both for a
production test, to verify all LEDs work, and at runtime to locate the
device in a rack of devicess.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
On Rev. B, the second LED on the copper ports is green instead of yellow.
This patch renames them from yellow -> aux => <device>:aux:tp
Also on Rev. B, the second LED for SFP ports do not work at all. This
patch drops them from the device tree to avoid confusion.
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>
This patch use the new compatible array in /run/system.json, installing
in order, least to most significant product overrides.
We also introduce a new way to run product specific scripts at init, to
override default behavior in Infix, e.g., LED control.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This is to workaround #807. To test automatic router id selection
a new test is required, which sets interfaces and activate ospf in
separete NETCONF/RESTCONF query.