Commit ab08326a authored by Leigh B. Stoller's avatar Leigh B. Stoller

Checkpoint some changes for using tmcd to build accounts on ops.

Add new crontab file install to run a stub crontab inside jails;
basically, runs the atq and the newsyslog stuff. Other stuff is
turned off including periodic.
parent 204a181f
......@@ -40,6 +40,13 @@ mfs-install: common-install etc-install \
script-install bin-install
echo >$(ISMFS) "This file indicates its the MFS. DO NOT DELETE!"
control-install: dir-install
cp /dev/null $(ETCDIR)/isctrl
$(INSTALL) -m 755 ../tmcc $(BINDIR)/tmcc
$(INSTALL) -m 755 $(SRCDIR)/liblocsetup.pm $(BINDIR)/liblocsetup.pm
(cd ../common; $(MAKE) control-install)
@echo "Remember to install the PEM files if necessary"
lbs-install: simple-install
cp /dev/null $(BINDIR)/isrem
cp /dev/null $(ETCDIR)/isrem
......@@ -131,6 +138,7 @@ jail-install: dir-install
$(INSTALL) -m 755 $(SRCDIR)/jail/rc.conf $(JAILDIR)/rc.conf
$(INSTALL) -m 755 $(SRCDIR)/jail/rc.local $(JAILDIR)/rc.local
$(INSTALL) -m 755 $(SRCDIR)/jail/injail.pl $(JAILDIR)/injail.pl
$(INSTALL) -m 755 $(SRCDIR)/jail/crontab $(JAILDIR)/crontab
$(INSTALL) -m 755 $(SRCDIR)/jail/jaildog.pl $(BINDIR)/jaildog.pl
$(INSTALL) -m 755 $(SRCDIR)/jail/jailctl $(BINDIR)/jailctl
$(INSTALL) -m 755 $(SRCDIR)/jail/mkjail.pl $(BINDIR)/mkjail.pl
......
# /etc/crontab - root's crontab for FreeBSD
#
# $FreeBSD: src/etc/crontab,v 1.21.2.3 2000/12/08 10:56:07 obrien Exp $
#
SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
HOME=/var/log
#
#minute hour mday month wday who command
#
*/5 * * * * root /usr/libexec/atrun
#
# rotate log files every hour, if necessary
0 * * * * root newsyslog
......@@ -99,10 +99,10 @@ my $interactive = 0;
# This stuff is passed from tmcd, which we parse into a config string
# and an option set.
my %jailconfig = ();
my $jailoptions = " -o inaddrany -o routing -r -1";
my $jailoptions = "";
my $sshdport = 50000; # Bogus default, good for testing.
my $routetabid = 0; # Default to main routing table.
my $jailflags = 3;
my $jailflags = 0;
my @jailips = (); # List of jail IPs (for routing table).
my $ipfwrules = (); # List of IPFW rules to clean.
my $JAIL_DEVMEM = 0x01; # We need to know if these options given.
......@@ -391,6 +391,7 @@ sub mkrootfs($)
mysystem("cp -p $ETCJAIL/rc.conf $path/root/etc");
mysystem("rm -f $path/root/etc/rc.conf.local");
mysystem("cp -p $ETCJAIL/rc.local $path/root/etc");
mysystem("cp -p $ETCJAIL/crontab $path/root/etc");
mysystem("cp -p $ETCJAIL/group $path/root/etc");
mysystem("cp -p $ETCJAIL/master.passwd $path/root/etc");
mysystem("cp /dev/null $path/root/etc/fstab");
......@@ -744,6 +745,7 @@ sub setjailoptions() {
last SWITCH;
};
/^ROUTING$/ && do {
if (0) {
if ($val) {
$jailoptions .= " -o routing";
......@@ -759,6 +761,7 @@ sub setjailoptions() {
else {
$jailoptions .= " -o norouting";
}
}
last SWITCH;
};
/^DEVMEM$/ && do {
......
......@@ -7,7 +7,7 @@ syslogd_enable="YES"
syslogd_flags="-ss"
inetd_enable="NO"
sendmail_enable="NONE"
cron_enable="NO"
cron_enable="YES"
update_motd="NO"
root_rw_mount="NO"
local_startup=""
......
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