Commit 06b6ed86 authored by Mike Hibler's avatar Mike Hibler

Version of init for FreeBSD 7.

Also, sync 6 version with latest source.
parent 72ea915f
#!/usr/bin/perl -w
#
# EMULAB-COPYRIGHT
# Copyright (c) 2004, 2005, 2006 University of Utah and the Flux Group.
# Copyright (c) 2004, 2005, 2006, 2007 University of Utah and the Flux Group.
# All rights reserved.
#
# XXX I hardwire IPs into generated /etc/rc.conf and /etc/rc.resolv.
......@@ -223,7 +223,7 @@ sub doboot()
$emulabconfig{"JAILIPBASE"} = "172.16.0.0";
$emulabconfig{"JAILIPMASK"} = "255.240.0.0";
$emulabconfig{"MFSTARBALL"} = "tftpboot-elabinelab.tar.gz";
$emulabconfig{"MFSVERSION"} = "53";
$emulabconfig{"MFSVERSION"} = "62";
$emulabconfig{"MFSCONSOLE"} = "sio";
$emulabconfig{"WINSUPPORT"} = 0;
$emulabconfig{"NOSETUP"} = 0;
......@@ -303,7 +303,7 @@ sub doboot()
$emulabconfig{OPS_PKG} = "emulab-ops-2.0";
$emulabconfig{BOSS_PKG} = "emulab-boss-2.0";
}
elsif ($FBSD_VERSION == 6.1) {
elsif ($FBSD_VERSION == 6.1 || $FBSD_VERSION == 6.2) {
$emulabconfig{FS_PKG_DIR} = "/share/freebsd/6.1/packages";
$emulabconfig{OPS_PKG_DIR} = "/share/freebsd/6.1/packages";
$emulabconfig{BOSS_PKG_DIR} = "/share/freebsd/6.1/packages";
......@@ -1338,10 +1338,10 @@ sub SetupBossNode()
# XXX frisbee-53 appears in the os_info table for some images still
# XXX note: must copy, symlink won't work
mysystem("cd /tftpboot; cp -rp frisbee frisbee-53")
if ($fv eq "53");
if ($fv ne "47");
#
# Have recently added a 5.3 based newnode MFS
# Have recently added a 6.2 based newnode MFS
#
if (! -e "/tftpboot/freebsd.newnode") {
$fv = $emulabconfig{"MFSVERSION"};
......
......@@ -41,7 +41,7 @@ static const char copyright[] =
static char sccsid[] = "@(#)init.c 8.1 (Berkeley) 7/15/93";
#endif
static const char rcsid[] =
"$FreeBSD: src/sbin/init/init.c,v 1.60.2.1 2005/10/04 17:28:59 rse Exp $";
"$FreeBSD: src/sbin/init/init.c,v 1.60.2.2 2006/07/08 15:34:27 kib Exp $";
#endif /* not lint */
#include <sys/param.h>
......@@ -652,6 +652,7 @@ single_user(void)
*/
skip:
#endif
#ifdef SECURE
/*
* Check the root password.
......@@ -1123,6 +1124,7 @@ start_window_system(session_t *sp)
pid_t pid;
sigset_t mask;
char term[64], *env[2];
int status;
if ((pid = fork()) == -1) {
emergency("can't fork for window system on port %s: %m",
......@@ -1130,9 +1132,20 @@ start_window_system(session_t *sp)
/* hope that getty fails and we can try again */
return;
}
if (pid)
{
waitpid(-1, &status, 0);
return;
}
/* reparent window process to the init to not make a zombie on exit */
if ((pid = fork()) == -1) {
emergency("can't fork for window system on port %s: %m",
sp->se_device);
_exit(1);
}
if (pid)
_exit(0);
sigemptyset(&mask);
sigprocmask(SIG_SETMASK, &mask, (sigset_t *) 0);
......
#
# Insert Copyright Here.
#
SRCDIR = @srcdir@
TESTBED_SRCDIR = @top_srcdir@
EVENTSYS = @EVENTSYS@
OBJDIR = ../../../..
SUBDIR = tmcd/freebsd/init/7
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 500 -fschg -b -B.bak init $(DESTDIR)/sbin/init
clean:
rm -f *.o core init
This diff is collapsed.
/*-
* 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: src/sbin/init/pathnames.h,v 1.3 2004/04/09 19:58:30 markm Exp $
*/
#include <paths.h>
#define _PATH_SLOGGER "/sbin/session_logger"
#define _PATH_RUNCOM "/etc/rc"
#define _PATH_RUNDOWN "/etc/rc.shutdown"
#
# EMULAB-COPYRIGHT
# Copyright (c) 2006 University of Utah and the Flux Group.
# Copyright (c) 2006, 2007 University of Utah and the Flux Group.
# All rights reserved.
#
SRCDIR = @srcdir@
......@@ -22,6 +22,9 @@ endif
ifeq ($(FBSDVERSION),FreeBSD6)
FSUBDIR = 6
endif
ifeq ($(FBSDVERSION),FreeBSD7)
FSUBDIR = 7
endif
SUBDIRS = $(FSUBDIR)
all:
......
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