[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[PATCH 2/2] Write out configuration of FCoE to installed system
- From: Hans de Goede <hdegoede redhat com>
- To: Discussion of Development and Customization of the Red Hat Linux Installer <anaconda-devel-list redhat com>
- Cc:
- Subject: [PATCH 2/2] Write out configuration of FCoE to installed system
- Date: Thu, 2 Jul 2009 11:33:20 +0200
Write out an /etc/fcoe/cfg-eth# file for each nic used to connect to
an FCoE SAN during the install.
---
storage/fcoe.py | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/storage/fcoe.py b/storage/fcoe.py
index 46c5bcb..1ea5e9d 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
--
1.6.2.2
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]