new feature for mounting a read-only root filesystem rw after yum initialization and read-only after yum exits

george Nopicture mad-proffessor at hotmail.com
Sat Dec 28 20:56:10 UTC 2013


Hi. Since i am coming from debian this is a feauture that i am missing 
in fedora and after some googling i didn't find anything already 
implemented.
I would like to receive some feedback for implementing such a feature. 
What i 've done so far:
cloned from git:
  /yum/yum/__init_.py
+137
         self.mountreadwrite= False
+216
     self.mountReadWrite()
+232
         self.mountReadOnly()
+251
  def mountReadWrite(self):
         p = os.popen('mount -o rw,remount /',"r")
         while 1:
             line = p.readline()
             if not line: break
         print line
         return;

     def mountReadOnly(self):
         p = os.popen('mount -o ro,remount /',"r")
         while 1:
             line = p.readline()
             if not line: break
         print line
         return;

+313
         self.preconf.mountreadwrite=mountreadwrite
+353
         mountreadwrite= self.preconf.mountreadwrite
+386
   if mountreadwrite !=False:
         startupconf.mountreadwrite= mountreadwrite


/yum/yum/config.py
+717
     mountreadwrite =BoolOption(False)

------------------------------
what i didn't find so far is the code where yum actually writes the 
/etc/yum.conf file for the first time in order to put an option there 
too (mountreadwrite).

I am not a python developer but i must say that yum classes are written 
in an understandable manner. Qudos.






More information about the Yum-devel mailing list