summaryrefslogtreecommitdiffstats
path: root/zfcp.py
diff options
context:
space:
mode:
authorKarsten Hopp <karsten@redhat.de>2004-08-25 14:07:35 +0000
committerKarsten Hopp <karsten@redhat.de>2004-08-25 14:07:35 +0000
commitee77744031becc04c97efdf8c0c0c3e912af6ce6 (patch)
tree337e5a03fa638ba2bcf40af2120bb43c6ac3d12a /zfcp.py
parente9278399d032be5852b925feed58517af0582381 (diff)
downloadanaconda-ee77744031becc04c97efdf8c0c0c3e912af6ce6.tar.gz
anaconda-ee77744031becc04c97efdf8c0c0c3e912af6ce6.tar.xz
anaconda-ee77744031becc04c97efdf8c0c0c3e912af6ce6.zip
- cleanup some unused variables
- new function common to gui and text mode to update the config files (-1 FIXME) - write /tmp/zfcp.conf earlier
Diffstat (limited to 'zfcp.py')
-rw-r--r--zfcp.py25
1 files changed, 16 insertions, 9 deletions
diff --git a/zfcp.py b/zfcp.py
index ba9fc0809..5aa1600e0 100644
--- a/zfcp.py
+++ b/zfcp.py
@@ -16,6 +16,7 @@
import string
import os
import iutil
+import isys
from rhpl.translate import _, N_
from rhpl.log import log
@@ -25,6 +26,17 @@ class ZFCP:
def __init__(self):
self.readConfig()
+ def updateConfig(self, fcpdevices, diskset, intf):
+ self.writeFcpSysfs(fcpdevices)
+ self.writeModprobeConf(fcpdevices)
+ self.writeZFCPconf(fcpdevices)
+ isys.flushDriveDict()
+ diskset.refreshDevices(intf)
+ try:
+ iutil.makeDriveDeviceNodes()
+ except:
+ pass
+
# remove the configuration from sysfs, required when the user
# steps backward from the partitioning screen and changes fcp configuration
def cleanFcpSysfs(self, fcpdevices):
@@ -127,16 +139,11 @@ class ZFCP:
except:
pass
- def write(self, instPath):
- if not len(self.fcpdevices):
+ def writeZFCPconf(self, fcpdevices):
+ if not len(fcpdevices):
return
- if not os.path.isdir("%s/etc/" %(instPath,)):
- iutil.mkdirChain("%s/etc/" %(instPath,))
-
- fn = "%s/etc/zfcp.conf" % (instPath,)
- f = open(fn, "w")
- os.chmod(fn, 0644)
- for dev in self.fcpdevices:
+ f = open("/tmp/zfcp.conf", "w")
+ for dev in fcpdevices:
f.write("%s %s %s %s %s\n" % (dev[0], dev[1], dev[2], dev[3], dev[4],))
f.close()