Date: Wed, 12 Jan 2011 15:05:31 +0000 (UTC) From: Nathan Whitehorn <nwhitehorn@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r217310 - in user/nwhitehorn/bsdinstall: . distextract distfetch partedit release scripts Message-ID: <201101121505.p0CF5VjG092968@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: nwhitehorn Date: Wed Jan 12 15:05:31 2011 New Revision: 217310 URL: http://svn.freebsd.org/changeset/base/217310 Log: Chase dialog import by s/cdialog/dialog. bsdinstall no longer depends on anything not in the base system. Modified: user/nwhitehorn/bsdinstall/README user/nwhitehorn/bsdinstall/distextract/Makefile user/nwhitehorn/bsdinstall/distextract/distextract.c user/nwhitehorn/bsdinstall/distfetch/Makefile user/nwhitehorn/bsdinstall/distfetch/distfetch.c user/nwhitehorn/bsdinstall/partedit/Makefile user/nwhitehorn/bsdinstall/partedit/diskeditor.c user/nwhitehorn/bsdinstall/partedit/gpart_ops.c user/nwhitehorn/bsdinstall/partedit/partedit.c user/nwhitehorn/bsdinstall/release/testsystem.sh user/nwhitehorn/bsdinstall/scripts/adduser user/nwhitehorn/bsdinstall/scripts/auto user/nwhitehorn/bsdinstall/scripts/hostname user/nwhitehorn/bsdinstall/scripts/mount user/nwhitehorn/bsdinstall/scripts/netconfig user/nwhitehorn/bsdinstall/scripts/services Modified: user/nwhitehorn/bsdinstall/README ============================================================================== --- user/nwhitehorn/bsdinstall/README Wed Jan 12 14:55:02 2011 (r217309) +++ user/nwhitehorn/bsdinstall/README Wed Jan 12 15:05:31 2011 (r217310) @@ -1,14 +1,13 @@ FreeBSD Stopgap Installer ========================= Nathan Whitehorn -January 8, 2010 +January 12, 2010 This is designed to be a lightweight replacement for sysinstall until future installers show up, but more modular and easily extended. It is scriptable from shell scripts. The full installer can be run by executing bsdinstall auto, and is intended to be run from a live environment (e.g. a live CD or PXE boot). -bsdinstall must be in PATH. In addition to base tools, Thomas Dickey's new -dialog must be installed (devel/cdialog). +bsdinstall must be in PATH. Status: - Installs working, bootable systems on powerpc, amd64, i386, and sparc64 Modified: user/nwhitehorn/bsdinstall/distextract/Makefile ============================================================================== --- user/nwhitehorn/bsdinstall/distextract/Makefile Wed Jan 12 14:55:02 2011 (r217309) +++ user/nwhitehorn/bsdinstall/distextract/Makefile Wed Jan 12 15:05:31 2011 (r217310) @@ -2,8 +2,7 @@ BINDIR= /usr/libexec/bsdinstall PROG= distextract -LDADD= -larchive -lncursesw -L/usr/local/lib -lcdialog -lm -CFLAGS= -I/usr/local/include +LDADD= -larchive -lncursesw -ldialog -lm WARNS?= 6 NO_MAN= true Modified: user/nwhitehorn/bsdinstall/distextract/distextract.c ============================================================================== --- user/nwhitehorn/bsdinstall/distextract/distextract.c Wed Jan 12 14:55:02 2011 (r217309) +++ user/nwhitehorn/bsdinstall/distextract/distextract.c Wed Jan 12 15:05:31 2011 (r217310) @@ -2,7 +2,7 @@ #include <errno.h> #include <limits.h> #include <archive.h> -#include <cdialog/dialog.h> +#include <dialog.h> static int extract_files(int nfiles, const char **files); @@ -47,6 +47,7 @@ extract_files(int nfiles, const char **f int i, err, progress, last_progress; err = 0; + progress = 0; /* Make the transfer list for dialog */ for (i = 0; i < nfiles; i++) { Modified: user/nwhitehorn/bsdinstall/distfetch/Makefile ============================================================================== --- user/nwhitehorn/bsdinstall/distfetch/Makefile Wed Jan 12 14:55:02 2011 (r217309) +++ user/nwhitehorn/bsdinstall/distfetch/Makefile Wed Jan 12 15:05:31 2011 (r217310) @@ -2,8 +2,7 @@ BINDIR= /usr/libexec/bsdinstall PROG= distfetch -LDADD= -lfetch -lncursesw -L/usr/local/lib -lcdialog -lm -CFLAGS= -I/usr/local/include +LDADD= -lfetch -lncursesw -ldialog -lm WARNS?= 6 NO_MAN= true Modified: user/nwhitehorn/bsdinstall/distfetch/distfetch.c ============================================================================== --- user/nwhitehorn/bsdinstall/distfetch/distfetch.c Wed Jan 12 14:55:02 2011 (r217309) +++ user/nwhitehorn/bsdinstall/distfetch/distfetch.c Wed Jan 12 15:05:31 2011 (r217310) @@ -2,7 +2,7 @@ #include <stdio.h> #include <errno.h> #include <fetch.h> -#include <cdialog/dialog.h> +#include <dialog.h> static int fetch_files(int nfiles, char **urls); @@ -31,6 +31,8 @@ main(void) for (i = 0; i < ndists; i++) free(urls[i]); free(urls); + + return (retval); } static int @@ -45,6 +47,8 @@ fetch_files(int nfiles, char **urls) uint8_t block[4096]; size_t chunk, fsize; int i, progress, last_progress; + + progress = 0; /* Make the transfer list for dialog */ items = calloc(sizeof(char *), nfiles * 2); Modified: user/nwhitehorn/bsdinstall/partedit/Makefile ============================================================================== --- user/nwhitehorn/bsdinstall/partedit/Makefile Wed Jan 12 14:55:02 2011 (r217309) +++ user/nwhitehorn/bsdinstall/partedit/Makefile Wed Jan 12 15:05:31 2011 (r217310) @@ -2,8 +2,7 @@ BINDIR= /usr/libexec/bsdinstall PROG= partedit -LDADD= -lgeom -lncursesw -lutil -L/usr/local/lib -lcdialog -lm -CFLAGS= -I/usr/local/include +LDADD= -lgeom -lncursesw -lutil -ldialog -lm PARTEDIT_ARCH= ${MACHINE} .if ${MACHINE} == "i386" || ${MACHINE} == "amd64" Modified: user/nwhitehorn/bsdinstall/partedit/diskeditor.c ============================================================================== --- user/nwhitehorn/bsdinstall/partedit/diskeditor.c Wed Jan 12 14:55:02 2011 (r217309) +++ user/nwhitehorn/bsdinstall/partedit/diskeditor.c Wed Jan 12 15:05:31 2011 (r217310) @@ -1,8 +1,8 @@ #include <stdio.h> #include <unistd.h> #include <libutil.h> -#include <cdialog/dialog.h> -#include <cdialog/dlg_keys.h> +#include <dialog.h> +#include <dlg_keys.h> #include "diskeditor.h" Modified: user/nwhitehorn/bsdinstall/partedit/gpart_ops.c ============================================================================== --- user/nwhitehorn/bsdinstall/partedit/gpart_ops.c Wed Jan 12 14:55:02 2011 (r217309) +++ user/nwhitehorn/bsdinstall/partedit/gpart_ops.c Wed Jan 12 15:05:31 2011 (r217310) @@ -4,8 +4,8 @@ #include <inttypes.h> #include <libgeom.h> -#include <cdialog/dialog.h> -#include <cdialog/dlg_keys.h> +#include <dialog.h> +#include <dlg_keys.h> #include "partedit.h" Modified: user/nwhitehorn/bsdinstall/partedit/partedit.c ============================================================================== --- user/nwhitehorn/bsdinstall/partedit/partedit.c Wed Jan 12 14:55:02 2011 (r217309) +++ user/nwhitehorn/bsdinstall/partedit/partedit.c Wed Jan 12 15:05:31 2011 (r217310) @@ -5,8 +5,8 @@ #include <fstab.h> #include <libgeom.h> -#include <cdialog/dialog.h> -#include <cdialog/dlg_keys.h> +#include <dialog.h> +#include <dlg_keys.h> #include "diskeditor.h" #include "partedit.h" Modified: user/nwhitehorn/bsdinstall/release/testsystem.sh ============================================================================== --- user/nwhitehorn/bsdinstall/release/testsystem.sh Wed Jan 12 14:55:02 2011 (r217309) +++ user/nwhitehorn/bsdinstall/release/testsystem.sh Wed Jan 12 15:05:31 2011 (r217310) @@ -41,7 +41,4 @@ ln -s /tmp/bsdinstall_etc/resolv.conf $1 echo kernel_options=\"-C\" > $1/boot/loader.conf echo sendmail_enable=\"NONE\" > $1/etc/rc.conf -# cdialog is not called dialog yet, except here -ln -s /usr/bin/dialog $1/usr/bin/cdialog - #mkisoimages.sh -b FreeBSD_Install $3 $1 Modified: user/nwhitehorn/bsdinstall/scripts/adduser ============================================================================== --- user/nwhitehorn/bsdinstall/scripts/adduser Wed Jan 12 14:55:02 2011 (r217309) +++ user/nwhitehorn/bsdinstall/scripts/adduser Wed Jan 12 15:05:31 2011 (r217310) @@ -1,6 +1,6 @@ #!/bin/sh -cdialog --backtitle "FreeBSD Installer" --title "Add User Accounts" --yesno \ +dialog --backtitle "FreeBSD Installer" --title "Add User Accounts" --yesno \ "Would you like to add users to the installed system now?" 0 0 if [ $? -eq 0 ]; then Modified: user/nwhitehorn/bsdinstall/scripts/auto ============================================================================== --- user/nwhitehorn/bsdinstall/scripts/auto Wed Jan 12 14:55:02 2011 (r217309) +++ user/nwhitehorn/bsdinstall/scripts/auto Wed Jan 12 15:05:31 2011 (r217310) @@ -3,7 +3,7 @@ echo "Begun Installation at $(date)" > $BSDINSTALL_LOG error() { - cdialog --backtitle "FreeBSD Installer" --title "Abort" \ + dialog --backtitle "FreeBSD Installer" --title "Abort" \ --no-label "Exit" --yes-label "Restart" --yesno \ "You have canceled an installation step. Would you like to restart the installation or exit the installer?" 0 0 if [ $? -ne 0 ]; then @@ -28,7 +28,7 @@ for dist in $DISTRIBUTIONS; do done if [ ! -z "$FETCH_DISTRIBUTIONS" ]; then - cdialog --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 + 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 @@ -58,7 +58,7 @@ bsdinstall adduser trap error SIGINT # SIGINT is bad again bsdinstall config || error -cdialog --backtitle "FreeBSD Installer" --title "Complete" --msgbox "Installation of FreeBSD complete!" 0 0 +dialog --backtitle "FreeBSD Installer" --title "Complete" --msgbox "Installation of FreeBSD complete!" 0 0 echo "Installation Completed at $(date)" >> $BSDINSTALL_LOG Modified: user/nwhitehorn/bsdinstall/scripts/hostname ============================================================================== --- user/nwhitehorn/bsdinstall/scripts/hostname Wed Jan 12 14:55:02 2011 (r217309) +++ user/nwhitehorn/bsdinstall/scripts/hostname Wed Jan 12 15:05:31 2011 (r217310) @@ -8,7 +8,7 @@ : ${DIALOG_ESC=255} exec 3>&1 -HOSTNAME=`cdialog --backtitle 'FreeBSD Installer' --title 'Set Hostname' --nocancel --inputbox \ +HOSTNAME=`dialog --backtitle 'FreeBSD Installer' --title 'Set Hostname' --nocancel --inputbox \ 'Please choose a hostname for this machine. If you are running on a managed network, please ask your network administrator for an appropriate name.' \ Modified: user/nwhitehorn/bsdinstall/scripts/mount ============================================================================== --- user/nwhitehorn/bsdinstall/scripts/mount Wed Jan 12 14:55:02 2011 (r217309) +++ user/nwhitehorn/bsdinstall/scripts/mount Wed Jan 12 15:05:31 2011 (r217310) @@ -18,7 +18,7 @@ for i in $FILESYSTEMS; do mkdir -p $i 2>/dev/null MNTERROR=`mount -F $TMP_FSTAB $i 2>&1` if [ $? -ne 0 ]; then - cdialog --backtitle "FreeBSD Installer" --title "Error" \ + dialog --backtitle "FreeBSD Installer" --title "Error" \ --msgbox "Error mounting partition $i:\n$MNTERROR" 0 0 exit 1 fi Modified: user/nwhitehorn/bsdinstall/scripts/netconfig ============================================================================== --- user/nwhitehorn/bsdinstall/scripts/netconfig Wed Jan 12 14:55:02 2011 (r217309) +++ user/nwhitehorn/bsdinstall/scripts/netconfig Wed Jan 12 15:05:31 2011 (r217310) @@ -19,19 +19,19 @@ for IF in `ifconfig -l`; do done exec 3>&1 -INTERFACE=`echo $DIALOG_TAGS | xargs cdialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' --menu 'Please select a network interface to configure:' 0 0 0 2>&1 1>&3` +INTERFACE=`echo $DIALOG_TAGS | xargs dialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' --menu 'Please select a network interface to configure:' 0 0 0 2>&1 1>&3` if [ $? -eq $DIALOG_CANCEL ]; then exit 1; fi exec 3>&- -cdialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' --yesno 'Would you like to use DHCP to configure this interface?' 0 0 +dialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' --yesno 'Would you like to use DHCP to configure this interface?' 0 0 if [ $? -eq $DIALOG_OK ]; then echo ifconfig_$INTERFACE=\"DHCP\" >> $BSDINSTALL_TMPETC/rc.conf if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then - cdialog --backtitle 'FreeBSD Installer' --infobox "Acquiring DHCP lease..." 0 0 + dialog --backtitle 'FreeBSD Installer' --infobox "Acquiring DHCP lease..." 0 0 dhclient $INTERFACE 2>> $BSDINSTALL_LOG if [ $? -ne 0 ]; then - cdialog --backtitle 'FreeBSD Installer' --msgbox "DHCP lease acquisition failed." 0 0 + dialog --backtitle 'FreeBSD Installer' --msgbox "DHCP lease acquisition failed." 0 0 exec $0 fi fi @@ -43,7 +43,7 @@ NETMASK=`ifconfig $INTERFACE inet | awk ROUTER=`netstat -rn -f inet | awk '/default/ {printf("%s\n", $2);}'` exec 3>&1 -IF_CONFIG=$(cdialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' --form 'Static Network Interface Configuration' 0 0 0 \ +IF_CONFIG=$(dialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' --form 'Static Network Interface Configuration' 0 0 0 \ 'IP Address' 1 0 "$IP_ADDRESS" 1 20 16 0 \ 'Subnet Mask' 2 0 "$NETMASK" 2 20 16 0 \ 'Default Router' 3 0 "$ROUTER" 3 20 16 0 \ Modified: user/nwhitehorn/bsdinstall/scripts/services ============================================================================== --- user/nwhitehorn/bsdinstall/scripts/services Wed Jan 12 14:55:02 2011 (r217309) +++ user/nwhitehorn/bsdinstall/scripts/services Wed Jan 12 15:05:31 2011 (r217310) @@ -1,7 +1,7 @@ #!/bin/sh exec 3>&1 -DAEMONS=$(cdialog --backtitle "FreeBSD Installer" \ +DAEMONS=$(dialog --backtitle "FreeBSD Installer" \ --title "System Configuration" --nocancel --separate-output \ --checklist "Choose the services you would like to be started at boot:" \ 0 0 0 \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101121505.p0CF5VjG092968>