From fabcf9389e79c3535a58b5dc30632d444cb513f6 Mon Sep 17 00:00:00 2001 From: Nithin Sujir <nsujir@broadcom.com> Date: Thu, 27 Jan 2011 04:12:08 +0000 Subject: [PATCH 02/16] fcoe-utils: Add SUPPORTED_DRIVERS field to config SUPPORTED_DRIVERS is a space separated string field added to the config file. The fcoe service will use this field instead of the previous hardcoded "fcoe" to modprobe during startup. Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: Petr Sabata <psabata@redhat.com> --- doc/fcoemon.txt | 5 +++-- etc/config | 4 ++++ etc/initd/initd.fedora | 2 +- etc/initd/initd.suse | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/doc/fcoemon.txt b/doc/fcoemon.txt index f42c8c0..117b2d0 100644 --- a/doc/fcoemon.txt +++ b/doc/fcoemon.txt @@ -159,8 +159,9 @@ default options in this file are: *DEBUG="no"* and *USE_SYSLOG="yes"*. The former is used to enable debugging messages from the fcoe service script and *fcoemon* (via the *--debug* option). The latter is to indicate if the log messages are to be output to the system log (via the *--syslog* -option). Any changes to this file will require a restart of the *fcoe* -service. +option). *SUPPORTED_DRIVERS* is the list of drivers to automatically load +during fcoe service start. Any changes to this file will require a restart +of the *fcoe* service. /etc/fcoe/cfg-<ifname> ~~~~~~~~~~~~~~~~~~~~~~ diff --git a/etc/config b/etc/config index 2d08c9e..c993f35 100644 --- a/etc/config +++ b/etc/config @@ -8,3 +8,7 @@ DEBUG="no" # All the messages go to syslog and stderr (script & C code) USE_SYSLOG="yes" +## Type: string. Driver names separated by space +## Default: list of default drivers +# All supported drivers listed here are loaded when service starts +SUPPORTED_DRIVERS="fcoe bnx2fc" diff --git a/etc/initd/initd.fedora b/etc/initd/initd.fedora index 3888dda..6a791cd 100755 --- a/etc/initd/initd.fedora +++ b/etc/initd/initd.fedora @@ -68,7 +68,7 @@ start() echo -n $"Starting FCoE initiator service: " modprobe -q libfc - modprobe -q fcoe + modprobe -q -a $SUPPORTED_DRIVERS daemon --pidfile ${PID_FILE} ${FCOEMON} ${FCOEMON_OPTS} diff --git a/etc/initd/initd.suse b/etc/initd/initd.suse index 139de2d..638eae5 100755 --- a/etc/initd/initd.suse +++ b/etc/initd/initd.suse @@ -82,7 +82,7 @@ test -x $FCOEMON || { startup_fcoe_modules() { - modprobe fcoe > /dev/null 2>&1 + modprobe -a $SUPPORTED_DRIVERS > /dev/null 2>&1 } start() -- 1.7.4.4