diff --git a/src/modules/mhwdcfg/main.py b/src/modules/mhwdcfg/main.py index 95ed66c97..a3ae98d96 100644 --- a/src/modules/mhwdcfg/main.py +++ b/src/modules/mhwdcfg/main.py @@ -40,7 +40,7 @@ class MhwdController: @driver.setter def driver(self, value): self._driver = value - + @property def root(self): return self.__root @@ -48,51 +48,50 @@ class MhwdController: @property def local(self): return self.__local - + @property def repo(self): return self.__repo - + @property def identifier(self): return self.__identifier - + @property def bus(self): return self.__bus - + def umount(self, mp): call(["umount", "-l", join(self.root, mp)]) - + def mount(self, mp): call(["mount", "-Br", "/" + mp, join(self.root, mp)]) - + def configure(self, name, id): cmd = ["mhwd", "-a", str(name), str(self.driver), str(id).zfill(4)] if self.local: self.mount("opt") cmd.extend(["--pmconfig", self.repo]) - + self.mount("etc/resolv.conf") check_target_env_call(cmd) - + if self.local: self.umount("opt") self.umount("etc/resolv.conf") - + def run(self): - for id in self.identifier['net']: - for b in self.bus: - self.configure(b, id) - for id in self.identifier['video']: - for b in self.bus: - self.configure(b, id) - + for b in self.bus: + for id in self.identifier['net']: + self.configure(b, id) + for id in self.identifier['video']: + self.configure(b, id) + return None def run(): """ Configure the hardware """ mhwd = MhwdController() - + return mhwd.run() diff --git a/src/modules/mhwdcfg/mhwdcfg.conf b/src/modules/mhwdcfg/mhwdcfg.conf index a4752f720..48d905d9c 100644 --- a/src/modules/mhwdcfg/mhwdcfg.conf +++ b/src/modules/mhwdcfg/mhwdcfg.conf @@ -1,14 +1,15 @@ --- +bus: + - pci + identifier: net: - 200 - 280 video: - 300 - -bus: - - pci - - usb + - 302 + - 380 driver: free