Bug 526759

Summary: don't touch /etc/modprobe.conf
Product: [Fedora] Fedora Reporter: Matthias Clasen <mclasen>
Component: livecd-toolsAssignee: Warren Togami <wtogami>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: katzj, ploujj, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-10-20 22:11:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 473302    

Description Matthias Clasen 2009-10-01 17:18:31 UTC
kickstart.py tries to be helpful by touching /etc/modprobe.conf. Thus all of our live cds ship with an empty modprobe.conf. But nowadays, this causes modprobe to bitch every time it is run during the boot.

Please don't create modprobe.conf anymore, so we can have a clean boot.

Comment 1 Matthias Clasen 2009-10-01 17:19:41 UTC
Warren, can you look into this ?

Comment 2 Warren Togami 2009-10-02 17:15:51 UTC
diff --git a/imgcreate/kickstart.py b/imgcreate/kickstart.py
index 98db856..c926977 100644
--- a/imgcreate/kickstart.py
+++ b/imgcreate/kickstart.py
@@ -406,7 +406,7 @@ class SelinuxConfig(KickstartConfig):
     """A class to apply a kickstart selinux configuration to a system."""
     def relabel(self, ksselinux):
         # touch some files which get unhappy if they're not labeled correctly
-        for fn in ("/etc/modprobe.conf", "/etc/resolv.conf"):
+        for fn in ("/etc/resolv.conf"):
             path = self.path(fn)
             f = file(path, "w+")
             os.chmod(path, 0644)

I tried this patch, but it causes it to crash.

Traceback (most recent call last):
  File "/usr/bin/livecd-creator", line 140, in <module>
    sys.exit(main())
  File "/usr/bin/livecd-creator", line 124, in main
    creator.configure()
  File "/usr/lib/python2.6/site-packages/imgcreate/creator.py", line 729, in configure
    kickstart.SelinuxConfig(self._instroot).apply(ksh.selinux)
  File "/usr/lib/python2.6/site-packages/imgcreate/kickstart.py", line 435, in apply
    self.relabel(ksselinux)
  File "/usr/lib/python2.6/site-packages/imgcreate/kickstart.py", line 411, in relabel
    f = file(path, "w+")
IOError: [Errno 21] Is a directory: '/var/tmp/imgcreate-U9EYoC/install_root/'

Comment 3 Jeremy Katz 2009-10-07 01:52:55 UTC
I bet it's because it's a tuple -- use something like
  for fn in ("/etc/resolve.conf",):

The trailing comma should probably fix it

Comment 4 Warren Togami 2009-10-20 22:11:49 UTC
fixed in 030