blob: a28ab65b1e5e1bbf4410265aaa9ae9cc83c1b0e7 [file] [log] [blame]
Andy Baviercccf27b2015-08-17 14:48:29 -04001#!/bin/sh
2#
3# Copyright (c) 2004-2014 University of Utah and the Flux Group.
4#
5# This file is part of the Emulab network testbed software.
6#
7# This file is free software: you can redistribute it and/or modify it
8# under the terms of the GNU Affero General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or (at
10# your option) any later version.
11#
12# This file is distributed in the hope that it will be useful, but WITHOUT
13# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
15# License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this file. If not, see <http://www.gnu.org/licenses/>.
19#
20
21#
22# This script will be executed *after* all the other init scripts.
23# You can put your own initialization stuff in here if you don't
24# want to do the full Sys V style init stuff.
25
26# XXX compat with RedHat feature
27if [ ! -d /var/lock/subsys ]; then
28 mkdir /var/lock/subsys
29fi
30
31# XXX serial console seems to be in raw mode, makes our messages ugly :-)
32if [ ! -e /dev/hvc0 -a -c /dev/ttyS0 ]; then
33 stty -F /dev/ttyS0 opost onlcr
34fi
35
36#
37# Testbed Setup.
38#
39if [ -f /usr/local/etc/emulab/rc/rc.testbed ] ; then
40 echo -n 'testbed config: '
41 /usr/local/etc/emulab/rc/rc.testbed
42 touch /var/lock/subsys/testbed
43fi
44
45route add -net {{ control_net }} gw {{ gateway }} || true
46
47echo "Boot Complete"
48
49exit 0