Page MenuHomeFreeBSD

D44674.id136657.diff
No OneTemporary

D44674.id136657.diff

diff --git a/usr.sbin/bsdinstall/bsdinstall b/usr.sbin/bsdinstall/bsdinstall
--- a/usr.sbin/bsdinstall/bsdinstall
+++ b/usr.sbin/bsdinstall/bsdinstall
@@ -47,7 +47,7 @@
# the following argument will terminate option processing unless it looks
# like a flag).
#
-GETOPTS_EXTRA=
+GETOPTS_EXTRA="X"
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
@@ -56,6 +56,7 @@
: ${TMPDIR:="/tmp"}; export TMPDIR
+: ${BSDINSTALL_ARGS=}; export BSDINSTALL_ARGS
: ${BSDINSTALL_TMPETC="${TMPDIR}/bsdinstall_etc"}; export BSDINSTALL_TMPETC
: ${BSDINSTALL_TMPBOOT="${TMPDIR}/bsdinstall_boot"}; export BSDINSTALL_TMPBOOT
: ${PATH_FSTAB="$BSDINSTALL_TMPETC/fstab"}; export PATH_FSTAB
@@ -69,6 +70,7 @@
usage()
{
echo "Usage: bsdinstall [-$GETOPTS_EXTRA$GETOPTS_STDARGS][target][...]" 1>&2
+ echo " -X Start in graphical mode" 1>&2
echo " -d Enable debugging output" 1>&2
echo " -D Save debugging output to a file" 1>&2
return 1
@@ -79,8 +81,13 @@
#
# Process command-line arguments
#
+USE_XDIALOG=
while getopts "$GETOPTS_EXTRA$GETOPTS_STDARGS" name; do
case "$name" in
+ X)
+ BSDINSTALL_ARGS="-X $BSDINSTALL_ARGS"
+ : ${DIALOG="Xdialog"}; export DIALOG
+ ;;
'?')
usage
exit $?
@@ -99,19 +106,19 @@
f_quietly f_debug_init
f_isset debugFile || debug=
-f_dprintf "Running installation step: %s %s" "$VERB" "$*"
+f_dprintf "Running installation step: %s %s" "$VERB" "$BSDINSTALL_ARGS $*"
if [ "$debug" ]; then
case "$debugFile" in
# If NULL, send errors to the bit-bucket
- "") exec "/usr/libexec/bsdinstall/$VERB" "$@" 2> /dev/null ;;
+ "") exec "/usr/libexec/bsdinstall/$VERB" $BSDINSTALL_ARGS "$@" 2> /dev/null ;;
# If begins with `+', send errors to both terminal and file (no `+')
- +*) exec "/usr/libexec/bsdinstall/$VERB" "$@" \
+ +*) exec "/usr/libexec/bsdinstall/$VERB" $BSDINSTALL_ARGS "$@" \
2>&1 >&$TERMINAL_STDOUT_PASSTHRU | tee "${debugFile#+}" ;;
# Otherwise, just send errors to the file specified
- *) exec "/usr/libexec/bsdinstall/$VERB" "$@" 2>> "$debugFile"
+ *) exec "/usr/libexec/bsdinstall/$VERB" $BSDINSTALL_ARGS "$@" 2>> "$debugFile"
esac
else
- exec "/usr/libexec/bsdinstall/$VERB" "$@" 2> /dev/null
+ exec "/usr/libexec/bsdinstall/$VERB" $BSDINSTALL_ARGS "$@" 2> /dev/null
fi
################################################################################
diff --git a/usr.sbin/bsdinstall/bsdinstall.8 b/usr.sbin/bsdinstall/bsdinstall.8
--- a/usr.sbin/bsdinstall/bsdinstall.8
+++ b/usr.sbin/bsdinstall/bsdinstall.8
@@ -60,6 +60,15 @@
.Sx ENVIRONMENT VARIABLES
for more information on
.Ev BSDINSTALL_LOG .
+.It Fl X
+Use
+.Xr Xdialog 1
+(from
+.Xr Pa ports/x11/gbsddialog
+or
+.Xr Pa ports/x11/xdialog
+for instance) in place of
+.Xr bsddialog 1 .
.El
.Sh TARGETS
Most of the following targets are only useful for scripting the installer.
diff --git a/usr.sbin/bsdinstall/scripts/auto b/usr.sbin/bsdinstall/scripts/auto
--- a/usr.sbin/bsdinstall/scripts/auto
+++ b/usr.sbin/bsdinstall/scripts/auto
@@ -32,6 +32,8 @@
. $BSDCFG_SHARE/common.subr || exit 1
f_include $BSDCFG_SHARE/dialog.subr
+: ${BSDINSTALL_ARGS=}
+
############################################################ GLOBALS
#
@@ -76,7 +78,7 @@
local prompt="${1:+$1\n\n}$msg_an_installation_step_has_been_aborted"
local hline="$hline_arrows_tab_space_enter"
- [ -f "$PATH_FSTAB" ] && bsdinstall umount
+ [ -f "$PATH_FSTAB" ] && bsdinstall $BSDINSTALL_ARGS umount
local height width
f_dialog_buttonbox_size height width \
@@ -148,10 +150,10 @@
[ -f /usr/libexec/bsdinstall/local.pre-everything ] && f_dprintf "Running local.pre-everything" && sh /usr/libexec/bsdinstall/local.pre-everything "$BSDINSTALL_CHROOT"
trap true SIGINT # This section is optional
-[ -z "$BSDINSTALL_SKIP_KEYMAP" ] && bsdinstall keymap
+[ -z "$BSDINSTALL_SKIP_KEYMAP" ] && bsdinstall $BSDINSTALL_ARGS keymap
trap error SIGINT # Catch cntrl-C here
-if [ -z "$BSDINSTALL_SKIP_HOSTNAME" ]; then bsdinstall hostname || error "Set hostname failed"; fi
+if [ -z "$BSDINSTALL_SKIP_HOSTNAME" ]; then bsdinstall $BSDINSTALL_ARGS hostname || error "Set hostname failed"; fi
export DISTRIBUTIONS="${DISTRIBUTIONS:-base.txz kernel.txz}"
if [ -f $BSDINSTALL_DISTDIR/MANIFEST ]; then
@@ -181,7 +183,7 @@
if [ -n "$FETCH_DISTRIBUTIONS" -a -n "$BSDINSTALL_CONFIGCURRENT" ]; then
$DIALOG --backtitle "$OSNAME Installer" --title "Network Installation" --msgbox "Some installation files were not 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
+ bsdinstall $BSDINSTALL_ARGS netconfig || error
NETCONFIG_DONE=yes
fi
@@ -315,12 +317,12 @@
case "$PARTMODE" in
"$msg_auto_zfs") # ZFS
- bsdinstall zfsboot || error "ZFS setup failed"
- bsdinstall mount || error "Failed to mount filesystem"
+ bsdinstall $BSDINSTALL_ARGS zfsboot || error "ZFS setup failed"
+ bsdinstall $BSDINSTALL_ARGS mount || error "Failed to mount filesystem"
;;
"$msg_auto_ufs") # Guided UFS
- bsdinstall autopart || error "Partitioning error"
- bsdinstall mount || error "Failed to mount filesystem"
+ bsdinstall $BSDINSTALL_ARGS autopart || error "Partitioning error"
+ bsdinstall $BSDINSTALL_ARGS mount || error "Failed to mount filesystem"
;;
"$msg_shell") # Shell
clear
@@ -330,11 +332,11 @@
"$msg_manual") # Manual
if f_isset debugFile; then
# Give partedit the path to our logfile so it can append
- BSDINSTALL_LOG="${debugFile#+}" bsdinstall partedit || error "Partitioning error"
+ BSDINSTALL_LOG="${debugFile#+}" bsdinstall $BSDINSTALL_ARGS partedit || error "Partitioning error"
else
- bsdinstall partedit || error "Partitioning error"
+ bsdinstall $BSDINSTALL_ARGS partedit || error "Partitioning error"
fi
- bsdinstall mount || error "Failed to mount filesystem"
+ bsdinstall $BSDINSTALL_ARGS mount || error "Failed to mount filesystem"
;;
*)
error "Unknown partitioning mode"
@@ -351,34 +353,34 @@
[ $FETCH_RESULT -ne 0 ] && error "Could not fetch remote distributions"
fi
-bsdinstall checksum || error "Distribution checksum failed"
-bsdinstall distextract || error "Distribution extract failed"
+bsdinstall $BSDINSTALL_ARGS checksum || error "Distribution checksum failed"
+bsdinstall $BSDINSTALL_ARGS distextract || error "Distribution extract failed"
# Set up boot loader
-bsdinstall bootconfig || error "Failed to configure bootloader"
+bsdinstall $BSDINSTALL_ARGS bootconfig || error "Failed to configure bootloader"
[ -f /usr/libexec/bsdinstall/local.pre-configure ] && f_dprintf "Running local.pre-configure" && sh /usr/libexec/bsdinstall/local.pre-configure "$BSDINSTALL_CHROOT"
-bsdinstall rootpass || error "Could not set root password"
+bsdinstall $BSDINSTALL_ARGS rootpass || error "Could not set root password"
trap true SIGINT # This section is optional
if [ "$NETCONFIG_DONE" != yes ]; then
- bsdinstall netconfig # Don't check for errors -- the user may cancel
+ bsdinstall $BSDINSTALL_ARGS netconfig # Don't check for errors -- the user may cancel
fi
-[ -z "$BSDINSTALL_SKIP_TIME" ] && bsdinstall time
-[ -z "$BSDINSTALL_SKIP_SERVICES" ] && bsdinstall services
-[ -z "$BSDINSTALL_SKIP_HARDENING" ] && bsdinstall hardening
+[ -z "$BSDINSTALL_SKIP_TIME" ] && bsdinstall $BSDINSTALL_ARGS time
+[ -z "$BSDINSTALL_SKIP_SERVICES" ] && bsdinstall $BSDINSTALL_ARGS services
+[ -z "$BSDINSTALL_SKIP_HARDENING" ] && bsdinstall $BSDINSTALL_ARGS hardening
[ -z "$BSDINSTALL_SKIP_USERS" ] && $DIALOG --backtitle "$OSNAME Installer" \
--title "Add User Accounts" --yesno \
"Would you like to add users to the installed system now?" 0 0 && \
- bsdinstall adduser
+ bsdinstall $BSDINSTALL_ARGS adduser
# Allow user to change his mind
-[ -z "$BSDINSTALL_SKIP_FINALCONFIG" ] && bsdinstall finalconfig
+[ -z "$BSDINSTALL_SKIP_FINALCONFIG" ] && bsdinstall $BSDINSTALL_ARGS finalconfig
trap error SIGINT # SIGINT is bad again
-bsdinstall config || error "Failed to save config"
+bsdinstall $BSDINSTALL_ARGS config || error "Failed to save config"
if [ ! -z "$BSDINSTALL_FETCHDEST" ]; then
rm -rf "$BSDINSTALL_FETCHDEST"
@@ -398,8 +400,8 @@
fi
fi
-bsdinstall entropy
-bsdinstall umount
+bsdinstall $BSDINSTALL_ARGS entropy
+bsdinstall $BSDINSTALL_ARGS umount
f_dprintf "Installation Completed at %s" "$( date )"
diff --git a/usr.sbin/bsdinstall/scripts/fetchmissingdists b/usr.sbin/bsdinstall/scripts/fetchmissingdists
--- a/usr.sbin/bsdinstall/scripts/fetchmissingdists
+++ b/usr.sbin/bsdinstall/scripts/fetchmissingdists
@@ -30,6 +30,7 @@
BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
+: ${BSDINSTALL_ARGS=}
: ${DIALOG="bsddialog"}
error()
@@ -90,7 +91,7 @@
# Copy local stuff first
env DISTRIBUTIONS="$LOCAL_DISTRIBUTIONS" \
BSDINSTALL_DISTSITE="file://$BSDINSTALL_DISTDIR_ORIG" \
- bsdinstall distfetch || \
+ bsdinstall $BSDINSTALL_ARGS distfetch || \
error "Failed to fetch distribution from local media"
fi
@@ -112,7 +113,7 @@
done
# Fetch the distributions.
-bsdinstall distfetch
+bsdinstall $BSDINSTALL_ARGS distfetch
rc=$?
if [ $rc -ne 0 ]; then
diff --git a/usr.sbin/bsdinstall/scripts/finalconfig b/usr.sbin/bsdinstall/scripts/finalconfig
--- a/usr.sbin/bsdinstall/scripts/finalconfig
+++ b/usr.sbin/bsdinstall/scripts/finalconfig
@@ -31,6 +31,7 @@
. $BSDCFG_SHARE/common.subr || exit 1
: ${BSDDIALOG_OK=0}
+: ${BSDINSTALL_ARGS=}
: ${DIALOG="bsddialog"}
while true; do
@@ -57,31 +58,31 @@
case "$REVISIT" in
"Add User")
- bsdinstall adduser
+ bsdinstall $BSDINSTALL_ARGS adduser
;;
"Root Password")
- bsdinstall rootpass
+ bsdinstall $BSDINSTALL_ARGS rootpass
;;
"Hostname")
- bsdinstall hostname
+ bsdinstall $BSDINSTALL_ARGS hostname
;;
"Network")
- bsdinstall netconfig
+ bsdinstall $BSDINSTALL_ARGS netconfig
;;
"Services")
- bsdinstall services
+ bsdinstall $BSDINSTALL_ARGS services
;;
"System Hardening")
- bsdinstall hardening
+ bsdinstall $BSDINSTALL_ARGS hardening
;;
"Time Zone")
- bsdinstall timezone
+ bsdinstall $BSDINSTALL_ARGS timezone
;;
"Date & Time")
- bsdinstall time
+ bsdinstall $BSDINSTALL_ARGS time
;;
"Handbook")
- bsdinstall docsinstall
+ bsdinstall $BSDINSTALL_ARGS docsinstall
;;
esac
done
diff --git a/usr.sbin/bsdinstall/scripts/jail b/usr.sbin/bsdinstall/scripts/jail
--- a/usr.sbin/bsdinstall/scripts/jail
+++ b/usr.sbin/bsdinstall/scripts/jail
@@ -34,6 +34,7 @@
############################################################ MAIN
: ${BSDDIALOG_OK=0}
+: ${BSDINSTALL_ARGS=}
: ${DIALOG="bsddialog"}
f_dprintf "Began Installation at %s" "$( date )"
@@ -131,30 +132,30 @@
fi
if [ ! -z "$FETCH_DISTRIBUTIONS" ]; then
- bsdinstall distfetch || error "Failed to fetch distribution"
+ bsdinstall $BSDINSTALL_ARGS distfetch || error "Failed to fetch distribution"
fi
-bsdinstall checksum || error "Distribution checksum failed"
-bsdinstall distextract || error "Distribution extract failed"
+bsdinstall $BSDINSTALL_ARGS checksum || error "Distribution checksum failed"
+bsdinstall $BSDINSTALL_ARGS distextract || error "Distribution extract failed"
if [ ! "$nonInteractive" == "YES" ]
then
- bsdinstall rootpass || error "Could not set root password"
+ bsdinstall $BSDINSTALL_ARGS rootpass || error "Could not set root password"
fi
trap true SIGINT # This section is optional
if [ ! "$nonInteractive" == "YES" ]
then
-bsdinstall services
+bsdinstall $BSDINSTALL_ARGS services
$DIALOG --backtitle "$OSNAME Installer" --title "Add User Accounts" --yesno \
"Would you like to add users to the installed system now?" 0 0 && \
- bsdinstall adduser
+ bsdinstall $BSDINSTALL_ARGS adduser
fi
trap error SIGINT # SIGINT is bad again
-bsdinstall config || error "Failed to save config"
+bsdinstall $BSDINSTALL_ARGS config || error "Failed to save config"
cp /etc/resolv.conf $1/etc
cp /etc/localtime $1/etc
cp /var/db/zoneinfo $1/var/db
@@ -170,7 +171,7 @@
rm $BSDINSTALL_CHROOT/tmp/installscript
fi
-bsdinstall entropy
+bsdinstall $BSDINSTALL_ARGS entropy
f_dprintf "Installation Completed at %s" "$(date)"
exit $SUCCESS
diff --git a/usr.sbin/bsdinstall/scripts/netconfig b/usr.sbin/bsdinstall/scripts/netconfig
--- a/usr.sbin/bsdinstall/scripts/netconfig
+++ b/usr.sbin/bsdinstall/scripts/netconfig
@@ -42,6 +42,7 @@
: ${BSDDIALOG_EXTRA=3}
: ${BSDDIALOG_ESC=5}
: ${BSDDIALOG_ERROR=255}
+: ${BSDINSTALL_ARGS=}
: ${DIALOG="bsddialog"}
#
@@ -110,7 +111,7 @@
ifconfig $NEXT_WLAN_IFACE create wlandev $INTERFACE
ifconfig $NEXT_WLAN_IFACE up
fi
- bsdinstall wlanconfig $NEXT_WLAN_IFACE || exec $0
+ bsdinstall $BSDINSTALL_ARGS wlanconfig $NEXT_WLAN_IFACE || exec $0
INTERFACE="$NEXT_WLAN_IFACE"
fi
@@ -134,7 +135,7 @@
fi
fi
if [ ${IPV4_AVAIL} -eq 1 ]; then
- bsdinstall netconfig_ipv4 ${INTERFACE} "${IFCONFIG_PREFIX}" $AUTO
+ bsdinstall $BSDINSTALL_ARGS netconfig_ipv4 ${INTERFACE} "${IFCONFIG_PREFIX}" $AUTO
if [ $? -ne $BSDDIALOG_OK ]; then
if [ -z "$AUTO" ]; then
exec $0
@@ -156,7 +157,7 @@
fi
fi
if [ ${IPV6_AVAIL} -eq 1 ]; then
- bsdinstall netconfig_ipv6 ${INTERFACE} $AUTO
+ bsdinstall $BSDINSTALL_ARGS netconfig_ipv6 ${INTERFACE} $AUTO
if [ $? -ne $BSDDIALOG_OK ]; then
if [ -z "$AUTO" ]; then
exec $0
diff --git a/usr.sbin/bsdinstall/scripts/script b/usr.sbin/bsdinstall/scripts/script
--- a/usr.sbin/bsdinstall/scripts/script
+++ b/usr.sbin/bsdinstall/scripts/script
@@ -34,6 +34,8 @@
f_include $BSDCFG_SHARE/dialog.subr
f_include $BSDCFG_SHARE/variable.subr
+: ${BSDINSTALL_ARGS=}
+
############################################################ CONFIGURATION
# VARIABLES:
@@ -71,7 +73,7 @@
if [ "$ZFSBOOT_DISKS" ]; then
zpool export $ZFSBOOT_POOL_NAME
else
- bsdinstall umount
+ bsdinstall $BSDINSTALL_ARGS umount
fi
exit 1
@@ -120,11 +122,11 @@
rm -f $PATH_FSTAB
touch $PATH_FSTAB
if [ "$ZFSBOOT_DISKS" ]; then
- bsdinstall zfsboot
+ bsdinstall $BSDINSTALL_ARGS zfsboot
else
- bsdinstall scriptedpart "$PARTITIONS"
+ bsdinstall $BSDINSTALL_ARGS scriptedpart "$PARTITIONS"
fi
-bsdinstall mount
+bsdinstall $BSDINSTALL_ARGS mount
# Fetch missing distribution files, if any
exec 5>&1
@@ -135,10 +137,10 @@
[ $FETCH_RESULT -ne 0 ] && error "Could not fetch remote distributions"
# Unpack distributions
-bsdinstall checksum
+bsdinstall $BSDINSTALL_ARGS checksum
if [ -t 0 ]; then
# If install is a tty, use distextract as normal
- bsdinstall distextract
+ bsdinstall $BSDINSTALL_ARGS distextract
else
# Otherwise, we need to use tar (see https://reviews.freebsd.org/D10736)
for set in $DISTRIBUTIONS; do
@@ -160,10 +162,10 @@
fi
# Configure bootloader if needed
-bsdinstall bootconfig
+bsdinstall $BSDINSTALL_ARGS bootconfig
# Finalize install
-bsdinstall config
+bsdinstall $BSDINSTALL_ARGS config
# Make sure networking is functional, if we can arrange that
if [ ! -f $BSDINSTALL_CHROOT/etc/resolv.conf -a -f /etc/resolv.conf ]; then
@@ -179,8 +181,8 @@
rm $BSDINSTALL_CHROOT/tmp/installscript
fi
-bsdinstall entropy
-bsdinstall umount
+bsdinstall $BSDINSTALL_ARGS entropy
+bsdinstall $BSDINSTALL_ARGS umount
if [ "$ZFSBOOT_DISKS" ]; then
zpool export $ZFSBOOT_POOL_NAME
fi
diff --git a/usr.sbin/bsdinstall/startbsdinstall b/usr.sbin/bsdinstall/startbsdinstall
--- a/usr.sbin/bsdinstall/startbsdinstall
+++ b/usr.sbin/bsdinstall/startbsdinstall
@@ -9,58 +9,81 @@
: ${BSDDIALOG_EXTRA=3}
: ${BSDDIALOG_ESC=5}
: ${BSDDIALOG_ERROR=255}
+: ${OSNAME:="FreeBSD"}
-kbdcontrol -d >/dev/null 2>&1
-if [ $? -eq 0 ]; then
- # Syscons: use xterm, start interesting things on other VTYs
- TERM=xterm
+if test "x$1" = "x-X"; then
+ shift
- # Don't send ESC on function-key 62/63 (left/right command key)
- kbdcontrol -f 62 '' > /dev/null 2>&1
- kbdcontrol -f 63 '' > /dev/null 2>&1
+ # Graphical installer
+ : ${DIALOG:="Xdialog"}; export DIALOG
+ : ${BSDINSTALL_ARGS="-X"}
+ : ${BSDINSTALL_LIVE_SESSION:="/bin/sh -c /usr/local/bin/xfce4-session"}
+ : ${BSDINSTALL_PARTMODE:="Auto (ZFS)"}; export BSDINSTALL_PARTMODE
+ : ${BSDINSTALL_SHELL="xfce4-terminal -e"}
- if [ -z "$EXTERNAL_VTY_STARTED" ]; then
- # Init will clean these processes up if/when the system
- # goes multiuser
- touch /tmp/bsdinstall_log
- tail -f /tmp/bsdinstall_log > /dev/ttyv2 &
- /usr/libexec/getty autologin ttyv3 &
- EXTERNAL_VTY_STARTED=1
- fi
+ # XXX For compatibility with Xdialog(1) from x11/gbsddialog
+ POSIXLY_CORRECT=1
+ export POSIXLY_CORRECT
+
+ # Setup the backtitle
+ $DIALOG --backtitle "$OSNAME Installer" --clear-screen &
else
- # Serial or other console
- echo
- echo "Welcome to ${OSNAME}!"
- echo
- echo "Please choose the appropriate terminal type for your system."
- echo "Common console types are:"
- echo " ansi Standard ANSI terminal"
- echo " vt100 VT100 or compatible terminal"
- echo " xterm xterm terminal emulator (or compatible)"
- echo
- echo -n "Console type [vt100]: "
- read TERM
- TERM=${TERM:-vt100}
-fi
-export TERM
+ : ${BSDINSTALL_ARGS=}
+ : ${BSDINSTALL_LIVE_SESSION=":"}
+ : ${BSDINSTALL_SHELL=}
+ : ${DIALOG:="bsddialog"}; export DIALOG
+ kbdcontrol -d >/dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ # Syscons: use xterm, start interesting things on other VTYs
+ TERM=xterm
+
+ # Don't send ESC on function-key 62/63 (left/right command key)
+ kbdcontrol -f 62 '' > /dev/null 2>&1
+ kbdcontrol -f 63 '' > /dev/null 2>&1
-# Query terminal size; useful for serial lines.
-resizewin -z
+ if [ -z "$EXTERNAL_VTY_STARTED" ]; then
+ # Init will clean these processes up if/when the system
+ # goes multiuser
+ touch /tmp/bsdinstall_log
+ tail -f /tmp/bsdinstall_log > /dev/ttyv2 &
+ /usr/libexec/getty autologin ttyv3 &
+ EXTERNAL_VTY_STARTED=1
+ fi
+ else
+ # Serial or other console
+ echo
+ echo "Welcome to ${OSNAME}!"
+ echo
+ echo "Please choose the appropriate terminal type for your system."
+ echo "Common console types are:"
+ echo " ansi Standard ANSI terminal"
+ echo " vt100 VT100 or compatible terminal"
+ echo " xterm xterm terminal emulator (or compatible)"
+ echo
+ echo -n "Console type [vt100]: "
+ read TERM
+ TERM=${TERM:-vt100}
+ fi
+ export TERM
+
+ # Query terminal size; useful for serial lines.
+ resizewin -z
+fi
if [ -f /etc/installerconfig ]; then
if [ "$1" != "primary" ]; then
- bsddialog --backtitle "${OSNAME} Installer" --title "Installing" --msgbox "${OSNAME} is being installed from a script; please use the primary console." 0 0
- . "$0"
- elif bsdinstall script /etc/installerconfig; then
- bsddialog --backtitle "${OSNAME} Installer" --title "Complete" --no-cancel --ok-label "Reboot" --pause "Installation of ${OSNAME} complete! Rebooting in 10 seconds" 10 30 10
+ $DIALOG --backtitle "${OSNAME} Installer" --title "Installing" --msgbox "${OSNAME} is being installed from a script; please use the primary console." 0 0
+ . "$0" $BSDINSTALL_ARGS
+ elif $BSDINSTALL script /etc/installerconfig; then
+ $DIALOG --backtitle "${OSNAME} Installer" --title "Complete" --no-cancel --ok-label "Reboot" --pause "Installation of ${OSNAME} complete! Rebooting in 10 seconds" 10 30 10
reboot
else
- bsddialog --backtitle "${OSNAME} Installer" --title "Error" --textbox /tmp/bsdinstall_log 0 0
+ $DIALOG --backtitle "${OSNAME} Installer" --title "Error" --textbox /tmp/bsdinstall_log 0 0
fi
exit
fi
-bsddialog --backtitle "${OSNAME} Installer" --title "Welcome" --extra-button --extra-label "Shell" --ok-label "Install" --cancel-label "Live System" --yesno "Welcome to ${OSNAME}! Would you like to begin an installation or use the live system?" 0 0
+$DIALOG --backtitle "${OSNAME} Installer" --title "Welcome" --extra-button --extra-label "Shell" --ok-label "Install" --cancel-label "Live System" --yesno "Welcome to ${OSNAME}! Would you like to begin an installation or use the live system?" 0 0
case $? in
$BSDDIALOG_OK) # Install
@@ -71,15 +94,17 @@
fi
trap true SIGINT # Ignore cntrl-C here
- bsdinstall
+ bsdinstall $BSDINSTALL_ARGS
if [ $? -eq 0 ]; then
- bsddialog --backtitle "${OSNAME} Installer" --title "Complete" --ok-label "Reboot" --extra-button --extra-label "Shutdown" --cancel-label "Live System" --yesno "Installation of ${OSNAME} complete! Would you like to reboot into the installed system now?" 0 0
+ $DIALOG --backtitle "${OSNAME} Installer" --title "Complete" --ok-label "Reboot" --extra-button --extra-label "Shutdown" --cancel-label "Live System" --yesno "Installation of ${OSNAME} complete! Would you like to reboot into the installed system now?" 0 0
case $? in
$BSDDIALOG_OK) # Reboot
+ $DIALOG --backtitle "${OSNAME} Installer" --title "Please wait" --infobox "Rebooting..." 0 0
reboot
;;
$BSDDIALOG_EXTRA) # Shutdown
+ $DIALOG --backtitle "${OSNAME} Installer" --title "Please wait" --infobox "Shutting down..." 0 0
shutdown -p now
# shutdown(8) daemonizes, with the actual signal to
# init(8) happening in the child, but if we exit the
@@ -93,22 +118,23 @@
sleep 1
done
;;
- $BSDDIALOG_CANCEL) # Live System
+ $BSDDIALOG_CANCEL) # Live System (resume multi-user boot)
exit 0
;;
esac
else
- . "$0"
+ . "$0" $BSDINSTALL_ARGS
fi
;;
-$BSDDIALOG_CANCEL) # Live System
+$BSDDIALOG_CANCEL) # Live System (resume multi-user boot)
+ $BSDINSTALL_LIVE_SESSION
exit 0
;;
$BSDDIALOG_EXTRA) # Shell
clear
echo "When finished, type 'exit' to return to the installer."
- /bin/sh
- . "$0"
+ $BSDINSTALL_SHELL /bin/sh
+ . "$0" $BSDINSTALL_ARGS
;;
esac

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 22, 2:52 AM (10 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14769214
Default Alt Text
D44674.id136657.diff (21 KB)

Event Timeline