Bug 526759 - don't touch /etc/modprobe.conf
don't touch /etc/modprobe.conf
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: livecd-tools (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Warren Togami
Fedora Extras Quality Assurance
:
Depends On:
Blocks: F12Target
  Show dependency treegraph
 
Reported: 2009-10-01 13:18 EDT by Matthias Clasen
Modified: 2009-11-06 10:36 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-10-20 18:11:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Matthias Clasen 2009-10-01 13:18:31 EDT
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 13:19:41 EDT
Warren, can you look into this ?
Comment 2 Warren Togami 2009-10-02 13:15:51 EDT
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-06 21:52:55 EDT
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 18:11:49 EDT
fixed in 030

Note You need to log in before you can comment on or make changes to this bug.