Skip to content

Commit

Permalink
Merge pull request hreinecke#1 from lightlace/master
Browse files Browse the repository at this point in the history
-added check for FCoE module
  • Loading branch information
hreinecke authored Jun 7, 2017
2 parents 5ec74cd + 9a7a476 commit 4564308
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fcoe-target-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ MAC_FCOE_1=0c:fd:37:d4:44:7b
VLAN_0=210
VLAN_1=200

##check if the FCoE module is loaded, otherwise terminate
if ! lsmod | grep "fcoe" &> /dev/null; then
echo "FCoE module not found, please load the FCoE module first using \"modprobe fcoe"\"
exit 1
fi

gen_mac_address() {
# This is the SUSE OUI
OUI=0x0cfd37
Expand Down
6 changes: 6 additions & 0 deletions setup_fcoe.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/bin/bash

##check if the FCoE module is loaded, otherwise terminate
if ! lsmod | grep "fcoe" &> /dev/null; then
echo "FCoE module not found, please load the FCoE module first using \"modprobe fcoe"\"
exit 1
fi

gen_sas_address() {
prefix="naa.6001405"
uuid=$(uuidgen | sed 's/-//g' | tail --bytes 10)
Expand Down

0 comments on commit 4564308

Please sign in to comment.