summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2009-07-02 11:32:04 +0200
committerHans de Goede <hdegoede@redhat.com>2009-07-02 22:05:40 +0200
commite979e0e1522a91652fddc14e955c84e44e6ad87b (patch)
tree27779ff099817209cd4153f2dd3e58bc9f13a29f /storage
parent81334650378fe67bf9adc22daf67ccf41688be04 (diff)
downloadanaconda-e979e0e1522a91652fddc14e955c84e44e6ad87b.tar.gz
anaconda-e979e0e1522a91652fddc14e955c84e44e6ad87b.tar.xz
anaconda-e979e0e1522a91652fddc14e955c84e44e6ad87b.zip
Write out configuration of FCoE to installed system
Write out an /etc/fcoe/cfg-eth# file for each nic used to connect to an FCoE SAN during the install.
Diffstat (limited to 'storage')
-rw-r--r--storage/fcoe.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/storage/fcoe.py b/storage/fcoe.py
index 46c5bcb9c..1ea5e9d17 100644
--- a/storage/fcoe.py
+++ b/storage/fcoe.py
@@ -21,6 +21,7 @@ import os
import iutil
import logging
import time
+from flags import flags
log = logging.getLogger("anaconda")
import gettext
@@ -86,7 +87,22 @@ class fcoe(object):
return
def write(self, instPath, anaconda):
- # erm, do we need todo anything here ?
+ if flags.test or not self.nics:
+ return
+
+ if not os.path.isdir(instPath + "/etc/fcoe"):
+ os.makedirs(instPath + "/etc/fcoe", 0755)
+
+ for nic in self.nics:
+ fd = os.open(instPath + "/etc/fcoe/cfg-" + nic,
+ os.O_RDWR | os.O_CREAT)
+ os.write(fd, '# Created by anaconda\n')
+ os.write(fd, '# Enable/Disable FCoE service at the Ethernet port\n')
+ os.write(fd, 'FCOE_ENABLE="yes"\n')
+ os.write(fd, '# Indicate if DCB service is required at the Ethernet port\n')
+ os.write(fd, 'DCB_REQUIRED="no"\n')
+ os.close(fd)
+
return
# vim:tw=78:ts=4:et:sw=4