When Infix Fail Secure Mode ends up in RMA state, runlevel 9, we should
not allow Finit to "time out" and give us a login prompt. Instead we
disable all login services in runlevels 7-9, reserving these extra
levels for future failure modes.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Most defconfigs have Bash enabled, those that do not will have the
BusyBox symlink to ash.
This fixes the completion isses we've seen with initctl.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Mostly a Bug fix release. Only major change is support for service
`notify:pid` and `readiness none` global option to change how Finit
expects readiness notification.
Fixes:
- Dbus and runparts regression in Finit v4.5. The configure script must
expand `FINIT_RUNPATH_` before defining it in `config.h`
- Service environment variables drop everything but the first argument,
e.g., `VAR="foo bar qux"` drops everything but `foo`
- Internal conditions, e.g., `<int/bootstrap>` turn into flux when
leaving bootstrap, causing depending services to stop
- Global environment variables declared with `set VAR=NAME` do not drop
leading `set `, causing `'set VAR'='NAME'` in env.
- Sanity check environment variables, for services and globally. Ensure
the variable name (key) does not contain spaces, or a leading `set `
https://github.com/troglobit/finit/releases/tag/4.6
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
- drop bridge pvid setting in YANG model, we require bridge ports to
have explicit VLAN assignment (security)
- refactor bridge_vlan_settings(), do not enable vlan_filtering if
there are no VLANs configured on the bridge
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Adding missing information
- that PVID should (typically) be set for ports associated untagged
- that the bridge should associated with VLAN to terminate the VLAN
in the bridge
Providing an additional config example (VLAN atop brigde)
Adding picture for this and the existing example (VLAN atop Eth)
Adding info on name conventions (eth.20 vs vlan10)
[skip ci]
Upstream has replaced interactive="true" with:
- in="tty"
- out="tty"
- interrupt="true"
Also, disable Oneliners option since it's too confusing for users
compared to the regular JSON output for startup and factory-config
We can [skip ci] since we do not have any CLI tests yet.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
For some reasone upstream changed the Pager (less) from -r to -R, to
explictly only allow ANSI color sequences. This caused the 'show
interfaces' command to output <EF><33><13> style replacement chars
instead of UTF8 line drawing characters.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This is an attempt at improving the error reporting from klish-plugin-infix,
or more specifically commit@infix. Previously none of the sysrepo errors were
shown, now all the latest errors, as well as a few new ones specific to
interfaces have been added.
Example (eth0 does not exist):
admin@infix-00-00-00:/config/> edit interfaces interface eth0
admin@infix-00-00-00:/config/interfaces/interface/eth0/> leave
Error: Mandatory node "type" instance does not exist. (Data location "/ietf-interfaces:interfaces/interface[name='eth0']".)
Failed committing candidate to running: Validation failed
admin@infix-00-00-00:/config/interfaces/interface/eth0/> set type ethernet
admin@infix-00-00-00:/config/interfaces/interface/eth0/> leave
Error: Cannot create fixed Ethernet interface eth0, wrong type or name.
Please check your changes, try 'diff' and 'do show interfaces'.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This affects CLI command such as:
> show interface name p1
Prior to this patch, this took roughly ~1200ms on hardware and with
the path it takes roughly 50ms.
Signed-off-by: Richard Alpe <richard@bit42.se>
Add a python3 script "ethtool-to-json" which runs ethtool locally and
converts output which we are interested in into json. The script
simply json encodes the output from ethtool, i.e. it does not print it
in YANG format. This might be a good idea to change in the future if
the C code has to do a lot of ethtool to YANG translations.
The json output of the ethtool-to-json script is then parsed in C
using libjansson, translated to YANG and added to the operational
datastore.
Signed-off-by: Richard Alpe <richard@bit42.se>
The idea was to change regression tests to opt-in, but it does not work
as intended for our core devs, so revert.
If you do *not* want the workflow(s) to run on your fork, you can
disable them with the [...] button on the right-hand side, beside the
"Filter workflow runs" text entry, in the Actions view of your fork.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Refactor factory-reset check slightly to check for a Finit condition
from the bootloader, as well as a custom check for br2-externals.
Note, the chgrp call has been extended to ensure admin users have
permission to create any file or directory in any overlay.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This change updates the documentation for the script, hopefully it is
more readable now than the previous wall of text.
Also, a new -6 option to toggle IPv6 SLACC option for port interfaces.
This, in combination with omitting the -b option, allows for enabling
SLACC on interfaces that would otherwise not get an address.
No functional change, tested manually [skip ci]
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
When released the YANG status section claimed IPv4/IPv6 MTU was
not-supported, which was very confusing since the following Changes
section clearly states added support for it.
The YANG Status section was wrong. It has also been cleaned up a bit.
E.g., no need to mention which native model provides an augment or a
deviation, to an end-user the only thing that matters is what is added
to or removed from the standard models.
[skip ci] becuase none of this warrants a rebuild.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
No logical change, keeping modification date and revision. We may be
stricted in the future with this.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Per spec[1], the PRETTY_NAME "May or may not contain a release code name
or OS version of some kind, as suitable." and seeing as this is not only
a common practice, Finit use this string in the heading when booting.
We've had this already in Infix a while back so it must have been lost
in one of many refactoring rounds.
[1]: https://www.freedesktop.org/software/systemd/man/latest/os-release.html
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
First, fix collation of .json snippets to ensure they are sorted by
number, regardless of which directory they originate from.
Second, and with an unexpected twist, use /etc as the target directory
for factory-config.cfg and failure-config.cfg. At first just to avoid
having the resulting .gen and .cfg files in /run/confd/, but it also
unintentionally gives us a way to provide a static /etc/factory-confg
in the image. As the TODO says, not perfect but better than before.
Third, update load script to use the same base path as bootstrap by
sourcing the system /etc/confdrc.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
A customer specific build required more RAM to boot (bigger image and
more features), but there was no way to modify this as an end user.
This patch opens this up and should give our users a more smooth ride!
We can [skip ci] on this, no functional changes to the OS itself.
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Adhere to our recommendations and avoid pseudorandom passwords which
are "easy to remember". Also increase password length to 13 chars.
Side notes:
Knowing that a password contains at least one char, one number and so
on, lowers the number of possible passwords to test when brute forcing.
The entropy for the pwgen "easy to remember" passwords isn't good
(naturally).
Signed-off-by: Richard Alpe <richard@bit42.se>