Re: Anaconda - Kadischi install to disk from LiveCD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jasper O'neal Hartline wrote:

Hello.

I have a prototype Kadischi here that can be invoked from LiveCD made with Kadischi and also acts as a installer to disk from LiveCD. The problems I am having relate to packages.py, yuminstall.py and grabber.py in the Python package under yum and urlgrabber site-packages.

Well, I finally got it working, but I had to hack the heck out of Anaconda to do so.
Currently this is what had to be changed: <attached>

Could we fix some of this in RAWHIDE perhaps, so this hackery won't be neccessary?
It seems alot of exceptions occur when a device already exists!

J. Hartline

--- /usr/lib/anaconda/util.py.orig	2006-09-01 04:05:38.000000000 -0500
+++ /usr/lib/anaconda/util.py	2006-09-01 04:16:26.000000000 -0500
@@ -31,7 +31,7 @@
 		     searchPath = 0, root = '/', newPgrp = 0,
 		     ignoreTermSigs = 0):
     if not searchPath and not os.access (root + command, os.X_OK):
-	raise RuntimeError, command + " can not be run"
+	pass
 
     childpid = os.fork()
     if childpid == 0:
@@ -425,9 +425,12 @@
 #    print "major is %s, minor is %s" %(major, minor)
     if major is None or minor is None:
         return
-    mkdirChain(root + "/dev/mapper")
-    isys.mknod(root + "/dev/mapper/control", stat.S_IFCHR | 0600,
-               isys.makedev(major, minor))
+    try:
+        mkdirChain(root + "/dev/mapper")
+        isys.mknod(root + "/dev/mapper/control", stat.S_IFCHR | 0600,
+                   isys.makedev(major, minor))
+    except:
+        pass
 
 # make some miscellaneous character device nodes 
 def makeCharDeviceNodes():
@@ -459,15 +462,24 @@
 
         for i in range(1, num):
             dev = "%s%s%d" % (drive, sep, i)
-            isys.makeDevInode(dev, "/dev/%s" % (dev,))
+            try:
+                isys.makeDevInode(dev, "/dev/%s" % (dev,))
+            except:
+                pass
 
     cdroms = isys.cdromList()
     for drive in cdroms:
-        isys.makeDevInode(drive, "/dev/%s" % (drive,))
+        try: 
+            isys.makeDevInode(drive, "/dev/%s" % (drive,))
+        except:
+            pass
 
     for mdMinor in range(0, 32):
         md = "md%d" %(mdMinor,)
-        isys.makeDevInode(md, "/dev/%s" %(md,))
+        try:
+            isys.makeDevInode(md, "/dev/%s" %(md,))
+        except:
+            pass
 
     # make the node for the device mapper
     makeDMNode()
--- /usr/lib/anaconda/syslogd.py.orig	2006-09-01 04:19:04.000000000 -0500
+++ /usr/lib/anaconda/syslogd.py	2006-09-01 04:19:48.000000000 -0500
@@ -81,8 +81,11 @@
                     path = "/usr/bin/anaconda.real"
                 else:
                     path = "/usr/bin/anaconda"
-                    
-            os.execv (path, ("syslogd", "--syslogd", root, log))
+
+            try:        
+                os.execv (path, ("syslogd", "--syslogd", root, log))
+            except:
+                pass
 
     def stop(self):
         if self.pid == -1:
--- /usr/lib/anaconda/fsset.py.orig	2006-09-01 04:17:14.000000000 -0500
+++ /usr/lib/anaconda/fsset.py	2006-09-01 04:18:17.000000000 -0500
@@ -1283,8 +1283,11 @@
         if not os.path.exists(dev):
             isys.makeDevInode(root.device.getDevice(), dev)        
         rdev = os.stat(dev).st_rdev
-        
-        os.mknod("%s/dev/root" % (instPath,), stat.S_IFBLK | 0600, rdev)
+       
+        try: 
+            os.mknod("%s/dev/root" % (instPath,), stat.S_IFBLK | 0600, rdev)
+        except:
+            pass
 
     # return the "boot" device
     def getBootDev(self):
--- /usr/lib/anaconda/isys.py.orig	2006-09-01 04:05:20.000000000 -0500
+++ /usr/lib/anaconda/isys.py	2006-09-01 04:09:47.000000000 -0500
@@ -388,7 +388,10 @@
         return _isys.makedev(major, minor)
 
 def mknod(pathname, mode, dev):
-    return _isys.mknod(pathname, mode, dev)
+    try:
+        return _isys.mknod(pathname, mode, dev)
+    except:
+        pass
 
 def inet_ntoa (addr):
     return "%d.%d.%d.%d" % ((addr >> 24) & 0x000000ffL,

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux