summaryrefslogtreecommitdiffstats
path: root/zfcp.py
diff options
context:
space:
mode:
authorKarsten Hopp <karsten@redhat.de>2004-08-24 09:43:46 +0000
committerKarsten Hopp <karsten@redhat.de>2004-08-24 09:43:46 +0000
commit7dff96d9bbd5c640b8132635cde2d91b0dbebab1 (patch)
tree12474a1918117116e5b005ab9d4f15d4be8ec5d4 /zfcp.py
parentb674c064457806e944f303e63ca965c5ce7a8a9a (diff)
downloadanaconda-7dff96d9bbd5c640b8132635cde2d91b0dbebab1.tar.gz
anaconda-7dff96d9bbd5c640b8132635cde2d91b0dbebab1.tar.xz
anaconda-7dff96d9bbd5c640b8132635cde2d91b0dbebab1.zip
- ignore alias lines with a comment sign at the beginning. Don't care about trailing newlines
Diffstat (limited to 'zfcp.py')
-rw-r--r--zfcp.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/zfcp.py b/zfcp.py
index c617b672b..0a85f3c4b 100644
--- a/zfcp.py
+++ b/zfcp.py
@@ -102,7 +102,7 @@ class ZFCP:
pass
foundalias = 0
for line in lines:
- if line == "alias scsi_hostadapter zfcp":
+ if string.find(string.strip(line), "alias scsi_hostadapter zfcp") == 0:
foundalias = 1
break
if len(fcpdevices):
@@ -118,7 +118,7 @@ class ZFCP:
try:
f = open("/tmp/modprobe.conf", "w")
for line in lines:
- if line != "alias scsi_hostadapter zfcp":
+ if string.find(string.strip(line), "alias scsi_hostadapter zfcp") != 0:
f.write(line)
f.close()
except: