diff options
-rw-r--r-- | installclass.py | 11 | ||||
-rw-r--r-- | kickstart.py | 10 |
2 files changed, 16 insertions, 5 deletions
diff --git a/installclass.py b/installclass.py index 3286ee56a..5b5c6e129 100644 --- a/installclass.py +++ b/installclass.py @@ -297,7 +297,7 @@ class BaseInstallClass: id.auth.enableCache = enableCache - def setNetwork(self, id, bootProto, ip, netmask, ethtool, device = None, onboot = 1, dhcpclass = None): + def setNetwork(self, id, bootProto, ip, netmask, ethtool, device = None, onboot = 1, dhcpclass = None, essid = None, wepkey + None): if bootProto: devices = id.network.available () if (devices and bootProto): @@ -317,8 +317,13 @@ class BaseInstallClass: dev.set (("ipaddr", ip)) if (netmask): dev.set (("netmask", netmask)) - if (ethtool): - dev.set (("ethtool_opts", ethtool)) + if ethtool: + dev.set (("ethtool_opts", ethtool)) + if isys.isWireless(device): + if essid: + dev.set(("essid", essid)) + if wepkey: + dev.set(("wepkey", wepkey)) def setLanguageSupport(self, id, langlist): if len (langlist) == 0: diff --git a/kickstart.py b/kickstart.py index 08c9bc13b..643c18201 100644 --- a/kickstart.py +++ b/kickstart.py @@ -485,7 +485,7 @@ class KickstartBase(BaseInstallClass): (args, extra) = isys.getopt(args, '', [ 'bootproto=', 'ip=', 'netmask=', 'gateway=', 'nameserver=', 'nodns', 'device=', 'hostname=', 'ethtool=', 'onboot=', - 'dhcpclass=']) + 'dhcpclass=', 'essid=', 'wepkey=']) bootProto = "dhcp" ip = None netmask = "" @@ -493,6 +493,8 @@ class KickstartBase(BaseInstallClass): nameserver = "" hostname = "" ethtool = "" + essid = "" + wepkey = "" onboot = 1 device = None dhcpclass = None @@ -514,6 +516,10 @@ class KickstartBase(BaseInstallClass): hostname = arg elif str== "--ethtool": ethtool = arg + elif str == "--essid": + essid = arg + elif str == "--wepkey": + wepkey = arg elif str== "--onboot": if arg == 'no': onboot = 0 @@ -522,7 +528,7 @@ class KickstartBase(BaseInstallClass): elif str == "--class": dhcpclass = arg - self.setNetwork(id, bootProto, ip, netmask, ethtool, device=device, onboot=onboot, dhcpclass=dhcpclass) + self.setNetwork(id, bootProto, ip, netmask, ethtool, device=device, onboot=onboot, dhcpclass=dhcpclass, essid=essid, wepkey=wepkey) if hostname != "": self.setHostname(id, hostname, override = 1) if nameserver != "": |