Fetches UDEV device properties prepended with 'E:' for NICs and disks.
The result is stored in its own JSON file.
This information is needed to filter for specific devices. Mainly for
the auto-installer for now.
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Co-authored-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
[ TL: rework Udev module to avoid external dependencies, keep those
in the Sys modules ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Due to interpolation, the \. sequence must be double-escaped.
Previously, this would result in a non-escaped dot, thus matching much
more liberally than it should.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
[ TL: fix bug # reference in code comments ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
.. by moving it into its own subroutine. Makes the whole thing quite a
bit neater and easier to maintain.
No functional changes.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
without this patch the hostname ends up as the empty string in
run-env-info.json, which results in a parse-error in the TUI code
(an empty string is not None, but still too short as hostname)
Minimally tested on a VM.
Fixes: bda1cdf ("run env: retrieve and store hostname from DHCP lease
if available")
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
This adds some duplication there, but much safer than restructuring
stuff at this point in time, we can deal with unification later.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>