Commit 05c40b1d authored by Mike Hibler's avatar Mike Hibler

More changes for FreeBSD 10.x MFS.

parent 7ed1b040
......@@ -109,9 +109,10 @@ client-mkdirs:
-mkdir -p $(DESTDIR)$(CLIENT_MANDIR)
frisbee-mfs-mkdirs:
-mkdir -p $(DESTDIR)/etc/rc.d
-mkdir -p $(DESTDIR)/etc/emulab
-mkdir -p $(DESTDIR)/etc/testbed
-mkdir -p $(DESTDIR)/usr/local/etc/emulab
-mkdir -p $(DESTDIR)/usr/local/etc
freenas-os-check:
@if [ "$(SYSTEM)" != "FreeBSD" -o "$(ARCH)" != "amd64" -o \
......
......@@ -156,21 +156,24 @@ script-install: dir-install
$(INSTALL) -m 755 $(SRCDIR)/rc.freebsd $(BINDIR)/rc
#
# XXX we still do this like freebsd5!
# XXX we still do MFSes similar to freebsd5 but with some mods.
#
frisbee-mfs-install: destdircheck
(cd ../freebsd5; $(MAKE) all frisbee-mfs-install)
rm -f $(SYSETCDIR)/testbed/dhclient
rm -rf $(SYSETCDIR)/rc.conf.d
rm -f $(LETCDIR)/dhclient*
$(INSTALL) -m 755 $(SRCDIR)/dhclient-exit-hooks \
$(SYSETCDIR)/dhclient-exit-hooks
ln -s /etc/dhclient-enter-hooks $(LETCDIR)/
ln -s /etc/dhclient-exit-hooks $(LETCDIR)/
ln -s /etc/dhclient.conf $(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
rm -f $(SYSETCDIR)/rc.local
$(INSTALL) -m 555 $(SRCDIR)/frisbee/rc.frisbee $(SYSETCDIR)/rc.d/frisbee
@if [ -r $(SRCDIR)/master.passwd ]; then \
$(INSTALL) -m 600 $(SRCDIR)/master.passwd $(SYSETCDIR); \
pwd_mkdb -d $(SYSETCDIR) $(SYSETCDIR)/master.passwd; \
pwd_mkdb -p -d $(SYSETCDIR) $(SYSETCDIR)/master.passwd; \
fi
@if [ -r $(SRCDIR)/group ]; then \
$(INSTALL) -m 644 $(SRCDIR)/group $(SYSETCDIR); \
......@@ -179,14 +182,16 @@ frisbee-mfs-install: destdircheck
mfs-install:
(cd ../freebsd5; $(MAKE) all mfs-install)
rm -f $(SYSETCDIR)/testbed/dhclient
rm -rf $(SYSETCDIR)/rc.conf.d
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
ln -s /etc/dhclient-enter-hooks $(LETCDIR)/
ln -s /etc/dhclient-exit-hooks $(LETCDIR)/
ln -s /etc/dhclient.conf $(LETCDIR)/
@if [ -r $(SRCDIR)/master.passwd ]; then \
$(INSTALL) -m 600 $(SRCDIR)/master.passwd $(SYSETCDIR); \
pwd_mkdb -d $(SYSETCDIR) $(SYSETCDIR)/master.passwd; \
pwd_mkdb -p -d $(SYSETCDIR) $(SYSETCDIR)/master.passwd; \
fi
@if [ -r $(SRCDIR)/group ]; then \
$(INSTALL) -m 644 $(SRCDIR)/group $(SYSETCDIR); \
......
......@@ -8,15 +8,17 @@ ldconfig_paths_aout=""
blanktime="NO"
update_motd="NO"
background_fsck="NO"
sshd_enable="YES"
rc_info="YES"
# Turn on for debugging
syslogd_enable="NO"
# Specific to frisbee MFS
syslogd_enable="NO"
cron_enable="NO"
devd_enable="NO"
sshd_enable="YES"
## Uncomment for debugging
#syslogd_enable="YES"
#rc_debug="YES"
#
# FreeBSD has no way to say "DHCP on all available interfaces" without
......@@ -26,17 +28,3 @@ sshd_enable="YES"
# 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
#
# Copyright (c) 2000-2017 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 rc.d file to fire off frisbee in the disk loader MFS.
# This is one of the few active services in the frisbee MFS, but we want
# to make sure it starts after network configuration and after sshd
# (if sshd is present).
#
# PROVIDE: frisbee
# REQUIRE: NETWORKING sshd
# KEYWORD: nojail
. /etc/rc.subr
. /etc/network.subr
name="frisbee"
start_cmd="frisbee_start"
stop_cmd=":"
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).
#
frisbee_start()
{
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
}
load_rc_config $name
run_rc_command $*
#!/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
# $FreeBSD: releng/10.2/etc/master.passwd 256366 2013-10-12 06:08:18Z rpaulo $
#
root:$1$0DKicYf8$PsfF3uhmTrtuaJKH/rxtQ/:0:0::0:0:Charlie &:/root:/bin/csh
toor:$1$0DKicYf8$PsfF3uhmTrtuaJKH/rxtQ/:0:0::0:0:Chaplin &:/root:/bin/csh
root:*:0:0::0:0:Charlie &:/root:/bin/csh
toor:*:0:0::0:0:Chaplin &:/root:/bin/csh
daemon:*:1:1::0:0:Owner of many system processes:/root:/usr/sbin/nologin
operator:*:2:5::0:0:System &:/:/usr/sbin/nologin
bin:*:3:7::0:0:Binaries Commands and Source:/:/usr/sbin/nologin
......@@ -22,9 +22,9 @@ uucp:*:66:66::0:0:UUCP pseudo-user:/var/spool/uucppublic:/usr/local/libexec/uucp
pop:*:68:6::0:0:Post Office Owner:/nonexistent:/usr/sbin/nologin
auditdistd:*:78:77::0:0:Auditdistd unprivileged user:/var/empty:/usr/sbin/nologin
www:*:80:80::0:0:World Wide Web Owner:/nonexistent:/usr/sbin/nologin
hast:*:845:845::0:0:HAST unprivileged user:/var/empty:/usr/sbin/nologin
nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nologin
messagebus:*:556:556::0:0:D-BUS Daemon User:/nonexistent:/usr/sbin/nologin
polkit:*:562:562::0:0:PolicyKit Daemon User:/nonexistent:/usr/sbin/nologin
haldaemon:*:560:560::0:0:HAL Daemon User:/nonexistent:/usr/sbin/nologin
hast:*:845:845::0:0:HAST unprivileged user:/var/empty:/usr/sbin/nologin
git_daemon:*:964:964::0:0:git daemon:/nonexistent:/usr/sbin/nologin
nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nologin
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