Commit 7ed1b040 authored by Mike Hibler's avatar Mike Hibler

Fixups for a FreeBSD 10.x frisbee MFS.

parent 13fb9e6d
......@@ -82,7 +82,7 @@ mfsoscheck:
mfs: mfsoscheck mfs-subdirs
mfs-install: destdircheck mfs client-mkdirs mfs-install-subdirs
frisbee-mfs: mfsoscheck frisbee-mfs-subdirs
frisbee-mfs-install: destdircheck frisbee-mfs client-mkdirs frisbee-mfs-install-subdirs
frisbee-mfs-install: destdircheck frisbee-mfs frisbee-mfs-mkdirs frisbee-mfs-install-subdirs
newnode-mfs: mfsoscheck newnode-mfs-subdirs
newnode-mfs-install: destdircheck newnode-mfs client-mkdirs newnode-mfs-install-subdirs
......@@ -108,6 +108,11 @@ client-mkdirs:
-mkdir -p $(DESTDIR)$(CLIENT_BINDIR)
-mkdir -p $(DESTDIR)$(CLIENT_MANDIR)
frisbee-mfs-mkdirs:
-mkdir -p $(DESTDIR)/etc/emulab
-mkdir -p $(DESTDIR)/etc/testbed
-mkdir -p $(DESTDIR)/usr/local/etc/emulab
freenas-os-check:
@if [ "$(SYSTEM)" != "FreeBSD" -o "$(ARCH)" != "amd64" -o \
\( "$(REL)" != "9.2" -a "$(REL)" != "9.3" -a "$(REL)" != "8.3" \) ]; then \
......
#
# Copyright (c) 2000-2015 University of Utah and the Flux Group.
# Copyright (c) 2000-2017 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -164,6 +164,10 @@ frisbee-mfs-install: destdircheck
rm -f $(LETCDIR)/dhclient*
ln -s /etc/dhclient-enter-hooks $(LETCDIR)/
ln -s /etc/dhclient-exit-hooks $(LETCDIR)/
$(INSTALL) -m 644 $(SRCDIR)/frisbee/rc.conf $(SYSETCDIR)/rc.conf
$(INSTALL) -m 644 $(SRCDIR)/frisbee/rc.local $(SYSETCDIR)/rc.local
$(INSTALL) -m 755 $(SRCDIR)/dhclient-exit-hooks \
$(SYSETCDIR)/dhclient-exit-hooks
@if [ -r $(SRCDIR)/master.passwd ]; then \
$(INSTALL) -m 600 $(SRCDIR)/master.passwd $(SYSETCDIR); \
pwd_mkdb -d $(SYSETCDIR) $(SYSETCDIR)/master.passwd; \
......@@ -178,6 +182,8 @@ mfs-install:
rm -f $(LETCDIR)/dhclient*
ln -s /etc/dhclient-enter-hooks $(LETCDIR)/
ln -s /etc/dhclient-exit-hooks $(LETCDIR)/
$(INSTALL) -m 755 $(SRCDIR)/dhclient-exit-hooks \
$(SYSETCDIR)/dhclient-exit-hooks
@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"
ip6addrctl_enable="NO"
newsyslog_enable="NO"
ldconfig_paths=""
ldconfig_paths_aout=""
blanktime="NO"
update_motd="NO"
background_fsck="NO"
rc_info="YES"
# Turn on for debugging
syslogd_enable="NO"
# Specific to frisbee MFS
cron_enable="NO"
devd_enable="NO"
sshd_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"
#!/bin/sh
if [ -r /etc/emulab/paths.sh ]; then
. /etc/emulab/paths.sh
else
BINDIR=/etc/testbed
BOOTDIR=/etc/testbed
ETCDIR=/etc/testbed
fi
#
# Note: we try to feed the output of rc.frisbee back to boss via tmcc.
# But we only do this if frisbee fails since we don't get back here on
# success (rc.frisbee waits to be rebooted).
#
stat=0
if [ -x "$BINDIR/rc.frisbee" ]; then
echo "Playing Frisbee ..."
if [ -x /usr/bin/tee ]; then
($BINDIR/rc.frisbee || echo $? >/tmp/stat) 2>&1 | tee /tmp/frisbee.log
stat=$?
if [ -e /tmp/stat ]; then
stat=`cat /tmp/stat`
fi
else
$BINDIR/rc.frisbee
stat=$?
fi
if [ $stat -ne 0 ]; then
if [ -x "$BINDIR/tmcc" -a -e /tmp/frisbee.log ]; then
$BINDIR/tmcc -f /tmp/frisbee.log bootlog
fi
echo "rc.frisbee failed ($stat)"
fi
else
echo "$BINDIR/rc.frisbee does not exist!"
stat=1
fi
exit $stat
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