mirror of
https://github.com/Telecominfraproject/OpenNetworkLinux.git
synced 2025-12-25 17:27:01 +00:00
onl-boot-config: Support empty NETAUTO
Since empty NETAUTO= in /mnt/onl/boot/boot-config is valud according to rules in initramfs /boot/ifup, follow this behavior in onl-boot-config to get rid of incorrect message: root@localhost:/# onl-boot-config --show NETDEV=ma1 BOOTMODE=INSTALLED SWI=images::latest NETAUTO= The NETAUTO value '' is invalid. The boot configuration has not been changed. Signed-off-by: Sergey Popovich <sergey.popovich@ordnance.co>
This commit is contained in:
@@ -191,7 +191,7 @@ class OnlBootConfigNet(OnlBootConfig):
|
||||
if not self.is_ip_address(netdns):
|
||||
raise ValueError("NETDNS=%s is not a valid ip-address" % (netdns))
|
||||
|
||||
elif self.keys['NETAUTO'] not in ['dhcp', 'up']:
|
||||
elif self.keys['NETAUTO'] not in ['dhcp', 'up', '']:
|
||||
raise ValueError("The NETAUTO value '%s' is invalid." % self.keys['NETAUTO'])
|
||||
elif self.keys['NETAUTO'] == 'up' and self.NET_REQUIRED:
|
||||
raise ValueError("NETAUTO is 'up' but non-local networking is required.")
|
||||
|
||||
Reference in New Issue
Block a user