Date: Wed, 19 Jan 2011 03:10:25 +0000 (UTC) From: Nathan Whitehorn <nwhitehorn@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r217568 - in user/nwhitehorn/bsdinstall: . scripts Message-ID: <201101190310.p0J3APQi060929@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: nwhitehorn Date: Wed Jan 19 03:10:24 2011 New Revision: 217568 URL: http://svn.freebsd.org/changeset/base/217568 Log: Add a script to install jails. Added: user/nwhitehorn/bsdinstall/scripts/jail - copied, changed from r217547, user/nwhitehorn/bsdinstall/scripts/auto Modified: user/nwhitehorn/bsdinstall/bsdinstall user/nwhitehorn/bsdinstall/scripts/Makefile Modified: user/nwhitehorn/bsdinstall/bsdinstall ============================================================================== --- user/nwhitehorn/bsdinstall/bsdinstall Wed Jan 19 01:26:49 2011 (r217567) +++ user/nwhitehorn/bsdinstall/bsdinstall Wed Jan 19 03:10:24 2011 (r217568) @@ -1,11 +1,11 @@ #!/bin/sh -DISTRIBUTIONS="kernel.tgz world.tgz distribution.tgz"; export DISTRIBUTIONS -BSDINSTALL_LOG="/tmp/bsdinstall_log"; export BSDINSTALL_LOG -BSDINSTALL_TMPETC="/tmp/bsdinstall_etc"; export BSDINSTALL_TMPETC -PATH_FSTAB="$BSDINSTALL_TMPETC/fstab"; export PATH_FSTAB -BSDINSTALL_DISTDIR="/usr/bsdinstall-dist"; export BSDINSTALL_DISTDIR -BSDINSTALL_CHROOT="/mnt"; export BSDINSTALL_CHROOT +[ -z "$DISTRIBUTIONS" ] && export DISTRIBUTIONS="kernel.tgz world.tgz distribution.tgz" +[ -z "$BSDINSTALL_LOG" ] && export BSDINSTALL_LOG="/tmp/bsdinstall_log" +[ -z "$BSDINSTALL_TMPETC" ] && export BSDINSTALL_TMPETC="/tmp/bsdinstall_etc" +[ -z "$PATH_FSTAB" ] && export PATH_FSTAB="$BSDINSTALL_TMPETC/fstab" +[ -z "$BSDINSTALL_DISTDIR" ] && export BSDINSTALL_DISTDIR="/usr/bsdinstall-dist" +[ -z "$BSDINSTALL_CHROOT" ] && export BSDINSTALL_CHROOT="/mnt" VERB=$1; shift Modified: user/nwhitehorn/bsdinstall/scripts/Makefile ============================================================================== --- user/nwhitehorn/bsdinstall/scripts/Makefile Wed Jan 19 01:26:49 2011 (r217567) +++ user/nwhitehorn/bsdinstall/scripts/Makefile Wed Jan 19 03:10:24 2011 (r217568) @@ -1,7 +1,7 @@ # $FreeBSD $ -SCRIPTS= auto adduser config hostname keymap mount netconfig rootpass services \ - time umount +SCRIPTS= auto adduser config hostname jail keymap mount netconfig rootpass \ + services time umount BINDIR= /usr/libexec/bsdinstall NO_MAN= true Copied and modified: user/nwhitehorn/bsdinstall/scripts/jail (from r217547, user/nwhitehorn/bsdinstall/scripts/auto) ============================================================================== --- user/nwhitehorn/bsdinstall/scripts/auto Tue Jan 18 17:48:21 2011 (r217547, copy source) +++ user/nwhitehorn/bsdinstall/scripts/jail Wed Jan 19 03:10:24 2011 (r217568) @@ -2,6 +2,9 @@ echo "Begun Installation at $(date)" > $BSDINSTALL_LOG +export BSDINSTALL_CHROOT=$1 +export DISTRIBUTIONS="`echo $DISTRIBUTIONS | sed 's/kernel\.[^ ]* //g'`" + error() { dialog --backtitle "FreeBSD Installer" --title "Abort" \ --no-label "Exit" --yes-label "Restart" --yesno \ @@ -18,11 +21,7 @@ error() { rm -rf $BSDINSTALL_TMPETC mkdir $BSDINSTALL_TMPETC -trap true SIGINT # This section is optional -bsdinstall keymap - -trap error SIGINT # Catch cntrl-C here -bsdinstall hostname || error +trap error SIGINT # SIGINT is bad FETCH_DISTRIBUTIONS="" for dist in $DISTRIBUTIONS; do @@ -31,38 +30,6 @@ for dist in $DISTRIBUTIONS; do fi done -if [ ! -z "$FETCH_DISTRIBUTIONS" ]; then - dialog --backtitle "FreeBSD Installer" --title "Network Installation" --msgbox "No installation files were found on the boot volume. The next few screens will allow you to configure networking so that they can be downloaded from the Internet." 0 0 - bsdinstall netconfig || error - NETCONFIG_DONE=yes -fi - -rm $PATH_FSTAB -touch $PATH_FSTAB - -dialog --backtitle "FreeBSD Installer" --title "Partitioning" --extra-button \ - --extra-label "Manual" --ok-label "Guided" --cancel-label "Shell" \ - --yesno "Would you like to use the guided partitioning tool (recommended for beginners) or to set up partitions manually (experts)? You can also open a shell and set up partitions entirely by hand." 0 0 - -case $? in -0) # Guided - bsdinstall autopart || error - bsdinstall mount || error - ;; -1) # Shell - clear - echo "Use this shell to set up partitions for the new system. When finished, mount the system at $BSDINSTALL_CHROOT and place an fstab file for the new system at $PATH_FSTAB. Then type 'exit'. You can also enter the partition editor at any time by entering 'bsdinstall partedit'." - sh - ;; -3) # Manual - bsdinstall partedit || error - bsdinstall mount || error - ;; -*) - error - ;; -esac - if [ ! -z $FETCH_DISTRIBUTIONS ]; then ALL_DISTRIBUTIONS=$DISTRIBUTIONS DISTRIBUTIONS=$FETCH_DISTRIBUTIONS @@ -74,9 +41,6 @@ bsdinstall distextract || error bsdinstall rootpass || error trap true SIGINT # This section is optional -if [ "$NETCONFIG_DONE" != yes ]; then - bsdinstall netconfig # Don't check for errors -- the user may cancel -fi bsdinstall time bsdinstall services bsdinstall adduser
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101190310.p0J3APQi060929>