Andy Bavier | cccf27b | 2015-08-17 14:48:29 -0400 | [diff] [blame] | 1 | #!/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 |
| 27 | if [ ! -d /var/lock/subsys ]; then |
| 28 | mkdir /var/lock/subsys |
| 29 | fi |
| 30 | |
| 31 | # XXX serial console seems to be in raw mode, makes our messages ugly :-) |
| 32 | if [ ! -e /dev/hvc0 -a -c /dev/ttyS0 ]; then |
| 33 | stty -F /dev/ttyS0 opost onlcr |
| 34 | fi |
| 35 | |
| 36 | # |
| 37 | # Testbed Setup. |
| 38 | # |
| 39 | if [ -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 |
| 43 | fi |
| 44 | |
| 45 | route add -net {{ control_net }} gw {{ gateway }} || true |
| 46 | |
| 47 | echo "Boot Complete" |
| 48 | |
| 49 | exit 0 |