jails

From: asfdqwer xzcvdsf <brueggma_at_yahoo.com>
Date: Fri, 3 Sep 2004 15:05:07 -0700 (PDT)
I'm pretty sure this used to work a few months ago,
has something changed?  A quick glance in UPDATING
dosen't return anything interesting..

athlon1# cat make-jail.sh
#!/bin/sh

if [ $# -ne 2 ]; then
   echo "We need a jail name and an IP."
   exit
fi

# For simplicity, don't create the filesystem
# mkdir -p /usr/jail/$1
# /usr/bin/nice -n 19 dd if=/dev/zero
of=/usr/jail/$1.dsk bs=1k count=5000k
# something=`mdconfig -a -t vnode -f /usr/jail/$1.dsk`
# disklabel -r -w ${something} auto
# newfs ${something}c
# fsck -p -y /dev/${something}c
# mount /dev/${something}c /usr/jail/$1
### echo "/dev/${something}     /usr/jail/$1    ufs   
 rw      0       0" >> /etc/fstab
### remove disk image
### mdconfig -d -u 4

cd /usr/src
/usr/bin/nice -n 19 make -j2 world
DESTDIR=/usr/jail/$1
cd etc
make distribution DESTDIR=/usr/jail/$1
mount_devfs devfs /usr/jail/$1/dev
cd /usr/jail/$1
ln -sf dev/null kernel

touch /usr/jail/$1/etc/fstab
echo 'network_interfaces=""' >>
/usr/jail/$1/etc/rc.conf
echo 'inetd_enable="YES"' >> /usr/jail/$1/etc/rc.conf
echo 'inetd_flags="-wW -C 5 -l -R 1024 -s 3"' >>
/usr/jail/$1/etc/rc.conf
echo 'ssh stream tcp nowait root /usr/sbin/sshd sshd
-i -4' >> /usr/jail/$1/etc/inetd.conf
echo 'telnet  stream  tcp     nowait  root   
/usr/libexec/telnetd    telnetd -a off -X sra -h' >>
/usr/jail/$1/etc/inetd.conf
echo 'syslogd_enable="NO"' >> /usr/jail/$1/etc/rc.conf
echo 'sendmail_enable="NONE"' >>
/usr/jail/$1/etc/rc.conf
egrep -v "127.0.0.1" /etc/resolv.conf >
/usr/jail/$1/etc/resolv.conf
cp /etc/localtime /usr/jail/$1/etc
cp /etc/motd /usr/jail/$1/etc
touch /usr/jail/$1/etc/COPYRIGHT
chroot /usr/jail/$1  /usr/bin/newaliases
chroot /usr/jail/$1  /usr/sbin/pw user mod -w yes -n
root
chroot /usr/jail/$1  /usr/sbin/pw user add -n user -g
wheel -w yes -m
chroot /usr/jail/$1  /etc/rc.d/sshd forcekeygen

jail /usr/jail/$1 $1 $2 /bin/sh /etc/rc
# jls
# jexec 1 kill -KILL -1
athlon1#

athlon1# ./make-jail.sh test.org 127.0.0.2
--------------------------------------------------------------
>>> make world started on Fri Sep  3 17:01:22 CDT 2004
--------------------------------------------------------------
--------------------------------------------------------------
>>> Rebuilding the temporary build tree
--------------------------------------------------------------
rm -rf /usr/obj/usr/src/i386
mkdir -p /usr/obj/usr/src/i386/legacy/usr/bin
mkdir -p /usr/obj/usr/src/i386/legacy/usr/games
mkdir -p
/usr/obj/usr/src/i386/legacy/usr/include/c++/3.3
mkdir -p /usr/obj/usr/src/i386/legacy/usr/include/sys
mkdir -p /usr/obj/usr/src/i386/legacy/usr/lib
mkdir -p /usr/obj/usr/src/i386/legacy/usr/libexec
mkdir -p /usr/obj/usr/src/i386/legacy/usr/sbin
mkdir -p /usr/obj/usr/src/i386/legacy/usr/share/dict
mkdir -p
/usr/obj/usr/src/i386/legacy/usr/share/groff_font/devX100
mkdir -p
/usr/obj/usr/src/i386/legacy/usr/share/groff_font/devX100-12
mkdir -p
/usr/obj/usr/src/i386/legacy/usr/share/groff_font/devX75
mkdir -p
/usr/obj/usr/src/i386/legacy/usr/share/groff_font/devX75-12
mkdir -p
/usr/obj/usr/src/i386/legacy/usr/share/groff_font/devascii
mkdir -p
/usr/obj/usr/src/i386/legacy/usr/share/groff_font/devcp1047
mkdir -p
/usr/obj/usr/src/i386/legacy/usr/share/groff_font/devdvi
mkdir -p
/usr/obj/usr/src/i386/legacy/usr/share/groff_font/devhtml
mkdir -p
/usr/obj/usr/src/i386/legacy/usr/share/groff_font/devkoi8-r
mkdir -p
/usr/obj/usr/src/i386/legacy/usr/share/groff_font/devlatin1
mkdir -p
/usr/obj/usr/src/i386/legacy/usr/share/groff_font/devlbp
mkdir -p
/usr/obj/usr/src/i386/legacy/usr/share/groff_font/devlj4
mkdir -p
/usr/obj/usr/src/i386/legacy/usr/share/groff_font/devps
mkdir -p
/usr/obj/usr/src/i386/legacy/usr/share/groff_font/devutf8
mkdir -p
/usr/obj/usr/src/i386/legacy/usr/share/tmac/mdoc
mkdir -p
/usr/obj/usr/src/i386/legacy/usr/share/tmac/mm
mkdir -p /usr/obj/usr/src/i386/lib
mkdir -p /usr/obj/usr/src/i386/usr/bin
mkdir -p /usr/obj/usr/src/i386/usr/include
mkdir -p /usr/obj/usr/src/i386/usr/lib/compat/aout
mkdir -p /usr/obj/usr/src/i386/usr/libdata/ldscripts
mkdir -p /usr/obj/usr/src/i386/usr/libexec
mkdir -p /usr/obj/usr/src/i386/usr/sbin
mkdir -p /usr/obj/usr/src/i386/usr/share/misc
mkdir -p /usr/obj/usr/src/i386/usr/share/snmp/defs
mkdir -p /usr/obj/usr/src/i386/usr/share/snmp/mibs
mtree -deU -f /usr/src/etc/mtree/BSD.include.dist  -p
/usr/obj/usr/src/i386/usr/include >/dev/null
ln -sf /usr/src/sys /usr/obj/usr/src/i386
--------------------------------------------------------------
>>> stage 1.1: legacy release compatibility shims
--------------------------------------------------------------
cd /usr/src; MAKEOBJDIRPREFIX=/usr/obj/usr/src/i386 
DESTDIR=  INSTALL="sh /usr/src/tools/install.sh" 
PATH=/usr/obj/usr/src/i386/legacy/usr/sbin:/usr/obj/usr/src/i386/legacy/usr/bin:/usr/obj/usr/src/i386/legacy/usr/games:/sbin:/bin:/usr/sbin:/usr/bin
 WORLDTMP=/usr/obj/usr/src/i386  MAKEFLAGS="-m
/usr/src/tools/build/mk  -j 2
DESTDIR=/usr/jail/test.org -m /usr/src/share/mk" make
-f Makefile.inc1  BOOTSTRAPPING=503000  -DNOHTML
-DNOINFO -DNOLINT -DNOMAN -DNOPIC -DNOPROFILE 
-DNOSHARED -DNO_CPU_CFLAGS -DNO_WARNS legacy
===> tools/build
/usr/obj/usr/src/i386/usr/src/tools/build created for
/usr/src/tools/build
cd /usr/src/tools/build; make buildincludes; make
installincludes
rm -f .depend
mkdep -f .depend -a   
-I/usr/obj/usr/src/i386/legacy/usr/include
/usr/src/tools/build/dummy.c
cc -O2 -pipe -funroll-loops -ffast-math 
-I/usr/obj/usr/src/i386/legacy/usr/include -c
/usr/src/tools/build/dummy.c
building static egacy library
ranlib libegacy.a
sh /usr/src/tools/install.sh -C -o root -g wheel -m
444   libegacy.a /usr/obj/usr/src/i386/legacy/usr/lib
--------------------------------------------------------------
>>> stage 1.2: bootstrap tools
--------------------------------------------------------------
cd /usr/src; MAKEOBJDIRPREFIX=/usr/obj/usr/src/i386 
DESTDIR=  INSTALL="sh /usr/src/tools/install.sh" 
PATH=/usr/obj/usr/src/i386/legacy/usr/sbin:/usr/obj/usr/src/i386/legacy/usr/bin:/usr/obj/usr/src/i386/legacy/usr/games:/sbin:/bin:/usr/sbin:/usr/bin
 WORLDTMP=/usr/obj/usr/src/i386  MAKEFLAGS="-m
/usr/src/tools/build/mk  -j 2
DESTDIR=/usr/jail/test.org -m /usr/src/share/mk" make
-f Makefile.inc1  BOOTSTRAPPING=503000  -DNOHTML
-DNOINFO -DNOLINT -DNOMAN -DNOPIC -DNOPROFILE 
-DNOSHARED -DNO_CPU_CFLAGS -DNO_WARNS bootstrap-tools
===> games/fortune/strfile
/usr/obj/usr/src/i386/usr/src/games/fortune/strfile
created for /usr/src/games/fortune/strfile
rm -f .depend
mkdep -f .depend -a   
-I/usr/obj/usr/src/i386/legacy/usr/include
/usr/src/games/fortune/strfile/strfile.c
echo strfile: /usr/jail/test.org/usr/lib/libc.a
/usr/obj/usr/src/i386/legacy/usr/lib/libegacy.a >>
.depend
make: don't know how to make
/usr/jail/test.org/usr/lib/libc.a. Stop
*** Error code 2
1 error
*** Error code 2
1 error
*** Error code 2
1 error
Received on Fri Sep 03 2004 - 20:05:07 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:10 UTC