Commit 675a2b14 authored by Mike Hibler's avatar Mike Hibler

Add client-side directory for fedora. We have been using the RHL7 directory

(linux), which is probably ok, but not optimal.
parent 2da4652d
......@@ -2491,6 +2491,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
tmcd/linux/GNUmakefile tmcd/linux/supfile \
tmcd/linux/sethostname.dhclient \
tmcd/linux9/GNUmakefile tmcd/linux9/supfile \
tmcd/fedora/GNUmakefile tmcd/fedora/supfile \
tmcd/linux-sg/GNUmakefile \
tmcd/freebsd5/GNUmakefile tmcd/freebsd5/supfile \
tmcd/freebsd6/GNUmakefile tmcd/freebsd6/supfile tmcd/freebsd6/netif-emulab \
......
......@@ -872,6 +872,7 @@ outfiles="$outfiles Makeconf GNUmakefile \
tmcd/linux/GNUmakefile tmcd/linux/supfile \
tmcd/linux/sethostname.dhclient \
tmcd/linux9/GNUmakefile tmcd/linux9/supfile \
tmcd/fedora/GNUmakefile tmcd/fedora/supfile \
tmcd/linux-sg/GNUmakefile \
tmcd/freebsd5/GNUmakefile tmcd/freebsd5/supfile \
tmcd/freebsd6/GNUmakefile tmcd/freebsd6/supfile tmcd/freebsd6/netif-emulab \
......
......@@ -41,6 +41,9 @@ SSLOBJ = ssl.o
ifeq ($(SYSTEM),Linux)
RHLVERSION := $(shell cat /etc/redhat-release | sed -e 's/Red Hat Linux release \([0-9]\).*/Linux\1/')
ifeq ($(RHLVERSION),)
RHLVERSION := $(shell cat /etc/redhat-release | sed -e 's/Fedora Core release \([0-9]\).*/Fedora\1/')
endif
ifeq ($(NOSTATIC),)
NEEDKERB := $(shell nm /usr/lib/libssl.a | grep -q krb; echo $$?)
else
......@@ -51,12 +54,16 @@ ifeq ($(NEEDKERB),0)
TMLIBS += `/usr/kerberos/bin/krb5-config --libs krb5`
endif
TMLIBS += -ldl
ifeq ($(findstring Fedora,$(RHLVERSION)),Fedora)
MDSUBDIR = fedora
else
ifeq ($(RHLVERSION),Linux9)
MDSUBDIR = linux9
else
MDSUBDIR = linux
endif
endif
endif
ifeq ($(SYSTEM),FreeBSD)
FBSDVERSION := $(shell uname -v | sed -e 's/FreeBSD \([0-9]\).*/freebsd\1/')
......
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2005 University of Utah and the Flux Group.
# All rights reserved.
#
#
# XXX ONLY RUN THIS INSTALL ON A LINUX TESTBED NODE!
#
# Trivial. These things just need to be installed into the right place
# on a testbed node before cutting an image.
#
#
SRCDIR = @srcdir@
TESTBED_SRCDIR = @top_srcdir@
OBJDIR = ../..
SUBDIR = tmcd/fedora
include $(OBJDIR)/Makeconf
SCRIPTS =
MYINSTALL = $(SRCDIR)/myinstall
#
# Force dependencies on the scripts so that they will be rerun through
# configure if the .in file is changed.
#
all: supfile ifcfgs
include $(TESTBED_SRCDIR)/GNUmakerules
SYSETCDIR = $(DESTDIR)/etc
ETCDIR = $(DESTDIR)$(CLIENT_ETCDIR)
BINDIR = $(DESTDIR)$(CLIENT_BINDIR)
VARDIR = $(DESTDIR)$(CLIENT_VARDIR)
RCDIR = $(SYSETCDIR)/rc.d
INSTALL = /usr/bin/install -c
COMMON = $(SRCDIR)/../common
install client-install: baselinux-install common-install etc-install \
sup-install script-install bin-install
@echo "Remember to install the PEM files if necessary"
simple-install: common-install script-install bin-install
dir-install:
baselinux-install: dir-install
(cd ../linux; $(MAKE) DESTDIR=$(DESTDIR) client-install)
common-install: dir-install
@echo "no fedora-specific common files"
sup-install: dir-install supfile
$(INSTALL) -m 755 ./supfile $(ETCDIR)/supfile
@echo "fedora-specific sup-install done"
bin-install: dir-install
@echo "no fedora-specific bin files"
etc-install: dir-install sysetc-remove sysetc-install
@echo "fedora-specific etc-install done"
sysetc-install: ifcfgs dir-install
$(INSTALL) -m 644 $(SRCDIR)/ntp.conf $(SYSETCDIR)/ntp.conf
$(INSTALL) -m 644 $(SRCDIR)/ifcfg-eth99 $(SYSETCDIR)/sysconfig/network-scripts
$(INSTALL) -m 644 ifcfg-eth[0-9]* $(SYSETCDIR)/sysconfig/network-scripts
sysetc-remove:
rm -rf $(SYSETCDIR)/modules.conf $(SYSETCDIR)/ntp.conf $(SYSETCDIR)/cron.pend
# stuff we don't really need to do all the time and may not even be correct
# or sufficient for all FCs
sysetc-onceonly-install:
@$(MYINSTALL) $(SRCDIR)/emulab-ld.so.conf $(SYSETCDIR)/ld.so.conf.d/emulab.conf
@$(MYINSTALL) $(SRCDIR)/inittab $(SYSETCDIR)/inittab
@$(MYINSTALL) $(SRCDIR)/login.defs $(SYSETCDIR)/login.defs
@$(MYINSTALL) $(SRCDIR)/modprobe.conf $(SYSETCDIR)/modprobe.conf
@$(MYINSTALL) -m 600 $(SRCDIR)/securetty $(SYSETCDIR)/securetty
@$(MYINSTALL) -m 440 $(SRCDIR)/sudoers $(SYSETCDIR)/sudoers
@$(MYINSTALL) $(SRCDIR)/syslog.conf $(SYSETCDIR)/syslog.conf
script-install: dir-install $(SCRIPTS)
@echo "fedora-specific script-install done"
sfs-install:
@echo "no fedora-specific sfs files"
# create ifcfg-eth? files
ifcfgs: $(SRCDIR)/mkifcfgs $(SRCDIR)/ifcfg.template
$(SRCDIR)/mkifcfgs $(SRCDIR)/ifcfg.template
clean:
rm -f ifcfg-eth? supfile
#/bin/sh -
#
# EMULAB-COPYRIGHT
# Copyright (c) 2004, 2005 University of Utah and the Flux Group.
# All rights reserved.
#
#
# HACK: run dhclient on all interfaces, and do nothing else
#
# Note that this file's name (eth99) cannot overlap with an actual
# existing interface or dhclient will loop. dhclient-script invokes
# the source-config function which sources the ifcfg-ethN file. Thus
# if this script were called "ifcfg-eth0" and eth0 was the DHCPable
# interface, we would wind up recursively invoking dhclient (trust me,
# I tried it :-)
#
. /etc/emulab/paths.sh
DEVICE="eth99"
IFACETYPES="3c59x e100 e1000 tulip"
#
# First, probe for all our supported ethernet types
#
modprobe -qa $IFACETYPES
#
# If dhclient returns success, then it has configured the first interface
# and gone into background mode. At that point we don't care about it any
# more and just kill it. We also shutdown all the other interfaces (which
# dhclient will leave "up") and set ONBOOT=no to prevent ifup (our caller)
# from doing any further configuration on this fake interface.
#
if [ -x /sbin/dhclient ] && /sbin/dhclient -q ; then
killall dhclient
if [ -e $BOOTDIR/controlif ]; then
interface=`cat $BOOTDIR/controlif`
for _if in `ifconfig -s | awk '{ print $1 }' | grep -v Iface`
do
if [ $_if != "lo" -a x$_if != x$interface ]
then
echo "taking $_if down"
ifconfig $_if down
fi >>$LOGDIR/dhclient.log 2>&1
done
#
# Now probe for wifi interfaces. We don't want to
# do this before dhcp'ing on the wired interfaces since
# there is a possibility that the wifi interface will
# grab an address and become the control net!
#
# This expects to load the madwifi-ng driver; the param states
# that no "virtual AP" device is to be created on module load.
# This is deferred until Emulab interface configuration time.
#
modprobe -q ath_pci autocreate=none
fi
ONBOOT="no"
else
# eat flaming death
exit 1
fi
IPADDR=""
NETMASK=""
IPXNETNUM_802_2=""
IPXPRIMARY_802_2="no"
IPXACTIVE_802_2="no"
IPXNETNUM_802_3=""
IPXPRIMARY_802_3="no"
IPXACTIVE_802_3="no"
IPXNETNUM_ETHERII=""
IPXPRIMARY_ETHERII="no"
IPXACTIVE_ETHERII="no"
IPXNETNUM_SNAP=""
IPXPRIMARY_SNAP="no"
IPXACTIVE_SNAP="no"
#
# inittab This file describes how the INIT process should set up
# the system in a certain run-level.
#
# Author: Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
# Modified for RHS Linux by Marc Ewing and Donnie Barnes
#
# Default runlevel. The runlevels used by RHS are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
#
id:3:initdefault:
# System initialization.
si::sysinit:/etc/rc.d/rc.sysinit
l0:0:wait:/etc/rc.d/rc 0
l1:1:wait:/etc/rc.d/rc 1
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6
# Trap CTRL-ALT-DELETE
ca::ctrlaltdel:/sbin/shutdown -t3 -r now
# When our UPS tells us power has failed, assume we have a few minutes
# of power left. Schedule a shutdown for 2 minutes from now.
# This does, of course, assume you have powerd installed and your
# UPS connected and working correctly.
pf::powerfail:/sbin/shutdown -f -h +2 "Power Failure; System Shutting Down"
# If power was restored before the shutdown kicked in, cancel it.
pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled"
# Run gettys in standard runlevels
#co:2345:respawn:/sbin/agetty ttyS0 115200 vt100-nav
1:2345:respawn:/sbin/mingetty tty1
#2:2345:respawn:/sbin/mingetty tty2
#3:2345:respawn:/sbin/mingetty tty3
#4:2345:respawn:/sbin/mingetty tty4
#5:2345:respawn:/sbin/mingetty tty5
#6:2345:respawn:/sbin/mingetty tty6
S0:2345:respawn:/sbin/agetty -L 115200 ttyS0 vt100
# Run xdm in runlevel 5
x:5:once:/etc/X11/prefdm -nodaemon
# *REQUIRED*
# Directory where mailboxes reside, _or_ name of file, relative to the
# home directory. If you _do_ define both, MAIL_DIR takes precedence.
# QMAIL_DIR is for Qmail
#
#QMAIL_DIR Maildir
MAIL_DIR /var/spool/mail
#MAIL_FILE .mail
# Password aging controls:
#
# PASS_MAX_DAYS Maximum number of days a password may be used.
# PASS_MIN_DAYS Minimum number of days allowed between password changes.
# PASS_MIN_LEN Minimum acceptable password length.
# PASS_WARN_AGE Number of days warning given before a password expires.
#
PASS_MAX_DAYS 99999
PASS_MIN_DAYS 0
PASS_MIN_LEN 5
PASS_WARN_AGE 7
#
# Min/max values for automatic uid selection in useradd
#
UID_MIN 500
UID_MAX 60000
#
# Min/max values for automatic gid selection in groupadd
#
GID_MIN 500
GID_MAX 60000
#
# If defined, this command is run when removing a user.
# It should remove any at/cron/print jobs etc. owned by
# the user to be removed (passed as the first argument).
#
#USERDEL_CMD /usr/sbin/userdel_local
#
# If useradd should create home directories for users by default
# On RH systems, we do. This option is overridden with the -m flag on
# useradd command line.
#
CREATE_HOME yes
# The permission mask is initialized to this value. If not specified,
# the permission mask will be initialized to 022.
UMASK 077
# This enables userdel to remove user groups if no members exist.
#
USERGROUPS_ENAB yes
# Use MD5 or DES to encrypt password? Red Hat use MD5 by default.
MD5_CRYPT_ENAB yes
#!/bin/sh
#
# EMULAB-COPYRIGHT
# Copyright (c) 2004 University of Utah and the Flux Group.
# All rights reserved.
#
#
# Create some ifcfg-eth files based on a template
#
if [ $# != 1 ]; then
echo "usage: $0 template-file"
exit 1
fi
for netif in 0 1 2 3 4 5 6 7 8 9; do
cat > ifcfg-eth${netif} <<FOO
#
# Auto-generated by $0.
# You know the drill: DO NOT EDIT, blah, blah, blah...
#
# ifcfg_eth99 is where the Emulab control net setup takes place,
# it invokes dhclient on all interfaces. However, dhclient-script
# expects to find an ifcfg_ethN file for each interface it wants to
# probe. So we put a stub here that does nothing (courtesy of ONBOOT=no).
#
DEVICE="eth${netif}"
ONBOOT="no"
FOO
cat $1 >> ifcfg-eth${netif}
done
alias eth0 e1000
alias eth1 e1000
alias eth2 e1000
alias eth3 e1000
alias eth4 e1000
alias eth5 e1000
alias scsi_hostadapter mptbase
alias scsi_hostadapter1 mptspi
alias char-major-10-200 tun
#!/bin/sh
if [ $# -lt 2 ]; then
echo "usage: myinstall [-m mode] src-file dst-file"
exit 1
fi
if [ $1 = "-m" ]; then
shift
MODE=$1
shift
else
MODE=644
fi
SRC=$1
DST=$2
if [ ! -e $SRC ]; then
echo "myinstall: no such file $SRC"
exit 1
fi
if [ -e $DST ]; then
if [ ! -f $SRC -o ! -f $DST ]; then
echo "myinstall: only works with regular files"
exit 1
fi
cmp -s $SRC $DST || {
install -m $MODE $SRC $DST
echo "$SRC installed $MODE as $DST"
}
else
if [ ! -f $SRC ]; then
echo "myinstall: only works with regular files"
exit 1
fi
install -m $MODE $SRC $DST
echo "$SRC installed $MODE as $DST"
fi
# Prohibit general access to this service.
restrict default noserve
restrict -6 default noserve
# Permit all access over the loopback interface. This could
# be tightened as well, but to do so would effect some of
# the administrative functions.
restrict 127.0.0.1
restrict -6 ::1
# -- CLIENT NETWORK -------
# Permit systems on this network to synchronize with this
# time service. Do not permit those systems to modify the
# configuration of this service. Also, do not use those
# systems as peers for synchronization.
# restrict 192.168.1.0 mask 255.255.255.0 notrust nomodify notrap
# --- OUR TIMESERVERS -----
# or remove the default restrict line
# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.
# restrict mytrustedtimeserverip mask 255.255.255.255 nomodify notrap noquery
# server mytrustedtimeserverip
# --- NTP MULTICASTCLIENT ---
#multicastclient # listen on default 224.0.1.1
# restrict 224.0.1.1 mask 255.255.255.255 notrust nomodify notrap
# restrict 192.168.1.0 mask 255.255.255.0 notrust nomodify notrap
# --- GENERAL CONFIGURATION ---
#
# Undisciplined Local Clock. This is a fake driver intended for backup
# and when no outside source of synchronized time is available. The
# default stratum is usually 3, but in this case we elect to use stratum
# 0. Since the server line does not have the prefer keyword, this driver
# is never used for synchronization, unless no other other
# synchronization source is available. In case the local host is
# controlled by some external source, such as an external oscillator or
# another protocol, the prefer keyword would cause the local host to
# disregard all other synchronization sources, unless the kernel
# modifications are in use and declare an unsynchronized condition.
#
#server 127.127.1.0 # local clock
#fudge 127.127.1.0 stratum 10
#
# Drift file. Put this in a directory which the daemon can write to.
# No symbolic links allowed, either, since the daemon updates the file
# by creating a temporary in the same directory and then rename()'ing
# it to the file.
#
driftfile /etc/ntp/drift
broadcastdelay 0.008
#
# Authentication delay. If you use, or plan to use someday, the
# authentication facility you should make the programs in the auth_stuff
# directory and figure out what this number should be on your machine.
#
#authenticate yes
#
# Keys file. If you want to diddle your server at run time, make a
# keys file (mode 600 for sure) and define the key number to be
# used for making requests.
#
# PLEASE DO NOT USE THE DEFAULT VALUES HERE. Pick your own, or remote
# systems might be able to reset your clock at will. Note also that
# ntpd is started with a -A flag, disabling authentication, that
# will have to be removed as well.
#
#keys /etc/ntp/keys
server ntp1.emulab.net
console
vc/1
vc/2
vc/3
vc/4
vc/5
vc/6
vc/7
vc/8
vc/9
vc/10
vc/11
tty1
tty2
tty3
tty4
tty5
tty6
tty7
tty8
tty9
tty10
tty11
ttyS0
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#
# Host alias specification
# User alias specification
# Cmnd alias specification
# Defaults specification
# User privilege specification
root ALL=(ALL) ALL
%root ALL=(ALL) NOPASSWD: ALL
#
# Bump as needed
#
FC-STD base=@CLIENT_VARDIR@ prefix=/ preserve release=20070419
# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.* /dev/console
# For the testbed. Log ssh logins to ops.
# Log errors to console.
# Log everything else to a file.
auth.info @users
local5.err /dev/console
local5.* /var/log/emulab.log
# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none;local5.none /var/log/messages
# The authpriv file has restricted access.
authpriv.* /var/log/secure
# Log all the mail messages in one place.
mail.* /var/log/maillog
# Log cron stuff
cron.* /var/log/cron
# Everybody gets emergency messages
*.emerg *
# Save news errors of level crit and higher in a special file.
uucp,news.crit /var/log/spooler
# Save boot messages also to boot.log
local7.* /var/log/boot.log
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