# will disable core dumps. Setting it to "unlimited" will dump all
# core files regardless of size.
#CORE_LIMIT=unlimited
+
+# DATAPATH_ID: Identifier for this switch.
+#
+# By default, the switch generates a new, random datapath ID every time
+# it starts up. By setting this value, the datapath ID will be consistent
+# from one run to the next.
+#
+# Set DATAPATH_ID to a MAC address in the form XX:XX:XX:XX:XX:XX where each
+# X is a hexadecimal digit (0-9 or a-f).
+#DATAPATH_ID=XX:XX:XX:XX:XX:XX
unset COMMANDS
unset DAEMON_OPTS
unset CORE_LIMIT
+unset DATAPATH_ID
default=/etc/default/openflow-switch
if [ -f $default ] ; then
. $default
must_succeed "Adding $netdev to datapath" dpctl addif nl:0 $netdev
done
+ xx='[0-9abcdefABCDEF][0-9abcdefABCDEF]'
+ case $DATAPATH_ID in
+ '')
+ ;;
+ $xx:$xx:$xx:$xx:$xx:$xx)
+ ifconfig of0 down
+ must_succeed "Setting of0 MAC address to $DATAPATH_ID" ifconfig of0 hw ether $DATAPATH_ID
+ ifconfig of0 up
+ ;;
+ *)
+ echo "DATAPATH_ID is not a valid MAC address in the form XX:XX:XX:XX:XX:XX, ignoring" >&2
+ ;;
+ esac
+
if test "$MODE" = in-band; then
if test "$SWITCH_IP" = dhcp; then
must_succeed "Temporarily disabling of0" ifconfig of0 down