Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
30cbf0df
Commit
30cbf0df
authored
Apr 06, 2015
by
Mike Hibler
Browse files
FreeBSD slicefix change to handle disabling an interface.
parent
ff3a7dca
Changes
1
Hide whitespace changes
Inline
Side-by-side
clientside/tmcc/freebsd/slicefix
View file @
30cbf0df
#!/bin/sh
#
# Copyright (c) 2000-201
4
University of Utah and the Flux Group.
# Copyright (c) 2000-201
5
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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment