Skip to content

Instantly share code, notes, and snippets.

@lwhsu
Created October 8, 2011 14:17
Show Gist options
  • Save lwhsu/1272340 to your computer and use it in GitHub Desktop.
Save lwhsu/1272340 to your computer and use it in GitHub Desktop.
Create FreeBSD jail through pre-built binary
#!/bin/sh
THEJAIL=$1
RELNAME=$2
if [ $# -lt 2 ]; then
echo "Usage: $0 JailPath ReleaseName"
exit 1
fi
sysinstall nonInteractive="yes" _ftpPath="ftp://ftp.tw.freebsd.org/pub/FreeBSD" mediaSetFTP dists="base" distSetCustom installRoot="${THEJAIL}" releaseName="${RELNAME}" installCommit
freebsd-update -b ${THEJAIL} fetch install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment