[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH rhel6-branch] Raise informative error for ks=bootif, missing BOOTIF case (#681803).



Originally instead of traceback.
This is final version of my #681803 saga. In the previous version,
acked on a-d-l, this message would be raised:

"The provided network interface bootif doesn't exist."

I think being more specific can save us some bug reports.

Related: rhbz#681803
---
 kickstart.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/kickstart.py b/kickstart.py
index bac256f..de2dbe9 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -608,6 +608,8 @@ class NetworkData(commands.network.RHEL6_NetworkData):
                     # MAC address like 01-aa-bb-cc-dd-ee-ff
                     device = flags.cmdline["BOOTIF"][3:]
                     device = device.replace("-",":")
+                else:
+                    raise KickstartValueError, formatErrorMsg(self.lineno, msg="Using --device=bootif without BOOTIF= boot option supplied")
             else: device = self.device
 
         # If we were given a network device name, grab the device object.
-- 
1.7.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]