source: src-sh/warden/linux-installs/debian-6-squeeze @ 1620346

9.1-release9.2-releasereleng/10.0releng/10.0.1
Last change on this file since 1620346 was 1620346, checked in by Kris Moore <kris@…>, 12 months ago

Initial import of PC-BSD /current/ SVN repo

  • Property mode set to 100755
File size: 818 bytes
Line 
1#!/bin/sh
2# Script to install debian 6 "squeeze" release into a jail
3# Author: Kris Moore <kris@pcbsd.org>
4
5# Jail / chroot dir
6jDIR="$1"
7
8# Target jail IP address
9jIP="$2"
10
11# Jail meta-directory
12jMETA="$3"
13
14if [ ! -e "${jDIR}" ] ; then
15  mkdir -p "${jDIR}"
16fi
17
18debootstrap squeeze ${jDIR}
19err=$?
20
21umount -f ${jDIR}/dev/fd >/dev/null 2>/dev/null
22umount -f ${jDIR}/dev >/dev/null 2>/dev/null
23umount -f ${jDIR}/sys >/dev/null 2>/dev/null
24umount -f ${jDIR}/proc >/dev/null 2>/dev/null
25
26# Fix log file
27sed -i '' 's|/dev/xconsole|/var/log/xconsole|g' ${jDIR}/etc/rsyslog.conf
28
29# Get rid of umount
30mv ${jDIR}/sbin/umount ${jDIR}/sbin/umount.prev
31ln -s /bin/true ${jDIR}/sbin/umount
32
33# Setup some custom start / stop stuff
34echo "/etc/init.d/rc 3" > ${jMETA}/jail-start
35echo "/etc/init.d/rc 0" > ${jMETA}/jail-stop
36
37exit $err
Note: See TracBrowser for help on using the repository browser.