Commit 30cbf0df authored by Mike Hibler's avatar Mike Hibler

FreeBSD slicefix change to handle disabling an interface.

parent ff3a7dca
#!/bin/sh
#
# Copyright (c) 2000-2014 University of Utah and the Flux Group.
# Copyright (c) 2000-2015 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -122,6 +122,22 @@ if [ -n "$BIOSDISK" ]; then
esac
fi
#
# See if we need to exclude the management interface.
# If an interface is specified and we can parse, create the "hint"
# line for loader.conf.
#
DISABLEIF=$SLICEFIX_DISABLEIF
DISABLEHINT=
if [ -n "$DISABLEIF" ]; then
_str=`echo $DISABLEIF | sed -E -e 's/^([a-zA-Z0-9]*[a-zA-Z])([0-9]+)/hint.\1.\2.disabled/'`
if [ "$_str" = "$DISABLEIF" ]; then
echo "WARNING: unparsable define name \"$DISABLEIF\" ignored"
else
DISABLEHINT=$_str
fi
fi
#
# Find out what our console should be:
# if $CONSOLE is set and valid, use that
......@@ -286,6 +302,11 @@ dofreebsd() {
fixit=1
fi
# Disable mgmt interface?
if [ -n "$DISABLEHINT" ]; then
fixit=1
fi
# If our disk/part does not appear anywhere in fstab, we need to fix it
grep "^/dev/${disk}s${part}" /mnt/etc/fstab >/dev/null 2>&1
case $? in
......@@ -587,6 +608,16 @@ EOF2
fi
fi
#
# Disable the management interface in the OS.
#
if [ -n "$DISABLEHINT" ]; then
cat <<EOF0
# disable dedicated management interface
$DISABLEHINT="1"
EOF0
fi
#
# Fix up console.
# null and vga are easy, just set console={null,vid}console
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment