| #!/bin/sh |
| # |
| # Copyright (c) 2004-2014 University of Utah and the Flux Group. |
| # |
| # This file is part of the Emulab network testbed software. |
| # |
| # This file is free software: you can redistribute it and/or modify it |
| # under the terms of the GNU Affero General Public License as published by |
| # the Free Software Foundation, either version 3 of the License, or (at |
| # your option) any later version. |
| # |
| # This file is distributed in the hope that it will be useful, but WITHOUT |
| # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public |
| # License for more details. |
| # |
| # You should have received a copy of the GNU Affero General Public License |
| # along with this file. If not, see <http://www.gnu.org/licenses/>. |
| # |
| |
| # |
| # This script will be executed *after* all the other init scripts. |
| # You can put your own initialization stuff in here if you don't |
| # want to do the full Sys V style init stuff. |
| |
| # XXX compat with RedHat feature |
| if [ ! -d /var/lock/subsys ]; then |
| mkdir /var/lock/subsys |
| fi |
| |
| # XXX serial console seems to be in raw mode, makes our messages ugly :-) |
| if [ ! -e /dev/hvc0 -a -c /dev/ttyS0 ]; then |
| stty -F /dev/ttyS0 opost onlcr |
| fi |
| |
| # |
| # Testbed Setup. |
| # |
| if [ -f /usr/local/etc/emulab/rc/rc.testbed ] ; then |
| echo -n 'testbed config: ' |
| /usr/local/etc/emulab/rc/rc.testbed |
| touch /var/lock/subsys/testbed |
| fi |
| |
| route add -net {{ control_net }} gw {{ gateway }} || true |
| |
| echo "Boot Complete" |
| |
| exit 0 |