Commit 64993367 authored by Mike Hibler's avatar Mike Hibler

Fixes for MFS install.

parent f69ff9d7
#
# Copyright (c) 2000-2012 University of Utah and the Flux Group.
# Copyright (c) 2000-2013 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -144,6 +144,7 @@ frisbee-mfs-install: destdircheck
ln -s /etc/dhclient* $(DESTDIR)/usr/local/etc/
rmdir $(DESTDIR)/usr/local/etc/emulab
$(INSTALL) -m 644 $(SRCDIR)/mfs-frisbee-rc.conf $(SYSETCDIR)/rc.conf
$(INSTALL) -m 555 ./netif-emulab $(SYSETCDIR)/rc.d/netif-emulab
@if [ -r $(SRCDIR)/master.passwd ]; then \
$(INSTALL) -m 600 $(SRCDIR)/master.passwd $(SYSETCDIR); \
pwd_mkdb -d $(SYSETCDIR) $(SYSETCDIR)/master.passwd; \
......
#
# Copyright (c) 2000-2013 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
# 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/>.
#
# }}}
#
# Emulab version of netif to DHCP on all interfaces simultaneously.
# Runs before the standard netif, and effectively neuters that script.
# Note the dependencies below. Every script that declares that it must run
......@@ -44,11 +65,15 @@ fi
#
cnet_nfe_hack()
{
for i in 5 10 15 20 20 20 30 30 30 60 60; do
# XXX try for 10 minutes at fixed 30s intervals
# XXX tried slowly increasing intervals, but didn't work
for i in 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30; do
echo "`date`: nfe_hack: taking interfaces down and up ..."
for _if in $*; do
ifconfig $_if down
sleep 2
done
sleep 2
for _if in $*; do
ifconfig $_if up
done
sleep $i
......
#
# Copyright (c) 2000-2012 University of Utah and the Flux Group.
# Copyright (c) 2000-2013 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -147,9 +147,13 @@ script-install: dir-install
#
frisbee-mfs-install: destdircheck
(cd ../freebsd5; $(MAKE) all frisbee-mfs-install)
rm -rf $(SYSETCDIR)/rc.conf.d
rm -f $(SYSETCDIR)/testbed/dhclient
rm -f $(DESTDIR)/usr/local/etc/dhclient*
ln -s /etc/dhclient* $(DESTDIR)/usr/local/etc/
rmdir $(DESTDIR)/usr/local/etc/emulab
$(INSTALL) -m 644 $(SRCDIR)/mfs-frisbee-rc.conf $(SYSETCDIR)/rc.conf
$(INSTALL) -m 555 ./netif-emulab $(SYSETCDIR)/rc.d/netif-emulab
@if [ -r $(SRCDIR)/master.passwd ]; then \
$(INSTALL) -m 600 $(SRCDIR)/master.passwd $(SYSETCDIR); \
pwd_mkdb -d $(SYSETCDIR) $(SYSETCDIR)/master.passwd; \
......@@ -158,11 +162,15 @@ frisbee-mfs-install: destdircheck
$(INSTALL) -m 644 $(SRCDIR)/group $(SYSETCDIR); \
fi
mfs-install:
mfs-install: destdircheck
(cd ../freebsd5; $(MAKE) all mfs-install)
rm -rf $(JAILDIR)
rm -rf $(SYSETCDIR)/rc.conf.d
rm -rf $(DESTDIR)/root/.cvsup
rm -f $(SYSETCDIR)/testbed/dhclient
rm -f $(DESTDIR)/usr/local/etc/dhclient*
ln -s /etc/dhclient* $(DESTDIR)/usr/local/etc/
$(INSTALL) -m 644 $(SRCDIR)/mfs-rc.conf $(SYSETCDIR)/rc.conf
@if [ -r $(SRCDIR)/master.passwd ]; then \
$(INSTALL) -m 600 $(SRCDIR)/master.passwd $(SYSETCDIR); \
pwd_mkdb -d $(SYSETCDIR) $(SYSETCDIR)/master.passwd; \
......
# Common to both MFSes
sendmail_enable="NONE"
inetd_enable="NO"
ldconfig_paths=""
ldconfig_paths_aout=""
blanktime="NO"
update_motd="NO"
background_fsck="NO"
rc_info="YES"
# turn on syslogd for debugging
syslogd_enable="NO"
autoboot="no"
varmfs="NO"
ip6addrctl_enable="NO"
moused_nondefault_enable="NO"
cleanvar_enable="NO"
clear_tmp_X="NO"
virecover_enable="NO"
newsyslog_enable="NO"
gptboot_enable="NO"
# Specific to frisbee MFS
cron_enable="NO"
devd_enable="NO"
#
# FreeBSD has no way to say "DHCP on all available interfaces" without
# spelling out here what all those interfaces are. So here we just say
# to (statically) configure the loopback device. The real network
# interfaces are identified in rc.conf.d/dhclient for use by the
# rc.d/dhclient script.
#
network_interfaces="lo0"
#
# Argh! dhclient in FreeBSD 5 has a new auto-background "feature",
# it dives into the background after 10 seconds regardless of whether
# it has received a response. This is fubar for us. Unfortunately,
# we cannot just crank this number through the roof because it is based
# on a polling interval which actually has a rational purpose. The timeout
# is actually (2 * polling_interval) where polling_interval is how often
# dhclient rechecks an interface without link. We need to keep this value
# reasonable in the event that we boot up and don't immediately have link
# on the control net. So lets try 15 seconds (30 second auto-background
# timeout) and see how things go.
#
dhclient_flags="-i 15"
# Common to both MFSes
sendmail_enable="NONE"
inetd_enable="NO"
ldconfig_paths=""
ldconfig_paths_aout=""
blanktime="NO"
update_motd="NO"
background_fsck="NO"
rc_info="YES"
# turn on syslogd for debugging
syslogd_enable="NO"
autoboot="no"
varmfs="NO"
ip6addrctl_enable="NO"
moused_nondefault_enable="NO"
cleanvar_enable="NO"
clear_tmp_X="NO"
virecover_enable="NO"
newsyslog_enable="NO"
gptboot_enable="NO"
# Specific to admin MFS
sshd_enable="YES"
cron_enable="YES"
ntpdate_enable="YES"
ntpdate_flags="boss"
nfs_client_enable="YES"
#
# FreeBSD has no way to say "DHCP on all available interfaces" without
# spelling out here what all those interfaces are. So here we just say
# to (statically) configure the loopback device. The real network
# interfaces are identified in rc.conf.d/dhclient for use by the
# rc.d/dhclient script.
#
network_interfaces="lo0"
#
# Argh! dhclient in FreeBSD 5 has a new auto-background "feature",
# it dives into the background after 10 seconds regardless of whether
# it has received a response. This is fubar for us. Unfortunately,
# we cannot just crank this number through the roof because it is based
# on a polling interval which actually has a rational purpose. The timeout
# is actually (2 * polling_interval) where polling_interval is how often
# dhclient rechecks an interface without link. We need to keep this value
# reasonable in the event that we boot up and don't immediately have link
# on the control net. So lets try 15 seconds (30 second auto-background
# timeout) and see how things go.
#
dhclient_flags="-i 15"
#
# Copyright (c) 2000-2013 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
# 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/>.
#
# }}}
#
# Emulab version of netif to DHCP on all interfaces simultaneously.
# Runs before the standard netif, and effectively neuters that script.
# Note the dependencies below. Every script that declares that it must run
......@@ -44,11 +65,15 @@ fi
#
cnet_nfe_hack()
{
for i in 5 10 15 20 20 20 30 30 30 60 60; do
# XXX try for 10 minutes at fixed 30s intervals
# XXX tried slowly increasing intervals, but didn't work
for i in 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30; do
echo "`date`: nfe_hack: taking interfaces down and up ..."
for _if in $*; do
ifconfig $_if down
sleep 2
done
sleep 2
for _if in $*; do
ifconfig $_if up
done
sleep $i
......
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