Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/bsdinstall/scripts/jail
Show All 38 Lines | |||||
f_dprintf "Began Installation at %s" "$( date )" | f_dprintf "Began Installation at %s" "$( date )" | ||||
export BSDINSTALL_CHROOT=$1 | export BSDINSTALL_CHROOT=$1 | ||||
error() { | error() { | ||||
local msg | local msg | ||||
if [ -n "$1" ]; then | if [ -n "$1" ]; then | ||||
msg="$1\n\n" | msg="$1\n\n" | ||||
fi | fi | ||||
bsddialog --backtitle "FreeBSD Installer" --title "Abort" \ | bsddialog --backtitle "$OSNAME Installer" --title "Abort" \ | ||||
--no-label "Exit" --yes-label "Restart" --yesno \ | --no-label "Exit" --yes-label "Restart" --yesno \ | ||||
"${msg}An installation step has been aborted. Would you like to restart the installation or exit the installer?" 0 0 | "${msg}An installation step has been aborted. Would you like to restart the installation or exit the installer?" 0 0 | ||||
if [ $? -ne $BSDDIALOG_OK ]; then | if [ $? -ne $BSDDIALOG_OK ]; then | ||||
exit | exit | ||||
else | else | ||||
exec $0 $BSDINSTALL_CHROOT | exec $0 $BSDINSTALL_CHROOT | ||||
fi | fi | ||||
} | } | ||||
Show All 23 Lines | |||||
: ${DISTRIBUTIONS="base.txz"}; export DISTRIBUTIONS | : ${DISTRIBUTIONS="base.txz"}; export DISTRIBUTIONS | ||||
if [ -f $BSDINSTALL_DISTDIR/MANIFEST ]; then | if [ -f $BSDINSTALL_DISTDIR/MANIFEST ]; then | ||||
DISTMENU=`cut -f 4,5,6 $BSDINSTALL_DISTDIR/MANIFEST | grep -v -e ^kernel -e ^base` | DISTMENU=`cut -f 4,5,6 $BSDINSTALL_DISTDIR/MANIFEST | grep -v -e ^kernel -e ^base` | ||||
if [ ! "$nonInteractive" == "YES" ] | if [ ! "$nonInteractive" == "YES" ] | ||||
then | then | ||||
exec 3>&1 | exec 3>&1 | ||||
EXTRA_DISTS=$(echo $DISTMENU | xargs -o bsddialog \ | EXTRA_DISTS=$(echo $DISTMENU | xargs -o bsddialog \ | ||||
--backtitle "FreeBSD Installer" \ | --backtitle "$OSNAME Installer" \ | ||||
--title "Distribution Select" --no-cancel --separate-output \ | --title "Distribution Select" --no-cancel --separate-output \ | ||||
--checklist "Choose optional system components to install:" \ | --checklist "Choose optional system components to install:" \ | ||||
0 0 0 \ | 0 0 0 \ | ||||
2>&1 1>&3) | 2>&1 1>&3) | ||||
for dist in $EXTRA_DISTS; do | for dist in $EXTRA_DISTS; do | ||||
export DISTRIBUTIONS="$DISTRIBUTIONS $dist.txz" | export DISTRIBUTIONS="$DISTRIBUTIONS $dist.txz" | ||||
done | done | ||||
fi | fi | ||||
Show All 29 Lines | |||||
fi | fi | ||||
trap true SIGINT # This section is optional | trap true SIGINT # This section is optional | ||||
if [ ! "$nonInteractive" == "YES" ] | if [ ! "$nonInteractive" == "YES" ] | ||||
then | then | ||||
bsdinstall services | bsdinstall services | ||||
bsddialog --backtitle "FreeBSD Installer" --title "Add User Accounts" --yesno \ | bsddialog --backtitle "$OSNAME Installer" --title "Add User Accounts" --yesno \ | ||||
"Would you like to add users to the installed system now?" 0 0 && \ | "Would you like to add users to the installed system now?" 0 0 && \ | ||||
bsdinstall adduser | bsdinstall adduser | ||||
fi | fi | ||||
trap error SIGINT # SIGINT is bad again | trap error SIGINT # SIGINT is bad again | ||||
bsdinstall config || error "Failed to save config" | bsdinstall config || error "Failed to save config" | ||||
cp /etc/resolv.conf $1/etc | cp /etc/resolv.conf $1/etc | ||||
cp /etc/localtime $1/etc | cp /etc/localtime $1/etc | ||||
Show All 20 Lines |