mirror of
https://github.com/xcat2/confluent.git
synced 2026-11-19 08:52:20 +00:00
Add interface naming arguments to captured image cmdlines
A captured image keeps the /etc/kernel/cmdline of its source. If the source did not run with the net.ifnames=/biosdevname= of the diskless boot, the installed system renames the interface and the connection written during the install does not match. Append them when missing.
This commit is contained in:
@@ -234,6 +234,11 @@ def fixup(rootdir, vols):
|
||||
newkcmdlineent.append(ent)
|
||||
else:
|
||||
newkcmdlineent.append(ent)
|
||||
# the network configuration written during the install uses the
|
||||
# interface names of this boot
|
||||
for arg in currcmdline:
|
||||
if arg.startswith(('net.ifnames=', 'biosdevname=')) and arg not in newkcmdlineent:
|
||||
newkcmdlineent.append(arg)
|
||||
with open(kcmdline, 'w') as kcmdlineout:
|
||||
kcmdlineout.write(' '.join(newkcmdlineent) + '\n')
|
||||
for loadent in glob.glob(os.path.join(rootdir, 'boot/loader/entries/*.conf')):
|
||||
|
||||
Reference in New Issue
Block a user