Apperently the rules in /etc/systemd/network are not
honored by NetworkManager which loads earlier than
systemd-networkd, so adding a rule for NetworkManager
Error logging for overlay show rendering incorrectly checked
the overlay name rather than the path to the file. It also
used wwlog (which goes to stderr) to output the render. This
commit replaces explicit args[] references with their named
equivalents from earlier in the function, correcting those
references along the way, and outputs the final render with
fmt.Print.
Commit d8cd6049 introduced erroneous output coming from an
inner function of container show, and (seemingly) erroneously
replaces valid kernel versions with "not found". This commit
fixes both of those issues, and moves the output to the outer
cli function.
I noticed that some wwlog calls included a trailing newline, but others
did not. I tested both in isolation and discovered that the behavior was
consistent regardless of whether a trailing newline was included. I
further confirmed in code that wwlog appends a trailing newline
automatically if it is not present; so a trailing newline is unnecessary
in individual calls.
This commit removes trailing newlines from all calls to make them
consistent. It also replaces two calls to wwlog.Printf. (see #534)
Signed-off-by: Jonathon Anderson <janderson@ciq.co>
wwlog provides named loggers for each level, which requires
less code and is clearer than wwlog.Printf. The code has
included a mix of both, but this commit consolidates existing
code on the per-level functions.
Signed-off-by: Jonathon Anderson <janderson@ciq.co>
It appears that the intended behavior of overlay chown was changed
in 00d8d42e9, but the argument handling was not updated to reflect
the removal of overlayKind. This led to a crash when only the
uid was specified, and a processing of the gid as the uid
otherwise.
Signed-off-by: Jonathon Anderson <janderson@ciq.co>
Specifying 0 for gid as a default during chown causes the
gid to be changed to 0 when left unspecified. Changing the
default value to -1 causes the gid to be left unmodified
when unspecified, which is a less surprising behavior.
Signed-off-by: Jonathon Anderson <janderson@ciq.co>