From: Lubomir Rintel <[email protected]>

This reverts commit 5f42d465badfc2b172e0bb10a2c0d2a27a164d27.

Apart from duplicating code (well, data) this intruduces a bug where
dracut.conf is written in the install root prior to dracut package
installed, which causes the vanilla configu file to be written out as
dracut.conf.rpmnew.
---
 imgcreate/live.py |   23 ++++++++++++-----------
 1 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/imgcreate/live.py b/imgcreate/live.py
index 0d044ee..78cbff7 100644
--- a/imgcreate/live.py
+++ b/imgcreate/live.py
@@ -181,11 +181,11 @@ class LiveImageCreatorBase(LoopImageCreator):
 
     def _mount_instroot(self, base_on = None):
         LoopImageCreator._mount_instroot(self, base_on)
-        self.__write_initrd_conf(self._instroot + "/etc/dracut.conf")
+        self.__write_initrd_conf(self._instroot + "/etc/sysconfig/mkinitrd")
 
     def _unmount_instroot(self):
         try:
-            os.unlink(self._instroot + "/etc/dracut.conf")
+            os.unlink(self._instroot + "/etc/sysconfig/mkinitrd")
         except:
             pass
         LoopImageCreator._unmount_instroot(self)
@@ -212,23 +212,24 @@ class LiveImageCreatorBase(LoopImageCreator):
             makedirs(os.path.dirname(path))
         f = open(path, "a")
 
+        f.write('LIVEOS="yes"\n')
         f.write('PROBE="no"\n')
-        f.write('add_drivers+="squashfs ext4 ext3 ext2 vfat msdos "\n')
-        f.write('add_drivers+="sr_mod sd_mod ide-cd cdrom "\n')
+        f.write('MODULES+="squashfs ext4 ext3 ext2 vfat msdos "\n')
+        f.write('MODULES+="sr_mod sd_mod ide-cd cdrom "\n')
 
         for module in self.__modules:
             if module == "=usb":
-                f.write('add_drivers+="ehci_hcd uhci_hcd ohci_hcd "\n')
-                f.write('add_drivers+="usb_storage usbhid "\n')
+                f.write('MODULES+="ehci_hcd uhci_hcd ohci_hcd "\n')
+                f.write('MODULES+="usb_storage usbhid "\n')
             elif module == "=firewire":
-                f.write('add_drivers+="firewire-sbp2 firewire-ohci "\n')
-                f.write('add_drivers+="sbp2 ohci1394 ieee1394 "\n')
+                f.write('MODULES+="firewire-sbp2 firewire-ohci "\n')
+                f.write('MODULES+="sbp2 ohci1394 ieee1394 "\n')
             elif module == "=mmc":
-                f.write('add_drivers+="mmc_block sdhci sdhci-pci "\n')
+                f.write('MODULES+="mmc_block sdhci sdhci-pci "\n')
             elif module == "=pcmcia":
-                f.write('add_drivers+="pata_pcmcia  "\n')
+                f.write('MODULES+="pata_pcmcia  "\n')
             else:
-                f.write('add_drivers+="' + module + ' "\n')
+                f.write('MODULES+="' + module + ' "\n')
 
         f.close()
 
-- 
1.6.0.6

--
livecd mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/livecd

Reply via email to