summaryrefslogtreecommitdiffstats
path: root/packages.py
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2002-08-15 19:02:10 +0000
committerMike Fulbright <msf@redhat.com>2002-08-15 19:02:10 +0000
commit4e9ef347e704f8ff5fa9cdd7a92fd5eacac662b2 (patch)
tree95cc110c21c3c0e630f31b8583d45e88234a57f4 /packages.py
parentec013936e1ff34f039bc9ed4666ca51c7b2b367a (diff)
downloadanaconda-4e9ef347e704f8ff5fa9cdd7a92fd5eacac662b2.tar.gz
anaconda-4e9ef347e704f8ff5fa9cdd7a92fd5eacac662b2.tar.xz
anaconda-4e9ef347e704f8ff5fa9cdd7a92fd5eacac662b2.zip
try unmouting usbdevfs in / before mounting in chroot, otherwise we get hangs like some bug reports we have had
Diffstat (limited to 'packages.py')
-rw-r--r--packages.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/packages.py b/packages.py
index 5620e9682..dd99bb02e 100644
--- a/packages.py
+++ b/packages.py
@@ -877,12 +877,23 @@ def doPostInstall(method, id, intf, instPath):
pass
if arch != "s390":
+ # we need to unmount usbdevfs before mounting it
+ usbWasMounted = iutil.isUSBDevFSMounted()
+ if usbWasMounted:
+ isys.umount('/proc/bus/usb', removeDir = 0)
+
+ # see if unmount suceeded, if not pretent it isnt mounted
+ # because we're screwed anywyas if system is going to
+ # lock up
+ if iutil.isUSBDevFSMounted():
+ usbWasMounted = 0
+
unmountUSB = 0
try:
isys.mount('/usbdevfs', instPath+'/proc/bus/usb', 'usbdevfs')
unmountUSB = 1
except:
- log("Mount of /proc/bus/usb failed")
+ log("Mount of /proc/bus/usb in chroot failed")
pass
@@ -904,6 +915,9 @@ def doPostInstall(method, id, intf, instPath):
if unmountUSB:
isys.umount(instPath + '/proc/bus/usb', removeDir = 0)
+ if usbWasMounted:
+ isys.mount('/usbdevfs', '/proc/bus/usb', 'usbdevfs')
+
w.set(4)
if upgrade and id.dbpath is not None: