Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
ca2a8602
Commit
ca2a8602
authored
May 23, 2013
by
Mike Hibler
Browse files
Updates for FreeBSD 10 client.
Not sure how I got on this side track, but it is done.
parent
f1f5e0f7
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
clientside/configure
View file @
ca2a8602
...
...
@@ -4935,6 +4935,7 @@ outfiles="Makeconf GNUmakefile setversion \
tmcc/freebsd/init/7/GNUmakefile
\
tmcc/freebsd/init/8/GNUmakefile
\
tmcc/freebsd/init/9/GNUmakefile
\
tmcc/freebsd/init/10/GNUmakefile
\
tmcc/freebsd/supfile tmcc/freebsd/sethostname
\
tmcc/linux/GNUmakefile tmcc/linux/supfile
\
tmcc/linux/sethostname.dhclient
\
...
...
clientside/configure.in
View file @
ca2a8602
#
# Copyright (c) 2000-201
2
University of Utah and the Flux Group.
# Copyright (c) 2000-201
3
University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
...
...
@@ -260,6 +260,7 @@ outfiles="Makeconf GNUmakefile setversion \
tmcc/freebsd/init/7/GNUmakefile \
tmcc/freebsd/init/8/GNUmakefile \
tmcc/freebsd/init/9/GNUmakefile \
tmcc/freebsd/init/10/GNUmakefile \
tmcc/freebsd/supfile tmcc/freebsd/sethostname \
tmcc/linux/GNUmakefile tmcc/linux/supfile \
tmcc/linux/sethostname.dhclient \
...
...
clientside/tmcc/freebsd/init/10/GNUmakefile.in
0 → 100644
View file @
ca2a8602
#
# Insert Copyright Here.
#
SRCDIR = @srcdir@
TESTBED_SRCDIR = @top_srcdir@
OBJDIR = @top_builddir@
SUBDIR = $(subst $(TESTBED_SRCDIR)/,,$(SRCDIR))
include $(OBJDIR)/Makeconf
all:
client: init
include $(TESTBED_SRCDIR)/GNUmakerules
CFLAGS += -DDEBUGSHELL -DSECURE -DLOGIN_CAP -DCOMPAT_SYSV_INIT -DTESTBED
init: init.c pathnames.h
$(CC) $(CFLAGS) -static -o init $< -lutil -lcrypt
install:
client-install: client
install -s -o root -g wheel -m 555 -b -B.bak -fschg -S init $(DESTDIR)/sbin/init
clean:
rm -f *.o core init
clientside/tmcc/freebsd/init/10/init.c
0 → 100644
View file @
ca2a8602
This diff is collapsed.
Click to expand it.
clientside/tmcc/freebsd/init/10/pathnames.h
0 → 100644
View file @
ca2a8602
/*-
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Donn Seeley at Berkeley Software Design, Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)pathnames.h 8.1 (Berkeley) 6/5/93
* $FreeBSD: head/sbin/init/pathnames.h 232977 2012-03-14 16:22:09Z ed $
*/
#include
<paths.h>
#define _PATH_INITLOG "/var/log/init.log"
#define _PATH_SLOGGER "/sbin/session_logger"
#define _PATH_RUNCOM "/etc/rc"
#define _PATH_RUNDOWN "/etc/rc.shutdown"
clientside/tmcc/freebsd/init/GNUmakefile.in
View file @
ca2a8602
#
# Copyright (c) 2006-201
1
University of Utah and the Flux Group.
# Copyright (c) 2006-201
3
University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
...
...
@@ -28,7 +28,7 @@ SUBDIR = $(subst $(TESTBED_SRCDIR)/,,$(SRCDIR))
include $(OBJDIR)/Makeconf
# To decide what directory
FBSDVERSION := $(shell uname -v | sed -e 's/FreeBSD \([0-9]\).*/FreeBSD\1/')
FBSDVERSION := $(shell uname -v | sed -e 's/FreeBSD \([0-9]
[0-9]*
\).*/FreeBSD\1/')
ifeq ($(FBSDVERSION),FreeBSD4)
FSUBDIR = 4
...
...
@@ -48,6 +48,9 @@ endif
ifeq ($(FBSDVERSION),FreeBSD9)
FSUBDIR = 9
endif
ifeq ($(FBSDVERSION),FreeBSD10)
FSUBDIR = 10
endif
SUBDIRS = $(FSUBDIR)
all:
...
...
clientside/tmcc/freebsd10/GNUmakefile.in
View file @
ca2a8602
#
# Copyright (c) 2000-201
2
University of Utah and the Flux Group.
# Copyright (c) 2000-201
3
University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
...
...
@@ -135,6 +135,8 @@ sysetc-install: dir-install netif-emulab tweak-syslog
$(INSTALL) -m 555 ./netif-emulab $(SYSETCDIR)/rc.d/netif-emulab
rm -f $(SYSETCDIR)/rc.early
$(INSTALL) -m 644 $(SRCDIR)/loader.conf $(DESTDIR)/boot/loader.conf
$(INSTALL) -m 755 $(SRCDIR)/dhclient-exit-hooks \
$(SYSETCDIR)/dhclient-exit-hooks
script-install: dir-install
$(INSTALL) -m 755 $(SRCDIR)/rc.freebsd $(BINDIR)/rc
...
...
clientside/tmcc/freebsd10/dhclient-exit-hooks
0 → 100644
View file @
ca2a8602
#!/bin/sh
#
# 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/>.
#
# }}}
#
.
/etc/emulab/paths.sh
echo
"
`
date
`
:
${
interface
}
:
${
reason
}
"
>>
$LOGDIR
/dhclient-exit.log 2>&1
if
[
x
$reason
!=
xREBOOT
-a
x
$reason
!=
xBOUND
-a
x
$reason
!=
xRENEW
-a
x
$reason
!=
xREBIND
]
then
exit
0
fi
date
>
$LOGDIR
/dhclient.log 2>&1
#
# ElabinElab support (inner boss and ops)
#
if
[
-e
"
$ETCDIR
/outer_bossnode"
]
;
then
#
# Inner boss or ops. The outer network has now been configured.
# Call rc.inelab to get the inner control network configured (we
# have to ask outer boss in the usual manner).
#
$BINDIR
/rc/rc.inelab
>>
$LOGDIR
/dhclient.log 2>&1
# Then kill as we normally do.
killall dhclient
>>
$LOGDIR
/dhclient.log 2>&1
exit
0
fi
#
# ElabinElab support
#
# The enter-hooks script should weed out outer boss calls, so there
# should be nothing to do here. However, just in case we smack em down
# again here.
#
if
[
x
"
$new_domain_name_servers
"
=
"x1.1.1.1"
]
;
then
exit_status
=
1
exit
1
fi
#
# Remember our server IP, real hostname, router IP, etc.
#
echo
$new_dhcp_server_identifier
>
$BOOTDIR
/bossip
echo
$new_host_name
>
$BOOTDIR
/realname
echo
$new_routers
>
$BOOTDIR
/routerip
echo
$new_ip_address
>
$BOOTDIR
/myip
echo
$new_subnet_mask
>
$BOOTDIR
/mynetmask
echo
$new_domain_name
>
$BOOTDIR
/mydomain
if
[
-n
"
$interface
"
]
;
then
echo
$interface
>
$BOOTDIR
/controlif
fi
#
# For Xen-based vnodes we record the vnode name where the scripts expect it.
# XXX this works because only Xen-based vnodes DHCP.
#
case
"
$new_host_name
"
in
pcvm
*
)
echo
$new_host_name
>
$BOOTDIR
/vmname
;;
esac
#
# If this is a newnode boot, boss (inner or outer) will have returned with
# no hostname. We don't need to record anything in this case, so skip it.
#
if
[
x
"
$new_host_name
"
=
x
]
;
then
exit
0
fi
#
# Since we have our IP address, let's kill off all dhclient instances
# so they don't interfere and shutdown all the other interfaces dhclient
# was working on.
#
# I'd love to use the dhclient.pid file, but it helpfully has not been
# created at this point
#
killall dhclient
>>
$LOGDIR
/dhclient.log 2>&1
for
_if
in
`
ifconfig
-lu
`
do
if
[
$_if
!=
"lo0"
-a
x
$_if
!=
x
$interface
]
then
echo
"taking
$_if
down"
ifconfig
$_if
down remove
fi
>>
$LOGDIR
/dhclient.log 2>&1
done
#
# XXX compenstate for a stupid long time bug in the dhclient-script
#
curhname
=
`
hostname
`
if
[
$reason
=
BOUND
-a
-z
"
$curhname
"
-a
-n
"
$new_host_name
"
]
;
then
echo
"
`
date
`
: hostname is
$new_host_name
"
>>
$LOGDIR
/dhclient-exit.log 2>&1
hostname
$new_host_name
fi
#
# XXX hmm...in FreeBSD 10, the first interface we probe will cause the
# default route to get set to that interface. This will cause any subsequent
# attempt to set the default route to fail and we may wind up without a
# valid default route at this point. So we double check here to make sure
# the default route is correct.
#
if
[
-n
"
$new_routers
"
]
;
then
gw
=
`
route
-n
get
-inet
default |
grep
gateway
`
gw
=
${
gw
##*
:
}
if
[
-z
"
$gw
"
-o
"
$gw
"
!=
"
$new_routers
"
]
;
then
echo
"reset default route from
\"
$gw
\"
to
\"
$new_routers
\"
"
route delete default
route add default
$new_routers
fi
>>
$LOGDIR
/dhclient-exit.log 2>&1
fi
#
# See if the Testbed configuration software wants to change the hostname.
# Installed into /etc. Note: frisbee MFS doesn't have perl and hence
# doesn't have this script.
#
if
[
-x
$BINDIR
/sethostname
]
then
$BINDIR
/sethostname
$new_domain_name
>>
$LOGDIR
/dhclient.log 2>&1
fi
echo
"
`
date
`
:
${
interface
}
:
${
reason
}
: done"
>>
$LOGDIR
/dhclient-exit.log 2>&1
exit
0
clientside/tmcc/freebsd10/group
View file @
ca2a8602
# $FreeBSD:
src
/etc/group
,v 1.36 2011/01/28 22:28:12 pjd Exp
$
# $FreeBSD:
head
/etc/group
241823 2012-10-22 01:18:41Z marcel
$
#
wheel:*:0:root,toor
daemon:*:1:
...
...
@@ -16,6 +16,7 @@ staff:*:20:root,toor
sshd:*:22:
smmsp:*:25:
mailnull:*:26:
_atf:*:27:
guest:*:31:root,toor
bind:*:53:
proxy:*:62:
...
...
clientside/tmcc/freebsd10/master.passwd
View file @
ca2a8602
# $FreeBSD:
src
/etc/master.passwd
,v 1.42 2011/01/28 22:29:38 pjd Exp
$
# $FreeBSD:
head
/etc/master.passwd
243752 2012-12-01 15:11:46Z rwatson
$
#
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
...
...
@@ -13,12 +13,15 @@ man:*:9:9::0:0:Mister Man Pages:/usr/share/man:/usr/sbin/nologin
sshd:*:22:22::0:0:Secure Shell Daemon:/var/empty:/usr/sbin/nologin
smmsp:*:25:25::0:0:Sendmail Submission User:/var/spool/clientmqueue:/usr/sbin/nologin
mailnull:*:26:26::0:0:Sendmail Default User:/var/spool/mqueue:/usr/sbin/nologin
# Emulab: _atf changed to 28, 27 is mike and he ain't budgin'
_atf:*:28:27::0:0:& pseudo-user:/nonexistent:/usr/sbin/nologin
bind:*:53:53::0:0:Bind Sandbox:/:/usr/sbin/nologin
proxy:*:62:62::0:0:Packet Filter pseudo-user:/nonexistent:/usr/sbin/nologin
_pflogd:*:64:64::0:0:pflogd privsep user:/var/empty:/usr/sbin/nologin
_dhcp:*:65:65::0:0:dhcp programs:/var/empty:/usr/sbin/nologin
uucp:*:66:66::0:0:UUCP pseudo-user:/var/spool/uucppublic:/usr/local/libexec/uucp/uucico
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
...
...
configure
View file @
ca2a8602
...
...
@@ -7668,6 +7668,7 @@ outfiles="$outfiles clientside/GNUmakefile clientside/setversion \
clientside/tmcc/freebsd/init/7/GNUmakefile
\
clientside/tmcc/freebsd/init/8/GNUmakefile
\
clientside/tmcc/freebsd/init/9/GNUmakefile
\
clientside/tmcc/freebsd/init/10/GNUmakefile
\
clientside/tmcc/freebsd/supfile clientside/tmcc/freebsd/sethostname
\
clientside/tmcc/linux/GNUmakefile clientside/tmcc/linux/supfile
\
clientside/tmcc/linux/sethostname.dhclient
\
...
...
configure.in
View file @
ca2a8602
...
...
@@ -1283,6 +1283,7 @@ outfiles="$outfiles clientside/GNUmakefile clientside/setversion \
clientside/tmcc/freebsd/init/7/GNUmakefile \
clientside/tmcc/freebsd/init/8/GNUmakefile \
clientside/tmcc/freebsd/init/9/GNUmakefile \
clientside/tmcc/freebsd/init/10/GNUmakefile \
clientside/tmcc/freebsd/supfile clientside/tmcc/freebsd/sethostname \
clientside/tmcc/linux/GNUmakefile clientside/tmcc/linux/supfile \
clientside/tmcc/linux/sethostname.dhclient \
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment