summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2008-01-30 16:39:18 -0500
committerChris Lumens <clumens@redhat.com>2008-01-30 17:28:16 -0500
commitd3d83e1b10264a357279752f5c9718751050f2fa (patch)
treeaeaee296758fa9c029daad68e2ce77fe9cd32cd9
parent11377383a17904870d71a2c204937af7466e9a8a (diff)
downloadanaconda-d3d83e1b10264a357279752f5c9718751050f2fa.tar.gz
anaconda-d3d83e1b10264a357279752f5c9718751050f2fa.tar.xz
anaconda-d3d83e1b10264a357279752f5c9718751050f2fa.zip
Make sure the device name starts with /dev (#430811).
If the device name doesn't start with /dev, readFSLabel craps out and returns None. This means we can't find the /boot partition and then upgrades will not work.
-rwxr-xr-xisys/isys.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/isys/isys.py b/isys/isys.py
index 6a2e2156e..5136a773b 100755
--- a/isys/isys.py
+++ b/isys/isys.py
@@ -736,10 +736,16 @@ def dhcpNetDevice(device):
return _isys.dhcpnetdevice(devname, v4, v4method, v6, v6method, klass)
def readFSLabel(device):
+ if not device.startswith("/dev/"):
+ device = "/dev/%s" % device
+
label = _isys.getblkid(device, "LABEL")
return label
def readFSType(device):
+ if not device.startswith("/dev/"):
+ device = "/dev/%s" % device
+
fstype = _isys.getblkid(device, "TYPE")
if fstype is None:
# FIXME: libblkid doesn't show physical volumes as having a filesystem