summaryrefslogtreecommitdiffstats
path: root/isys/isys.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2006-06-16 01:42:21 +0000
committerJeremy Katz <katzj@redhat.com>2006-06-16 01:42:21 +0000
commit5745e33b068525aa090f9ed711427b167498a5f3 (patch)
tree51db9d8ffb5cbe7f13f1ca22edd89147e4f051a0 /isys/isys.py
parente81ad988ec435ca8ba79aae4536953777d314420 (diff)
downloadanaconda-5745e33b068525aa090f9ed711427b167498a5f3.tar.gz
anaconda-5745e33b068525aa090f9ed711427b167498a5f3.tar.xz
anaconda-5745e33b068525aa090f9ed711427b167498a5f3.zip
just the sync bit
Diffstat (limited to 'isys/isys.py')
-rw-r--r--isys/isys.py33
1 files changed, 11 insertions, 22 deletions
diff --git a/isys/isys.py b/isys/isys.py
index 9ec1cba04..166f3fd27 100644
--- a/isys/isys.py
+++ b/isys/isys.py
@@ -26,7 +26,6 @@ import kudzu
import iutil
import warnings
import resource
-import re
import rhpl
import struct
@@ -466,6 +465,9 @@ for d in range(80, 80 + 15):
biosdisks[disk] = d
def compareDrives(first, second):
+ type1 = first[0:2]
+ type2 = second[0:2]
+
if biosdisks.has_key(first) and biosdisks.has_key(second):
one = biosdisks[first]
two = biosdisks[second]
@@ -474,21 +476,17 @@ def compareDrives(first, second):
elif (one > two):
return 1
- if first.startswith("hd"):
- type1 = 0
- elif first.startswith("sd"):
- type1 = 1
- elif first.startswith("xvd"):
- type1 = -1
+ if type1 == "hd":
+ type1 = 0
+ elif type1 == "sd":
+ type1 = 1
else:
- type1 = 2
+ type1 = 2
- if second.startswith("hd"):
- type2 = 0
- elif second.startswith("sd"):
+ if type2 == "hd":
+ type2 = 0
+ elif type2 == "sd":
type2 = 1
- elif second.startswith("xvd"):
- type2 = -1
else:
type2 = 2
@@ -791,15 +789,6 @@ def driveIsRemovable(device):
return False
-def driveIsIscsi(device):
- # ewww. just ewww.
- if not os.path.islink("/sys/block/%s/device" %(device,)):
- return False
- target = os.readlink("/sys/block/%s/device" %(device,))
- if re.search("/platform/host[0-9]*/session[0-9]*/target[0-9]*:[0-9]*:[0-9]*/[0-9]*:[0-9]*:[0-9]*:[0-9]*", target) is not None:
- return True
- return False
-
def vtActivate (num):
_isys.vtActivate (num)