Index: stable/4/release/boot_crunch.conf.generic =================================================================== --- stable/4/release/boot_crunch.conf.generic (revision 62574) +++ stable/4/release/boot_crunch.conf.generic (nonexistent) @@ -1,22 +0,0 @@ -# $FreeBSD$ - -srcdirs /usr/src/bin /usr/src/sbin /usr/src/release /usr/src/usr.bin -srcdirs /usr/src/gnu/usr.bin /usr/src/usr.sbin /usr/src/sbin/i386 -srcdirs /usr/src/usr.sbin/pccard - -progs sh find sed test rm -progs pwd ppp -progs sysinstall newfs minigzip cpio fsck ifconfig route slattach -progs mount_nfs -progs dhclient arp hostname -progs pccardc pccardd -progs usbd usbdevs -ln minigzip gzip -ln minigzip gunzip -ln minigzip zcat -ln sh -sh -ln test [ -ln newfs mount_mfs - -libs -ll -ledit -lutil -lkvm -lmd -lcrypt -lftpio -lz -lnetgraph -libs -ldialog -lncurses -lmytinfo -L/usr/src/release/libdisk/obj -ldisk -lipx Property changes on: stable/4/release/boot_crunch.conf.generic ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/4/release/Makefile =================================================================== --- stable/4/release/Makefile (revision 62574) +++ stable/4/release/Makefile (revision 62575) @@ -1,790 +1,802 @@ # $FreeBSD$ # # make release CHROOTDIR=/some/dir BUILDNAME=somename [ RELEASETAG=tag ] # # Where "/some/dir" is the pathname of a directory on a some # filesystem with at least 1000MB of free space, "somename" is what # you want the release to call itself and, optionally, which CVS "tag" # name should be used when checking out the sources to build the release # (default is HEAD). # # Please note: the vn driver must also be compiled into your kernel, # otherwise the target 'release.8' and possibly others will fail. # # Set these, release builder! # # Fixed version: #BUILDNAME=4.0-RELEASE # # Automatic SNAP versioning: DATE != date +%Y%m%d BASE = 4.0 BUILDNAME?=${BASE}-${DATE}-SNAP # #CHROOTDIR=/junk/release # If this is a -stable snapshot, then set #RELEASETAG=RELENG_4 # # Non-zero if ${RELEASETAG} is in the form "RELENG_ver_RELEASE"; we # are building an official release. Otherwise, we are building for # a branch. .if defined(RELEASETAG) ISRELEASE!= expr ${RELEASETAG} : '^RELENG_.*_RELEASE$$' || true .if ${ISRELEASE} != 0 # Convert "RELENG_ver_RELEASE" to "RELEASE_ver" for ports and doc trees. AUXRELEASETAG!= echo ${RELEASETAG} | sed -e 's/^RELENG_/RELEASE_/' -e 's/_RELEASE$$//' .endif .endif KERNCONF=GENERIC # If you are using a local CVS repository with components stored in # non-standard modules, override these on the make commandline or # in the environment. RELEASESRCMODULE?= src RELEASEDOCMODULE?= doc RELEASEPORTSMODULE?= ports # Unless set elsewhere, indicate the object format we'll be using. OBJFORMAT?= elf # Uncomment this to disable the doc.1 target. It is also an ERROR # to set NOPORTS and not set NODOC since docs depend on ports. #NODOC= YES #NOPORTS= YES # Comment the following if you want the release documentation to be # in English only. ALLLANG= yes DOCPORTS= textproc/docproj # Set this to wherever the distfiles required by ${DOCPORTS} live. DISTFILES?= ${.CURDIR}/../../ports/distfiles DIST_DOCS= ABOUT.TXT ERRATA.TXT LAYOUT.TXT README.TXT HARDWARE.TXT \ RELNOTES.TXT TROUBLE.TXT UPGRADE.TXT INSTALL.TXT # Things which without too much trouble can be considered variables # BIN_DISTS are special in that they get full /etc installation sets. # COMPAT_DISTS?= compat1x compat20 compat21 compat22 compat3x OTHER_DISTS?= manpages catpages games proflibs dict info doc CRYPTO_DISTS?= crypto krb4 krb5 BIN_DISTS?= bin DISTRIBUTIONS?= ${BIN_DISTS} ${OTHER_DISTS} ${COMPAT_DISTS} ${CRYPTO_DISTS} KERNELS?= GENERIC # Extra source tarballs; each argument is a pair of source dir and # distribution name. The dist name should not exceed 7 characters # (another "s" for "source" will be prepended). EXTRA_SRC+= usr.sbin/sendmail/cf smailcf BOOT1= etc/protocols etc/defaults/rc.conf # mountpoint for filesystems. MNT= /mnt # Various floppy image parameters. # +.if ${MACHINE} == "pc98" +BOOTSIZE= 1200 +FIXITSIZE= 1440 +MFSSIZE= 2880 +BOOTINODE= 80000 +FIXITINODE= 4000 +MFSINODE= 8000 +BOOTLABEL= fd1200 +FIXITLABEL= fd1440 +MFSLABEL= minimum2 +.else BOOTSIZE= 1440 FIXITSIZE= 1440 MFSSIZE= 2880 BIGBOOTSIZE= 2880 BOOTINODE= 80000 -MFSINODE= 8000 FIXITINODE= 4000 +MFSINODE= 8000 BOOTLABEL= fd1440 FIXITLABEL= fd1440 -BIGBOOTLABEL= minimum2 MFSLABEL= minimum2 +BIGBOOTLABEL= minimum2 +.endif # overrides. .if ${MACHINE_ARCH} == "alpha" FIXITSIZE= 2880 FIXITLABEL= minimum2 .endif ZIPNSPLIT= gzip --no-name -9 -c | split -b 240640 - VNDEVICE?= vn0 # Things which may get you into trouble if you change them MTREEFILES= ${.CURDIR}/../etc/mtree _R= /R RD= ${_R}/stage FD= ${_R}/ftp CD= ${_R}/cdrom CD_DISC1= ${CD}/disc1 CD_DISC2= ${CD}/disc2 # Where the bootstrap ports (see DOCPORTS) get installed. LOCALDIR= /usr/local/bin # ${BOOTSTRAPDIR} is for those utilities that refer to the hosting # environment, rather than the target environment. This is specifically # intended for kernel-dependent utilities that are used during the build. # # ${BOOTSTRAPDIR} is actually being used by prepending it to the normal # ${PATH}. Thus, it's also available to outside utilities like doFS.sh. BOOTSTRAPDIR= /bootstrap # # The mount subsystem has been changed between 2.2 and 3.0 by the # Lite2 import. BOOTSTRAPUTILS= /sbin/mount /sbin/umount # # 3.0 cpio tries to reference lchown(2) which is not available in 2.2 BOOTSTRAPUTILS+= /usr/bin/cpio .if !defined(CRUNCH_TARGETS) CRUNCH_TARGETS= boot fixit .endif -.if ${MACHINE_ARCH} == "i386" -# Make both PC-card boot.flp and plain boot.flp -EXTRAS= floppies cdrom.1 ftp.1 +.if ${MACHINE} == "pc98" +EXTRAS= ftp.1 .else EXTRAS= cdrom.1 ftp.1 .endif .if !defined(NODOC) DOCREL= doc.1 .endif rerelease release: .if !defined(CHROOTDIR) || !defined(BUILDNAME) || !defined(CVSROOT) @echo "To make a release you must set CHROOTDIR, BUILDNAME and CVSROOT" && false .endif .if make(release) .if exists(${CHROOTDIR}) # The first command will fail on a handful of files that have their schg # flags set. But it greatly speeds up the next two commands. -rm -rf ${CHROOTDIR} 2>/dev/null -chflags -R noschg ${CHROOTDIR}/. -rm -rf ${CHROOTDIR} .endif mkdir -p ${CHROOTDIR} cd ${.CURDIR}/../etc && ${MAKE} distrib-dirs DESTDIR=${CHROOTDIR} cd ${.CURDIR}/../etc && ${MAKE} distribution DESTDIR=${CHROOTDIR} if [ -f /etc/resolv.conf ]; then \ cp -p /etc/resolv.conf ${CHROOTDIR}/etc; \ fi cd ${.CURDIR}/.. && ${MAKE} installworld DESTDIR=${CHROOTDIR} NOMAN=1 mkdir ${CHROOTDIR}/${BOOTSTRAPDIR} for i in ${BOOTSTRAPUTILS} ; do \ cp -p ${CHROOTDIR}$$i ${CHROOTDIR}/${BOOTSTRAPDIR} ; \ done .if !defined(RELEASETAG) cd ${CHROOTDIR}/usr && rm -rf src && \ cvs -R -d ${CVSROOT} co -P ${RELEASESRCMODULE} .else cd ${CHROOTDIR}/usr && rm -rf src && \ cvs -R -d ${CVSROOT} co -P -r ${RELEASETAG} ${RELEASESRCMODULE} .endif .if defined(LOCAL_PATCHES) && exists(${LOCAL_PATCHES}) cd ${CHROOTDIR}/usr/src && patch ${PATCH_FLAGS} < ${LOCAL_PATCHES} .endif .if defined(LOCAL_SCRIPT) && exists(${LOCAL_SCRIPT}) cd ${CHROOTDIR} && env CHROOTDIR=${CHROOTDIR} BUILDNAME=${BUILDNAME} RELEASETAG=${RELEASETAG} ${LOCAL_SCRIPT} .endif .if !defined(NOPORTS) .if defined(AUXRELEASETAG) cd ${CHROOTDIR}/usr && rm -rf ports && cvs -R -d ${CVSROOT} co -P -r ${AUXRELEASETAG} ${RELEASEPORTSMODULE} && cd ports && make readmes PORTSDIR=${CHROOTDIR}/usr/ports .else cd ${CHROOTDIR}/usr && rm -rf ports && cvs -R -d ${CVSROOT} co -P ${RELEASEPORTSMODULE} && cd ports && make readmes PORTSDIR=${CHROOTDIR}/usr/ports .endif .endif .if !defined(NODOC) .if defined(AUXRELEASETAG) cd ${CHROOTDIR}/usr && rm -rf doc && cvs -R -d ${CVSROOT} co -P -r ${AUXRELEASETAG} ${RELEASEDOCMODULE} .else cd ${CHROOTDIR}/usr && rm -rf doc && cvs -R -d ${CVSROOT} co -P ${RELEASEDOCMODULE} .endif if [ -d ${DISTFILES}/ ]; then \ cp -rp ${DISTFILES} ${CHROOTDIR}/usr/ports/distfiles; \ fi .endif .endif .if make(rerelease) .if !defined(RELEASENOUPDATE) .if !defined(RELEASETAG) cd ${CHROOTDIR}/usr/src && cvs -R -q update -P -d .else cd ${CHROOTDIR}/usr/src && cvs -R -q update -P -d -r ${RELEASETAG} .endif .if !defined(NOPORTS) cd ${CHROOTDIR}/usr/ports && cvs -R -q update -P -d .endif .if !defined(NODOC) cd ${CHROOTDIR}/usr/doc && cvs -R -q update -P -d .endif .endif .endif # Add version information to those things that need it. ( cd ${CHROOTDIR}/usr/src/sys/conf && \ mv newvers.sh foo && \ sed "s/^RELEASE=.*/RELEASE=${BUILDNAME}/" foo > newvers.sh && rm foo ) echo OBJFORMAT=${OBJFORMAT} > ${CHROOTDIR}/etc/objformat -test -f install.cfg && cp install.cfg ${CHROOTDIR}/usr/src/release echo "#!/bin/sh" > ${CHROOTDIR}/mk echo "set -ex" >> ${CHROOTDIR}/mk echo "_RELTARGET=\$${1:-doRELEASE}" >> ${CHROOTDIR}/mk echo "export CFLAGS='-O -pipe'" >> ${CHROOTDIR}/mk echo "export DISTRIBUTIONS=\"${DISTRIBUTIONS}\"" >> ${CHROOTDIR}/mk echo "export BUILDNAME=${BUILDNAME}" >> ${CHROOTDIR}/mk echo "export VNDEVICE=${VNDEVICE}" >> ${CHROOTDIR}/mk echo "export OBJFORMAT=${OBJFORMAT}" >> ${CHROOTDIR}/mk .if defined(RELEASETAG) echo "export RELEASETAG=${RELEASETAG}" >> ${CHROOTDIR}/mk .endif .if defined(NOPORTS) echo "export NOPORTS=${NOPORTS}" >> ${CHROOTDIR}/mk .endif .if defined(NODOC) echo "export NODOC=${NODOC}" >> ${CHROOTDIR}/mk .endif .if defined(ALLLANG) echo "export ALLLANG=${ALLLANG}" >> ${CHROOTDIR}/mk .else echo "export DOC_LANG=en_US.ISO_8859-1" >> ${CHROOTDIR}/mk .endif .if defined(NOSRC) echo "export NOSRC=${NOSRC}" >> ${CHROOTDIR}/mk .endif .if defined(NOSHARED) echo "export NOSHARED=${NOSHARED}" >> ${CHROOTDIR}/mk .endif .if defined(USA_RESIDENT) echo "export USA_RESIDENT=${USA_RESIDENT}" >> ${CHROOTDIR}/mk .endif .if defined(BOOT_CONFIG) echo "export BOOT_CONFIG=\"${BOOT_CONFIG}\"">> ${CHROOTDIR}/mk .endif # Don't remove this, or the build will fall over! echo "export RELEASEDIR=${_R}" >> ${CHROOTDIR}/mk echo "export PATH=${BOOTSTRAPDIR}:$${PATH}:${LOCALDIR}" >> ${CHROOTDIR}/mk echo "if [ ! -f /tmp/.world_done ]; then" >> ${CHROOTDIR}/mk echo " cd /usr/src" >> ${CHROOTDIR}/mk .if make(release) echo " (cd etc; make distrib-dirs distribution)" >> ${CHROOTDIR}/mk echo " make world" >> ${CHROOTDIR}/mk .endif .if make(rerelease) echo " make all install" >> ${CHROOTDIR}/mk .endif echo " touch /tmp/.world_done" >> ${CHROOTDIR}/mk echo "fi" >> ${CHROOTDIR}/mk echo "cd /usr/src/release/sysinstall" >> ${CHROOTDIR}/mk echo "make obj" >> ${CHROOTDIR}/mk echo "cd /usr/src/release" >> ${CHROOTDIR}/mk echo "make \$${_RELTARGET}" >> ${CHROOTDIR}/mk echo "echo make ${.TARGET} Finished" >> ${CHROOTDIR}/mk chmod 755 ${CHROOTDIR}/mk chroot ${CHROOTDIR} /mk clean: - rm -rf boot_crunch ${.OBJDIR}/boot_crunch.conf release.[0-9] + rm -rf boot_crunch release.[0-9] # Clean out ${_R} and make the directory structure. release.1: mkdir -p ${_R} -rm -rf ${_R}/* 2> /dev/null -chflags -R noschg ${_R}/. rm -rf ${_R}/* mkdir ${RD} mkdir ${RD}/floppies mkdir ${RD}/trees mkdir ${RD}/dists mkdir ${RD}/kernels for i in ${DISTRIBUTIONS} ; do \ mkdir ${RD}/trees/$$i && \ mkdir ${RD}/dists/$$i && \ mtree -deU -f ${MTREEFILES}/BSD.root.dist \ -p ${RD}/trees/$$i > /dev/null && \ mtree -deU -f ${MTREEFILES}/BSD.usr.dist \ -p ${RD}/trees/$$i/usr > /dev/null && \ mtree -deU -f ${MTREEFILES}/BSD.include.dist \ -p ${RD}/trees/$$i/usr/include > /dev/null && \ mtree -deU -f ${MTREEFILES}/BSD.var.dist \ -p ${RD}/trees/$$i/var > /dev/null ; \ done touch release.1 # Install the system into the various distributions. release.2: cd ${.CURDIR}/../etc && make distrib-dirs DESTDIR=${RD}/trees/bin cd ${.CURDIR}/.. && make distribute DISTDIR=${RD}/trees .if exists(${.CURDIR}/../kerberosIV) && exists(${.CURDIR}/../crypto) && !defined(NOKERBEROS) cd ${.CURDIR}/../kerberosIV && ( \ make bootstrap &&\ make obj all help-distribute DISTDIR=${RD}/trees &&\ make kprog \ ) .endif .if exists(${.CURDIR}/../kerberos5) && exists(${.CURDIR}/../crypto) && !defined(NOKERBEROS) cd ${.CURDIR}/../kerberos5 && ( \ make bootstrap &&\ make obj all help-distribute DISTDIR=${RD}/trees &&\ make kprog \ ) .endif -chflags -R noschg ${RD}/trees touch release.2 # Make and install the generic kernel(s). release.3: .for kernel in ${KERNELS} rm -f ${RD}/kernels/${kernel} rm -rf ${.CURDIR}/../sys/compile/${kernel} cd ${.CURDIR} && ${MAKE} doKERNEL KERNEL=${kernel} rm -rf ${.CURDIR}/../sys/compile/${kernel} ln -f ${RD}/kernels/${kernel} ${RD}/trees/bin/kernel.${kernel} .endfor touch release.3 # Make and install the three crunched binaries which live on the floppies. # You are not supposed to like this :-) # # NB: the "RELEASE_BUILD_FIXIT" magic prevents vi from including the # Tcl and Perl APIs. See also /usr/src/usr.bin/vi/Makefile. release.4: @mkdir -p /stand - cp ${.CURDIR}/boot_crunch.conf.generic ${.OBJDIR}/boot_crunch.conf cd ${.CURDIR}/sysinstall && make obj depend all install rm -rf ${RD}/crunch mkdir -p ${RD}/crunch export RELEASE_BUILD_FIXIT=noway ; \ for j in ${CRUNCH_TARGETS} ; do \ rm -rf $${j}_crunch && \ mkdir $${j}_crunch && \ ( cd $${j}_crunch && \ - ( ( [ -f ${.CURDIR}/$${j}_crunch.conf ] && \ - crunchgen ${.CURDIR}/$${j}_crunch.conf ) || \ - ( [ -f ${.OBJDIR}/$${j}_crunch.conf ] && \ - crunchgen ${.OBJDIR}/$${j}_crunch.conf ) ) && \ + ( ( [ -f ${.CURDIR}/${MACHINE}/$${j}_crunch.conf ] && \ + crunchgen ${.CURDIR}/${MACHINE}/$${j}_crunch.conf ) || \ + ( crunchgen ${.CURDIR}/$${j}_crunch.conf ) ) && \ ${MAKE} -DRELEASE_CRUNCH -f $${j}_crunch.mk subclean all \ NOCRYPT=yes "CFLAGS=${CFLAGS} -DCRUNCHED_BINARY") && \ mv $${j}_crunch/$${j}_crunch ${RD}/crunch/$${j} && \ true || { rm -rf $${j}_crunch ; false ; } ; \ done touch release.4 # # --==## Fix up the distributions. ##==-- # release.5: # Handle some grief caused by the munition braindeadness. for i in sbin/init bin/ed usr.sbin/ppp usr.sbin/pppd ; do \ ( cd ${.CURDIR}/../$$i; \ make -DNOCRYPT clean all distribute DISTDIR=${RD}/trees ) ; \ done # Create any "synthetic dists" now. @for i in ${DISTRIBUTIONS}; do \ if [ -f ${.CURDIR}/scripts/$${i}-make.sh ]; then \ echo -n "Running $$i dist creation script... "; \ env OBJFORMAT=${OBJFORMAT} RD=${RD} sh ${.CURDIR}/scripts/$${i}-make.sh || echo "$$i distribution script returned bad status."; \ echo "Done."; \ fi \ done \ # Create symlinks for the MD5-based crypt lib, too. The # automatically created links still point to the DES stuff, # which went into its own distribution. for i in ${RD}/trees/bin/usr/lib/libscrypt* ; do \ c=`echo $$i | sed -e 's/libscrypt/libcrypt/'` ; \ rm -f $$c ; \ ln -s `basename $$i` $$c ; \ done # Remove all the directories we don't need. -cd ${RD}/trees && \ find ${OTHER_DISTS} ${COMPAT_DISTS} ${CRYPTO_DISTS} -depth -type d -print | xargs rmdir touch release.5 # # --==## Package up the tarballs from assembled trees ##==-- # release.6: rm -rf ${RD}/dists mkdir -p ${RD}/dists @for i in ${DISTRIBUTIONS} ; \ do \ if [ -d ${RD}/trees/$${i} ] ; then \ cd ${.CURDIR} && $(MAKE) doTARBALL \ SD=${RD}/trees/$${i} \ TN=$$i TD=$$i ARG="." && \ echo "$${i} distribution is finished."; \ fi ; \ done # More munition braindeadness. ( cd ${RD}/dists && \ if [ -f krb4/krb4.aa ] ; then mv krb4/* crypto && rmdir krb4 ; fi ) ( cd ${RD}/dists && \ if [ -f krb5/krb5.aa ] ; then mv krb5/* crypto && rmdir krb5 ; fi ) touch release.6 # # --==## Make source dists ##==-- # release.7: .if !defined(NOSRC) @cd ${.CURDIR} && $(MAKE) doTARBALL SD=/usr/src \ TD=src TN=sbase ARG="[A-Z]*" @for i in `cd /usr/src && echo [a-z]*` ; do \ if [ -d /usr/src/$$i ] ; then \ cd ${.CURDIR} && $(MAKE) doTARBALL \ TN=`echo s$$i | tr -d '.' | \ sed -e 's/usr/u/' \ -e 's/kerberosIV/krb4/' \ -e 's/kerberos5/krb5/'` \ SD=/usr/src TD=src ARG="$$i" ; \ fi ; \ done .if defined(EXTRA_SRC) @set ${EXTRA_SRC} && \ while [ $$# -ge 2 ] ; do \ if [ -d /usr/src/$$1 ] ; then \ cd ${.CURDIR} && $(MAKE) doTARBALL \ SD=/usr/src TN="s$$2" TD=src ARG="$$1" ; \ fi && shift && shift ; \ done .endif if [ -d ${RD}/dists/crypto ] ; then ( cd ${RD}/dists/src && \ if [ -f ssecure.aa ] ; then mv ssecure.* ../crypto ; fi && \ if [ -f scrypto.aa ] ; then mv scrypto.* ../crypto ; fi && \ if [ -f skrb4.aa ] ; then mv skrb4.* ../crypto ; fi && \ if [ -f skrb5.aa ] ; then mv skrb5.* ../crypto ; fi ; ) ; fi @echo "src distribution is finished." .endif touch release.7 # Complete the bootfd # # Now, just to get this picture down once and for all: # # +------------------------------------------------------------------------+ # |boot.flp | # +-----+-----+------------------------------------------------------------+ # |boot1|boot2|floppy filesystem "bootfd" | # +-----+-----+-+--------------------------------------------------------+-+ # |kernel | # +------------+-----------------------------------------+-+ # |mfs filesystem "mfsfd" | # +-----------------------------------------+ # release.8: write_mfs_in_kernel rm -rf ${RD}/mfsfd mkdir ${RD}/mfsfd cd ${RD}/mfsfd && \ mkdir -p etc/defaults dev mnt stand/help @cd ${.CURDIR} && $(MAKE) installCRUNCH CRUNCH=boot \ DIR=${RD}/mfsfd/stand ZIP=false ( cd ${RD}/trees/bin/dev && \ ls console tty bpf0 ttyv0 ttyv1 ttyv2 ttyv3 null zero card0 card1 card2 card3 usb usb0 uhid0 ums0 ulpt0 ugen0 kbd0 | \ cpio -dump ${RD}/mfsfd/dev ) ( cd ${RD}/mfsfd/dev && rm -f *[swo]d*[bdefgh] ) ( cd ${RD}/mfsfd && mkdir -p bin sbin && ln -s /stand/sh bin/sh ) cp /sbin/dhclient-script ${RD}/mfsfd/sbin cp ${.CURDIR}/../etc/defaults/pccard.conf ${RD}/mfsfd/etc/defaults/pccard.conf cp ${.CURDIR}/../etc/usbd.conf ${RD}/mfsfd/etc/usbd.conf cd ${RD}/trees/bin && ls ${BOOT1} | cpio -dump ${RD}/mfsfd/stand echo "nameserver 42/tcp name" > ${RD}/mfsfd/stand/etc/services echo "ftp 21/tcp" >> ${RD}/mfsfd/stand/etc/services echo "domain 53/tcp nameserver" >> ${RD}/mfsfd/stand/etc/services echo "domain 53/udp nameserver" >> ${RD}/mfsfd/stand/etc/services echo "cmd 514/tcp shell" >> ${RD}/mfsfd/stand/etc/services gzip -9c ${.CURDIR}/../COPYRIGHT > ${RD}/mfsfd/stand/help/COPYRIGHT.hlp.gz @for i in README.TXT RELNOTES.TXT INSTALL.TXT UPGRADE.TXT HARDWARE.TXT; do \ if [ -f ${.CURDIR}/texts/${MACHINE_ARCH}/$${i} ]; then \ gzip -9c ${.CURDIR}/texts/${MACHINE_ARCH}/$${i} > ${RD}/mfsfd/stand/help/$${i}.gz; \ else \ gzip -9c ${.CURDIR}/texts/$${i} > ${RD}/mfsfd/stand/help/$${i}.gz; \ fi; \ done -test -f ${.CURDIR}/install.cfg && cp ${.CURDIR}/install.cfg ${RD}/mfsfd @mkdir -p ${RD}/mfsfd/boot @cp /boot/boot* ${RD}/mfsfd/boot @cp /boot/loader.help ${RD}/mfsfd/boot @echo "Making the regular boot floppy." @tar --exclude CVS -cf - -C ${.CURDIR}/sysinstall help | \ tar xf - -C ${RD}/mfsfd/stand @echo "Compressing doc files..." @gzip -9 ${RD}/mfsfd/stand/help/*.hlp sh -e ${.CURDIR}/scripts/doFS.sh -s mfsroot ${RD} ${MNT} \ ${MFSSIZE} ${RD}/mfsfd ${MFSINODE} ${MFSLABEL} @gzip -9vc mfsroot > mfsroot.gz @sh -e ${.CURDIR}/scripts/doFS.sh ${RD}/floppies/mfsroot.flp \ ${RD} ${MNT} ${BOOTSIZE} mfsroot.gz ${BOOTINODE} ${BOOTLABEL} @cd ${.CURDIR} && ${MAKE} doMFSKERN FSIMAGE=kern +.if ${MACHINE} != "pc98" @cd ${.CURDIR} && ${MAKE} doMFSKERN FSIMAGE=boot BIGBOOT=YES +.endif @rm mfsroot mfsroot.gz mfsroot.size @echo "Regular and MFS boot floppies made." touch release.8 # # --==## Create a fixit floppy ##==-- # release.9: @echo "Making fixit floppy." @rm -rf ${RD}/fixitfd @mkdir ${RD}/fixitfd @cd ${RD}/fixitfd && \ mkdir -p dev stand bin sbin etc mnt mnt1 mnt2 mnt3 mnt4 tmp \ usr/share/misc @cd ${.CURDIR} && $(MAKE) installCRUNCH CRUNCH=fixit \ DIR=${RD}/fixitfd/stand ZIP=false @( cd ${RD}/fixitfd/dev && \ sed -e '/^PATH/s/^/#/' ${RD}/trees/bin/dev/MAKEDEV > MAKEDEV && \ chmod 755 MAKEDEV && \ sh MAKEDEV fixit ) @cp ${RD}/trees/bin/etc/spwd.db ${RD}/trees/bin/etc/group \ ${RD}/trees/bin/etc/protocols ${RD}/fixitfd/etc @cp ${RD}/trees/bin/usr/share/misc/scsi_modes \ ${RD}/fixitfd/usr/share/misc @cp ${.CURDIR}/fixit.profile ${RD}/fixitfd/.profile @cp ${.CURDIR}/fixit.services ${RD}/fixitfd/etc/services @cp ${.CURDIR}/scripts/tar.sh ${RD}/fixitfd/stand/tar @chmod 555 ${RD}/fixitfd/stand/tar @sh -e ${.CURDIR}/scripts/doFS.sh ${RD}/floppies/fixit.flp ${RD} \ ${MNT} ${FIXITSIZE} ${RD}/fixitfd ${FIXITINODE} ${FIXITLABEL} # Do our last minute floppies directory setup in a convenient place. @cp ${.CURDIR}/texts/FLOPPIES.TXT ${RD}/floppies/README.TXT @(cd ${RD}/floppies; md5 README.TXT *.flp > CHECKSUM.MD5) touch release.9 # # --==## Setup a suitable ftp-area ##==-- # ftp.1: @echo "Setting up FTP distribution area" @mkdir -p ${FD} -@ln -s . ${FD}/${BUILDNAME} @cd ${RD} && find floppies -print | cpio -dumpl ${FD} @cd ${RD}/dists && find . -print | cpio -dumpl ${FD} @for i in ${DIST_DOCS}; do \ if [ -f ${.CURDIR}/texts/$${i} ]; then \ cp ${.CURDIR}/texts/$${i} ${FD}; \ fi; \ if [ -f ${.CURDIR}/texts/${MACHINE_ARCH}/$${i} ]; then \ echo "=== Platform specifics for ${MACHINE_ARCH}" >> ${FD}/$${i}; \ cat ${.CURDIR}/texts/${MACHINE_ARCH}/$${i} >> ${FD}/$${i}; \ fi; \ done @echo "CD_VERSION = ${BUILDNAME}" > ${FD}/cdrom.inf .if !defined(NOPORTS) @tar --exclude CVS -cBf - -C ${CD_DISC1} ports | tar -xBf - -C ${FD} .endif # # --==## Setup a suitable cdrom-area ##==-- # cdrom.1: @echo "Setting up CDROM distribution area" @mkdir -p ${CD_DISC1} ${CD_DISC2} @cd ${RD} && find floppies -print | cpio -dumpl ${CD_DISC1} @cd ${RD}/dists && find . -print | cpio -dumpl ${CD_DISC1} @ln -f ${RD}/kernels/MFSKERNEL.boot ${CD_DISC1}/kernel @for i in ${DISTRIBUTIONS} ; \ do \ if [ -d ${RD}/trees/$${i} ] ; then \ chflags -R noschg ${RD}/trees/$${i} || true ; \ ( cd ${RD}/trees/$${i} && \ find . -depth -print | cpio -dumpl ${CD_DISC2} ) ; \ fi \ done @rm -f ${CD_DISC2}/.profile @cp ${.CURDIR}/fixit.profile ${CD_DISC2}/.profile @echo "CD_VERSION = ${BUILDNAME}" > ${CD_DISC1}/cdrom.inf @echo "CD_VERSION = ${BUILDNAME}" > ${CD_DISC2}/cdrom.inf @for i in ${DIST_DOCS}; do \ if [ -f ${.CURDIR}/texts/$${i} ]; then \ cp ${.CURDIR}/texts/$${i} ${CD_DISC1}; \ fi; \ if [ -f ${.CURDIR}/texts/${MACHINE_ARCH}/$${i} ]; then \ echo "=== Platform specifics for ${MACHINE_ARCH}" >> ${CD_DISC1}/$${i}; \ cat ${.CURDIR}/texts/${MACHINE_ARCH}/$${i} >> ${CD_DISC1}/$${i}; \ fi; \ done .if ${MACHINE_ARCH} == "alpha" @echo "Setting up Alpha CD disc1 for booting" @cp -Rp ${RD}/image.boot/boot ${CD_DISC1} @ln -f ${CD_DISC2}/boot/cdboot ${CD_DISC1}/boot @ln -f ${CD_DISC1}/boot/loader.rc ${CD_DISC2}/boot @ln -f ${CD_DISC1}/kernel ${CD_DISC2}/kernel .endif .if !defined(NOPORTS) @-rm -rf /usr/ports/distfiles/* @mkdir -p ${CD_DISC1}/ports && \ tar --exclude CVS -czf ${CD_DISC1}/ports/ports.tgz -C /usr ports && \ cp ${.CURDIR}/scripts/ports-install.sh ${CD_DISC1}/ports/install.sh \ && (cd ${CD_DISC1}/ports; md5 * > CHECKSUM.MD5) .endif doc.1: @echo "Making docs..." @for i in ${DOCPORTS}; do \ cd /usr/ports/$$i && make all install clean JADETEX=no FORCE_PKG_REGISTER=yes; \ done @cd /usr/doc && make all install 'FORMATS=html html-split txt' INSTALL_COMPRESSED='' DOCDIR=${RD}/trees/bin/usr/share/doc touch doc.1 # Various "subroutine" and other supporting targets. # RD= # SD= # TD= # ARG= doTARBALL: .if !defined(SD) @echo "SD undefined in doTARBALL" && exit 1 .endif .if !defined(TD) @echo "TB undefined in doTARBALL" && exit 1 .endif .if !defined(ARG) @echo "ARG undefined in doTARBALL" && exit 1 .endif @rm -rf ${RD}/dists/${TD}/${TN}* @mkdir -p ${RD}/dists/${TD} @( cd ${SD} && \ tn=`echo ${TN} | tr '[A-Z]' '[a-z]' | cut -c1-8` && \ echo rolling ${TD}/$$tn tarball &&\ tar --exclude CVS --exclude obj --exclude BOOTMFS -cf - ${ARG} | \ ${ZIPNSPLIT} ${RD}/dists/${TD}/$$tn. && \ sh ${.CURDIR}/scripts/info.sh ${RD}/dists/${TD}/$$tn > \ ${RD}/dists/${TD}/$$tn.inf && \ if [ -f ${.CURDIR}/scripts/$${TD}-install.sh ]; then \ cp -p ${.CURDIR}/scripts/$${TD}-install.sh ${RD}/dists/${TD}/install.sh; \ fi && \ if [ "${SD}" != "/usr/src" ]; then \ mtree -c -i -p ${SD}/${ARG} \ -k gname,md5digest,mode,nlink,uname,size,link,type \ > ${RD}/dists/${TD}/$$tn.mtree ; \ else \ true; \ fi; \ (cd ${RD}/dists/${TD}; \ rm -f CHECKSUM.MD5; \ md5 * > CHECKSUM.MD5) \ ) doRELEASE: release.1 release.2 ${DOCREL} release.3 release.4 release.5 \ release.6 release.7 release.8 release.9 @cd ${.CURDIR} && ${MAKE} ${EXTRAS} @echo "Release done" floppies: @cd ${.CURDIR} && ${MAKE} boot.flp @cd ${.CURDIR} && ${MAKE} fixit.flp @cd ${RD} && find floppies -print | cpio -dumpl ${FD} boot.flp: @rm -f release.4 release.8 @cd ${.CURDIR} && ${MAKE} release.4 release.8 CRUNCH_TARGETS=boot fixit.flp: @rm -f release.4 release.9 @cd ${.CURDIR} && ${MAKE} release.4 release.9 CRUNCH_TARGETS=fixit write_mfs_in_kernel: ${.CURDIR}/write_mfs_in_kernel.c ${CC} ${CFLAGS} -o write_mfs_in_kernel ${.CURDIR}/write_mfs_in_kernel.c installCRUNCH: .if !defined(CRUNCH) @echo "CRUNCH undefined in installCRUNCH" && exit 1 .endif .if !defined(DIR) @echo "DIR undefined in installCRUNCH" && exit 1 .endif .if !defined(ZIP) @echo "ZIP undefined in installCRUNCH" && exit 1 .endif @if ${ZIP} ; then \ gzip -9 < ${RD}/crunch/${CRUNCH} > ${DIR}/${CRUNCH}_crunch ; \ else \ ln -f ${RD}/crunch/${CRUNCH} ${DIR}/${CRUNCH}_crunch ; \ fi @chmod 555 ${DIR}/${CRUNCH}_crunch - @if [ -f ${.OBJDIR}/${CRUNCH}_crunch.conf ] ; then \ - for i in `crunchgen -l ${.OBJDIR}/${CRUNCH}_crunch.conf` ; do \ + @if [ -f ${.CURDIR}/${MACHINE}/${CRUNCH}_crunch.conf ] ; then \ + for i in `crunchgen -l ${.CURDIR}/${MACHINE}/${CRUNCH}_crunch.conf` ; do \ ln -f ${DIR}/${CRUNCH}_crunch ${DIR}/$$i ; \ done \ else \ for i in `crunchgen -l ${.CURDIR}/${CRUNCH}_crunch.conf` ; do \ ln -f ${DIR}/${CRUNCH}_crunch ${DIR}/$$i ; \ done \ fi # # --==## Compile a kernel by name ${KERNEL} ##==-- # # We don't erase the sys/compile/${KERNEL} directory, since somebody # may want to reuse it (release.8 presently) # doKERNEL: @rm -f ${RD}/kernels/${KERNEL} - @cd ${.CURDIR}/../sys/${MACHINE_ARCH}/conf && config ${KERNEL} + @cd ${.CURDIR}/../sys/${MACHINE}/conf && config ${KERNEL} @cd ${.CURDIR}/../sys/compile/${KERNEL} && \ make depend && \ make ${KERNEL} && \ strip --strip-debug ${KERNEL} && \ cp ${KERNEL} ${RD}/kernels/${KERNEL} # # --==## Put a filesystem into a BOOTMFS kernel ##==-- # doMFSKERN: @echo "Running doMFSKERN for ${FSIMAGE}" @rm -f ${RD}/kernels/BOOTMFS.${FSIMAGE} - @cd ${.CURDIR}/../sys/${MACHINE_ARCH}/conf && \ + @cd ${.CURDIR}/../sys/${MACHINE}/conf && \ sh ${.CURDIR}/scripts/dokern.sh ${BIGBOOT} < ${KERNCONF} > BOOTMFS .if ${MACHINE_ARCH} == "i386" - @echo "options INTRO_USERCONFIG" >> ${.CURDIR}/../sys/i386/conf/BOOTMFS + @echo "options INTRO_USERCONFIG" >> \ + ${.CURDIR}/../sys/${MACHINE}/conf/BOOTMFS .endif .if defined(BIGBOOT) @echo "options \"MD_ROOT_SIZE=`cat mfsroot.size`\"" >> \ - ${.CURDIR}/../sys/${MACHINE_ARCH}/conf/BOOTMFS + ${.CURDIR}/../sys/${MACHINE}/conf/BOOTMFS .endif @cd ${.CURDIR} && ${MAKE} doKERNEL KERNEL=BOOTMFS @rm -rf ${RD}/image.${FSIMAGE} @mkdir ${RD}/image.${FSIMAGE} @strip ${RD}/kernels/BOOTMFS @cp ${RD}/kernels/BOOTMFS ${RD}/kernels/BOOTMFS.${FSIMAGE} mv ${RD}/kernels/BOOTMFS ${RD}/image.${FSIMAGE}/kernel @echo "Setting up /boot directory for ${FSIMAGE} floppy" @mkdir -p ${RD}/image.${FSIMAGE}/boot @cp /boot/boot[12] /boot/loader ${RD}/image.${FSIMAGE}/boot .if !defined(BIGBOOT) @echo "load /kernel" > ${RD}/image.${FSIMAGE}/boot/loader.rc @echo "echo \\007\\007" >> ${RD}/image.${FSIMAGE}/boot/loader.rc @echo "echo Please insert MFS root floppy and press enter:" >> ${RD}/image.${FSIMAGE}/boot/loader.rc @echo "read" >> ${RD}/image.${FSIMAGE}/boot/loader.rc @echo "load -t mfs_root /mfsroot" >> ${RD}/image.${FSIMAGE}/boot/loader.rc .endif @echo "echo \\007\\007" >> ${RD}/image.${FSIMAGE}/boot/loader.rc @echo "autoboot 10" >> ${RD}/image.${FSIMAGE}/boot/loader.rc @touch ${RD}/image.${FSIMAGE}/boot/loader.config .if ${MACHINE_ARCH} == "i386" @echo "-P" >> ${RD}/image.${FSIMAGE}/boot.config .endif .if defined(BIGBOOT) @echo "Writing MFS image into kernel for ${FSIMAGE} floppy" @./write_mfs_in_kernel ${RD}/image.${FSIMAGE}/kernel mfsroot @cp ${RD}/image.${FSIMAGE}/kernel ${RD}/kernels/MFSKERNEL.${FSIMAGE} .endif @gzip -9v ${RD}/image.${FSIMAGE}/kernel @touch ${RD}/image.${FSIMAGE}/kernel.config @rm -f ${RD}/floppies/${FSIMAGE}.flp .if defined(BIGBOOT) sh -e ${.CURDIR}/scripts/doFS.sh ${RD}/floppies/${FSIMAGE}.flp \ ${RD} ${MNT} ${BIGBOOTSIZE} ${RD}/image.${FSIMAGE} \ ${BOOTINODE} ${BIGBOOTLABEL} .else sh -e ${.CURDIR}/scripts/doFS.sh ${RD}/floppies/${FSIMAGE}.flp \ ${RD} ${MNT} ${BOOTSIZE} ${RD}/image.${FSIMAGE} \ ${BOOTINODE} ${BOOTLABEL} .endif @echo "Created ${RD}/floppies/${FSIMAGE}.flp" .include Index: stable/4/release/fixit_crunch.conf =================================================================== --- stable/4/release/fixit_crunch.conf (revision 62574) +++ stable/4/release/fixit_crunch.conf (revision 62575) @@ -1,38 +1,37 @@ # $FreeBSD$ # first, we list the source dirs that our programs reside in. These are # searched in order listed to find the dir containing each program. srcdirs /usr/src/bin /usr/src/sbin /usr/src/usr.bin /usr/src/usr.sbin srcdirs /usr/src/gnu/usr.bin /usr/src/usr.bin/vi -srcdirs /usr/src/sbin/i386 # second, we list all the programs we want to include in our crunched binary. # The order doesn't matter. Any program that needs hard links to it gets an # `ln' directive. # /bin stuff progs cat chmod chroot cp dd df echo expr kill ln ls mkdir progs mv rm rmdir sleep sync # /sbin stuff -progs chown clri disklabel dmesg fdisk +progs chown clri disklabel dmesg progs mknod mount reboot restore swapon umount progs mount_msdos mount_cd9660 ln restore rrestore ln chown chgrp # /usr/bin stuff progs ftp telnet vi grep ln vi view ln vi ex # finally, we specify the libraries to link in with our binary libs -lcrypt -ltelnet -lutil -ll -lm libs -lcurses -ltermcap -ledit -lgnuregex -lkvm -lz Index: stable/4/release/sysinstall/Makefile =================================================================== --- stable/4/release/sysinstall/Makefile (revision 62574) +++ stable/4/release/sysinstall/Makefile (revision 62575) @@ -1,87 +1,93 @@ PROG= sysinstall MAN8= sysinstall.8 BINDIR=/stand NOSHARED=YES CLEANFILES+= makedevs.c rtermcap rtermcap.tmp dumpnlist CLEANFILES+= keymap.tmp keymap.h .PATH: ${.CURDIR}/../disklabel ${.CURDIR}/../../usr.bin/cksum SRCS= anonFTP.c cdrom.c command.c config.c devices.c dhcp.c kget.c \ disks.c dispatch.c dist.c dmenu.c doc.c dos.c floppy.c \ ftp.c globals.c http.c index.c install.c installUpgrade.c keymap.c \ label.c lndir.c main.c makedevs.c media.c menus.c misc.c mouse.c \ msg.c network.c nfs.c options.c package.c pccard.c \ system.c tape.c tcpip.c termcap.c ufs.c usb.c user.c variable.c \ wizard.c keymap.h CFLAGS+= -Wall -I${.CURDIR}/../../gnu/lib/libdialog -I${.OBJDIR} CFLAGS+= -I${.CURDIR}/../../sys +.if ${MACHINE} == "pc98" +CFLAGS+= -DPC98 +.endif .if ${MACHINE_ARCH} != "i386" || defined(X_AS_PKG) CFLAGS+= -DX_AS_PKG .endif DPADD= ${LIBDIALOG} ${LIBNCURSES} ${LIBMYTINFO} ${LIBUTIL} ${LIBDISK} ${LIBFTPIO} LDADD= -ldialog -lncurses -lmytinfo -lutil -ldisk -lftpio makedevs.c: Makefile rtermcap keymap.h rm -f makedevs.tmp echo '#include ' > makedevs.tmp ./rtermcap ansi | \ file2c 'const char termcap_ansi[] = {' ',0};' \ >> makedevs.tmp + ./rtermcap cons25w | \ + file2c 'const char termcap_cons25w[] = {' ',0};' \ + >> makedevs.tmp ./rtermcap cons25 | \ file2c 'const char termcap_cons25[] = {' ',0};' \ >> makedevs.tmp ./rtermcap cons25-m | \ file2c 'const char termcap_cons25_m[] = {' ',0};' \ >> makedevs.tmp ./rtermcap cons25r | \ file2c 'const char termcap_cons25r[] = {' ',0};' \ >> makedevs.tmp ./rtermcap cons25r-m | \ file2c 'const char termcap_cons25r_m[] = {' ',0};' \ >> makedevs.tmp ./rtermcap cons25l1 | \ file2c 'const char termcap_cons25l1[] = {' ',0};' \ >> makedevs.tmp ./rtermcap cons25l1-m | \ file2c 'const char termcap_cons25l1_m[] = {' ',0};' \ >> makedevs.tmp ./rtermcap vt100 | \ file2c 'const char termcap_vt100[] = {' ',0};' \ >> makedevs.tmp -.if ${MACHINE_ARCH} != "alpha" +.if ${MACHINE} == "i386" file2c 'u_char boot0[] = {' '};' < /boot/boot0 >> makedevs.tmp file2c 'u_char mbr[] = {' '};' < /boot/mbr >> makedevs.tmp .endif mv makedevs.tmp makedevs.c rtermcap: ${.CURDIR}/rtermcap.c ${CC} -o rtermcap ${.CURDIR}/rtermcap.c -ltermcap KEYMAPS= be.iso br275.iso danish.iso finnish.iso fr.iso \ german.iso hr.iso hu.iso2.101keys it.iso icelandic.iso jp.106 \ norwegian.iso pl_PL.ISO_8859-2 pt.iso ru.koi8-r si.iso \ spanish.iso swedish.iso swissfrench.iso swissgerman.iso uk.iso \ us.dvorak us.iso keymap.h: rm -f keymap.tmp for map in ${KEYMAPS} ; do \ kbdcontrol -L $$map | \ sed -e '/^static accentmap_t/,$$d' >> keymap.tmp ; \ done echo "static struct keymapInfo keymapInfos[] = {" >> keymap.tmp for map in ${KEYMAPS} ; do \ echo -n ' { "'$$map'", ' >> keymap.tmp ; \ echo "&keymap_$$map }," | tr '[-.]' '_' >> keymap.tmp ; \ done ( echo " { 0 }"; echo "};" ; echo "" ) >> keymap.tmp mv keymap.tmp keymap.h .include Index: stable/4/release/sysinstall/devices.c =================================================================== --- stable/4/release/sysinstall/devices.c (revision 62574) +++ stable/4/release/sysinstall/devices.c (revision 62575) @@ -1,560 +1,566 @@ /* * The new sysinstall program. * * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * * $FreeBSD$ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer, * verbatim and that no modifications are made prior to this * point in the file. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * */ #include "sysinstall.h" #include #include #include #include #include #include #include #include #include #include #include #include #include /* how much to bias minor number for a given /dev/s slice */ #define SLICE_DELTA (0x10000) static Device *Devices[DEV_MAX]; static int numDevs; static struct _devname { DeviceType type; char *name; char *description; int major, minor, delta, max; char dev_type; } device_names[] = { { DEVICE_TYPE_CDROM, "cd%dc", "SCSI CDROM drive", 6, 2, 8, 4, 'b' }, { DEVICE_TYPE_CDROM, "mcd%da", "Mitsumi (old model) CDROM drive", 7, 0, 8, 4, 'b' }, { DEVICE_TYPE_CDROM, "scd%da", "Sony CDROM drive - CDU31/33A type", 16, 0, 8, 4, 'b' }, #ifdef notdef { DEVICE_TYPE_CDROM, "matcd%da", "Matsushita CDROM ('sound blaster' type)", 17, 0, 8, 4, 'b' }, #endif { DEVICE_TYPE_CDROM, "acd%dc", "ATAPI/IDE CDROM", 31, 2, 8, 4, 'b' }, { DEVICE_TYPE_TAPE, "rsa%d", "SCSI tape drive", 14, 0, 16, 4, 'c' }, { DEVICE_TYPE_TAPE, "rwt%d", "Wangtek tape drive", 10, 0, 1, 4, 'c' }, { DEVICE_TYPE_DISK, "da%d", "SCSI disk device", 4, 65538, 8, 16, 'b' }, { DEVICE_TYPE_DISK, "rda%d", "SCSI disk device", 13, 65538, 8, 16, 'c' }, { DEVICE_TYPE_DISK, "ad%d", "ATA/IDE disk device", 30, 65538, 8, 16, 'b' }, { DEVICE_TYPE_DISK, "rad%d", "ATA/IDE disk device", 116, 65538, 8, 16, 'c' }, { DEVICE_TYPE_DISK, "fla%d", "M-Systems DiskOnChip Flash device", 28, 65538, 8, 16, 'b' }, { DEVICE_TYPE_DISK, "rfla%d", "M-Systems DiskOnChip Flash devicee", 102, 65538, 8, 16, 'c' }, { DEVICE_TYPE_DISK, "afd%d", "ATAPI/IDE floppy device", 32, 65538, 8, 4, 'b' }, { DEVICE_TYPE_DISK, "rafd%d", "ATAPI/IDE floppy device", 118, 65538, 8, 4, 'c' }, { DEVICE_TYPE_DISK, "mlxd%d", "Mylex RAID disk", 27, 65538, 8, 4, 'b' }, { DEVICE_TYPE_DISK, "rmlxd%d", "Mylex RAID disk", 131, 65538, 8, 4, 'c' }, { DEVICE_TYPE_DISK, "amrd%d", "AMI MegaRAID drive", 35, 65538, 8, 4, 'b' }, { DEVICE_TYPE_DISK, "ramrd%d", "AMI MegaRAID drive", 133, 65538, 8, 4, 'c' }, { DEVICE_TYPE_DISK, "idad%d", "Compaq RAID array", 29, 65538, 8, 4, 'b' }, { DEVICE_TYPE_DISK, "ridad%d", "Compaq RAID array", 109, 65538, 8, 4, 'c' }, { DEVICE_TYPE_FLOPPY, "fd%d", "floppy drive unit A", 2, 0, 64, 4, 'b' }, { DEVICE_TYPE_FLOPPY, "worm%d", "SCSI optical disk / CDR", 23, 0, 1, 4, 'b' }, { DEVICE_TYPE_NETWORK, "aue", "ADMtek USB ethernet adapter" }, { DEVICE_TYPE_NETWORK, "cue", "CATC USB ethernet adapter" }, { DEVICE_TYPE_NETWORK, "fpa", "DEC DEFPA PCI FDDI card" }, { DEVICE_TYPE_NETWORK, "sr", "SDL T1/E1 sync serial PCI card" }, { DEVICE_TYPE_NETWORK, "cc3i", "SDL HSSI sync serial PCI card" }, { DEVICE_TYPE_NETWORK, "en", "Efficient Networks ATM PCI card" }, { DEVICE_TYPE_NETWORK, "dc", "DEC/Intel 21143 (and clones) PCI fast ethernet card" }, { DEVICE_TYPE_NETWORK, "de", "DEC DE435 PCI NIC or other DC21040-AA based card" }, { DEVICE_TYPE_NETWORK, "fxp", "Intel EtherExpress Pro/100B PCI Fast Ethernet card" }, { DEVICE_TYPE_NETWORK, "ed", "Novell NE1000/2000; 3C503; NE2000-compatible PCMCIA" }, { DEVICE_TYPE_NETWORK, "ep", "3Com 3C509 ethernet card/3C589 PCMCIA" }, { DEVICE_TYPE_NETWORK, "el", "3Com 3C501 ethernet card" }, { DEVICE_TYPE_NETWORK, "ex", "Intel EtherExpress Pro/10 ethernet card" }, { DEVICE_TYPE_NETWORK, "fe", "Fujitsu MB86960A/MB86965A ethernet card" }, { DEVICE_TYPE_NETWORK, "ie", "AT&T StarLAN 10 and EN100; 3Com 3C507; NI5210" }, { DEVICE_TYPE_NETWORK, "ix", "Intel Etherexpress ethernet card" }, { DEVICE_TYPE_NETWORK, "kue", "Kawasaki LSI USB ethernet adapter" }, { DEVICE_TYPE_NETWORK, "le", "DEC EtherWorks 2 or 3 ethernet card" }, { DEVICE_TYPE_NETWORK, "lnc", "Lance/PCnet (Isolan/Novell NE2100/NE32-VL) ethernet" }, { DEVICE_TYPE_NETWORK, "rl", "RealTek 8129/8139 PCI ethernet card" }, { DEVICE_TYPE_NETWORK, "sf", "Adaptec AIC-6915 PCI ethernet card" }, { DEVICE_TYPE_NETWORK, "sis", "SiS 900/SiS 7016 PCI ethernet card" }, { DEVICE_TYPE_NETWORK, "sn", "SMC/Megahertz ethernet card" }, { DEVICE_TYPE_NETWORK, "ste", "Sundance ST201 PCI ethernet card" }, { DEVICE_TYPE_NETWORK, "sk", "SysKonnect PCI gigabit ethernet card" }, { DEVICE_TYPE_NETWORK, "tx", "SMC 9432TX ethernet card" }, { DEVICE_TYPE_NETWORK, "ti", "Alteon Networks PCI gigabit ethernet card" }, { DEVICE_TYPE_NETWORK, "tl", "Texas Instruments ThunderLAN PCI ethernet card" }, { DEVICE_TYPE_NETWORK, "vr", "VIA VT3043/VT86C100A Rhine PCI ethernet card" }, { DEVICE_TYPE_NETWORK, "vx", "3COM 3c590 / 3c595 ethernet card" }, { DEVICE_TYPE_NETWORK, "wb", "Winbond W89C840F PCI ethernet card" }, { DEVICE_TYPE_NETWORK, "xl", "3COM 3c90x / 3c90xB PCI ethernet card" }, { DEVICE_TYPE_NETWORK, "cuaa%d", "%s on device %s (COM%d)", 28, 128, 1, 16, 'c' }, { DEVICE_TYPE_NETWORK, "lp", "Parallel Port IP (PLIP) peer connection" }, { DEVICE_TYPE_NETWORK, "lo", "Loop-back (local) network interface" }, +#ifdef PC98 + { DEVICE_TYPE_DISK, "wd%d", "IDE disk device", 3, 65538, 8, 16, 'c' }, + { DEVICE_TYPE_CDROM, "wcd%dc", "ATAPI IDE CDROM", 69, 2, 8, 4, 'c' }, + { DEVICE_TYPE_FLOPPY, "wfd%d", "ATAPI floppy drive unit A", 87, 0, 8, 4, 'c' }, + { DEVICE_TYPE_DISK, "wfd%d", "ATAPI floppy device", 87, 65538, 8, 4, 'c' }, +#endif { 0 }, }; Device * new_device(char *name) { Device *dev; dev = safe_malloc(sizeof(Device)); bzero(dev, sizeof(Device)); if (name) SAFE_STRCPY(dev->name, name); return dev; } /* Stubs for unimplemented strategy routines */ Boolean dummyInit(Device *dev) { return TRUE; } FILE * dummyGet(Device *dev, char *dist, Boolean probe) { return NULL; } void dummyShutdown(Device *dev) { return; } static int deviceTry(struct _devname dev, char *try, int i) { int fd; char unit[80]; mode_t m; dev_t d; int fail; snprintf(unit, sizeof unit, dev.name, i); snprintf(try, FILENAME_MAX, "/dev/%s", unit); if (isDebug()) msgDebug("deviceTry: attempting to open %s\n", try); fd = open(try, O_RDONLY); if (fd >= 0) { if (isDebug()) msgDebug("deviceTry: open of %s succeeded on first try.\n", try); return fd; } m = 0640; if (dev.dev_type == 'c') m |= S_IFCHR; else m |= S_IFBLK; d = makedev(dev.major, dev.minor + (i * dev.delta)); if (isDebug()) msgDebug("deviceTry: Making %s device for %s [%d, %d]\n", m & S_IFCHR ? "raw" : "block", try, dev.major, dev.minor + (i * dev.delta)); fail = mknod(try, m, d); fd = open(try, O_RDONLY); if (fd >= 0) { if (isDebug()) msgDebug("deviceTry: open of %s succeeded on second try.\n", try); return fd; } else if (!fail) (void)unlink(try); /* Don't try a "make-under" here since we're using a fixit floppy in this case */ snprintf(try, FILENAME_MAX, "/mnt/dev/%s", unit); fd = open(try, O_RDONLY); if (isDebug()) msgDebug("deviceTry: final attempt for %s returns %d\n", try, fd); return fd; } /* Register a new device in the devices array */ Device * deviceRegister(char *name, char *desc, char *devname, DeviceType type, Boolean enabled, Boolean (*init)(Device *), FILE * (*get)(Device *, char *, Boolean), void (*shutdown)(Device *), void *private) { Device *newdev = NULL; if (numDevs == DEV_MAX) msgFatal("Too many devices found!"); else { newdev = new_device(name); newdev->description = desc; newdev->devname = devname; newdev->type = type; newdev->enabled = enabled; newdev->init = init ? init : dummyInit; newdev->get = get ? get : dummyGet; newdev->shutdown = shutdown ? shutdown : dummyShutdown; newdev->private = private; Devices[numDevs] = newdev; Devices[++numDevs] = NULL; } return newdev; } /* Reset the registered device chain */ void deviceReset(void) { int i; for (i = 0; i < numDevs; i++) { Devices[i]->shutdown(Devices[i]); /* XXX this potentially leaks Devices[i]->private if it's being * used to point to something dynamic, but you're not supposed * to call this routine at such times that some open instance * has its private ptr pointing somewhere anyway. XXX */ free(Devices[i]); } Devices[numDevs = 0] = NULL; } /* Get all device information for devices we have attached */ void deviceGetAll(void) { int i, j, fd, s; struct ifconf ifc; struct ifreq *ifptr, *end; int ifflags; char buffer[INTERFACE_MAX * sizeof(struct ifreq)]; char **names; msgNotify("Probing devices, please wait (this can take a while)..."); /* First go for the network interfaces. Stolen shamelessly from ifconfig! */ ifc.ifc_len = sizeof(buffer); ifc.ifc_buf = buffer; s = socket(AF_INET, SOCK_DGRAM, 0); if (s < 0) goto skipif; /* Jump over network iface probing */ if (ioctl(s, SIOCGIFCONF, (char *) &ifc) < 0) goto skipif; /* Jump over network iface probing */ ifflags = ifc.ifc_req->ifr_flags; end = (struct ifreq *) (ifc.ifc_buf + ifc.ifc_len); for (ifptr = ifc.ifc_req; ifptr < end; ifptr++) { char *descr; /* If it's not a link entry, forget it */ if (ifptr->ifr_ifru.ifru_addr.sa_family != AF_LINK) goto loopend; /* Eliminate network devices that don't make sense */ if (!strncmp(ifptr->ifr_name, "lo", 2)) goto loopend; /* If we have a slip device, don't register it */ if (!strncmp(ifptr->ifr_name, "sl", 2)) { goto loopend; } /* And the same for ppp */ if (!strncmp(ifptr->ifr_name, "tun", 3) || !strncmp(ifptr->ifr_name, "ppp", 3)) { goto loopend; } /* Try and find its description */ for (i = 0, descr = NULL; device_names[i].name; i++) { int len = strlen(device_names[i].name); if (!ifptr->ifr_name || !ifptr->ifr_name[0]) continue; else if (!strncmp(ifptr->ifr_name, device_names[i].name, len)) { descr = device_names[i].description; break; } } if (!descr) descr = ""; deviceRegister(ifptr->ifr_name, descr, strdup(ifptr->ifr_name), DEVICE_TYPE_NETWORK, TRUE, mediaInitNetwork, NULL, mediaShutdownNetwork, NULL); if (isDebug()) msgDebug("Found a network device named %s\n", ifptr->ifr_name); close(s); if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) continue; loopend: if (ifptr->ifr_addr.sa_len) /* I'm not sure why this is here - it's inherited */ ifptr = (struct ifreq *)((caddr_t)ifptr + ifptr->ifr_addr.sa_len - sizeof(struct sockaddr)); } skipif: /* Next, try to find all the types of devices one might need * during the second stage of the installation. */ for (i = 0; device_names[i].name; i++) { for (j = 0; j < device_names[i].max; j++) { char try[FILENAME_MAX]; switch(device_names[i].type) { case DEVICE_TYPE_CDROM: fd = deviceTry(device_names[i], try, j); if (fd >= 0 || errno == EBUSY) { /* EBUSY if already mounted */ char n[BUFSIZ]; if (fd >= 0) close(fd); snprintf(n, sizeof n, device_names[i].name, j); deviceRegister(strdup(n), device_names[i].description, strdup(try), DEVICE_TYPE_CDROM, TRUE, mediaInitCDROM, mediaGetCDROM, mediaShutdownCDROM, NULL); if (isDebug()) msgDebug("Found a CDROM device for %s\n", try); } break; case DEVICE_TYPE_TAPE: fd = deviceTry(device_names[i], try, j); if (fd >= 0) { char n[BUFSIZ]; close(fd); snprintf(n, sizeof n, device_names[i].name, j); deviceRegister(strdup(n), device_names[i].description, strdup(try), DEVICE_TYPE_TAPE, TRUE, mediaInitTape, mediaGetTape, mediaShutdownTape, NULL); if (isDebug()) msgDebug("Found a TAPE device for %s\n", try); } break; case DEVICE_TYPE_DISK: fd = deviceTry(device_names[i], try, j); if (fd >= 0 && RunningAsInit) { dev_t d; mode_t m; int s, fail; char unit[80], slice[80]; close(fd); /* Make associated slice entries */ for (s = 1; s < 8; s++) { snprintf(unit, sizeof unit, device_names[i].name, j); snprintf(slice, sizeof slice, "/dev/%ss%d", unit, s); d = makedev(device_names[i].major, device_names[i].minor + (j * device_names[i].delta) + (s * SLICE_DELTA)); m = 0640; if (device_names[i].dev_type == 'c') m |= S_IFCHR; else m |= S_IFBLK; fail = mknod(slice, m, d); fd = open(slice, O_RDONLY); if (fd >= 0) close(fd); else if (!fail) (void)unlink(slice); } } break; case DEVICE_TYPE_FLOPPY: fd = deviceTry(device_names[i], try, j); if (fd >= 0) { char n[BUFSIZ]; close(fd); snprintf(n, sizeof n, device_names[i].name, j); deviceRegister(strdup(n), device_names[i].description, strdup(try), DEVICE_TYPE_FLOPPY, TRUE, mediaInitFloppy, mediaGetFloppy, mediaShutdownFloppy, NULL); if (isDebug()) msgDebug("Found a floppy device for %s\n", try); } break; case DEVICE_TYPE_NETWORK: fd = deviceTry(device_names[i], try, j); /* The only network devices that you can open this way are serial ones */ if (fd >= 0) { char *newdesc, *cp; close(fd); cp = device_names[i].description; /* Serial devices get a slip and ppp device each, if supported */ newdesc = safe_malloc(strlen(cp) + 40); sprintf(newdesc, cp, "SLIP interface", try, j + 1); deviceRegister("sl0", newdesc, strdup(try), DEVICE_TYPE_NETWORK, TRUE, mediaInitNetwork, NULL, mediaShutdownNetwork, NULL); msgDebug("Add mapping for %s to sl0\n", try); newdesc = safe_malloc(strlen(cp) + 50); sprintf(newdesc, cp, "PPP interface", try, j + 1); deviceRegister("ppp0", newdesc, strdup(try), DEVICE_TYPE_NETWORK, TRUE, mediaInitNetwork, NULL, mediaShutdownNetwork, NULL); if (isDebug()) msgDebug("Add mapping for %s to ppp0\n", try); } break; default: break; } } } /* Finally, go get the disks and look for DOS partitions to register */ if ((names = Disk_Names()) != NULL) { int i; for (i = 0; names[i]; i++) { Chunk *c1; Disk *d; d = Open_Disk(names[i]); if (!d) msgFatal("Unable to open disk %s", names[i]); deviceRegister(names[i], names[i], d->name, DEVICE_TYPE_DISK, FALSE, dummyInit, dummyGet, dummyShutdown, d); if (isDebug()) msgDebug("Found a disk device named %s\n", names[i]); /* Look for existing DOS partitions to register as "DOS media devices" */ for (c1 = d->chunks->part; c1; c1 = c1->next) { if (c1->type == fat || c1->type == extended) { Device *dev; char devname[80]; /* Got one! */ snprintf(devname, sizeof devname, "/dev/%s", c1->name); dev = deviceRegister(c1->name, c1->name, strdup(devname), DEVICE_TYPE_DOS, TRUE, mediaInitDOS, mediaGetDOS, mediaShutdownDOS, NULL); dev->private = c1; if (isDebug()) msgDebug("Found a DOS partition %s on drive %s\n", c1->name, d->name); } } } free(names); } dialog_clear_norefresh(); } /* Rescan all devices, after closing previous set - convenience function */ void deviceRescan(void) { deviceReset(); deviceGetAll(); } /* * Find all devices that match the criteria, allowing "wildcarding" as well * by allowing NULL or ANY values to match all. The array returned is static * and may be used until the next invocation of deviceFind(). */ Device ** deviceFind(char *name, DeviceType class) { static Device *found[DEV_MAX]; int i, j; j = 0; for (i = 0; i < numDevs; i++) { if ((!name || !strcmp(Devices[i]->name, name)) && (class == DEVICE_TYPE_ANY || class == Devices[i]->type)) found[j++] = Devices[i]; } found[j] = NULL; return j ? found : NULL; } Device ** deviceFindDescr(char *name, char *desc, DeviceType class) { static Device *found[DEV_MAX]; int i, j; j = 0; for (i = 0; i < numDevs; i++) { if ((!name || !strcmp(Devices[i]->name, name)) && (!desc || !strcmp(Devices[i]->description, desc)) && (class == DEVICE_TYPE_ANY || class == Devices[i]->type)) found[j++] = Devices[i]; } found[j] = NULL; return j ? found : NULL; } int deviceCount(Device **devs) { int i; if (!devs) return 0; for (i = 0; devs[i]; i++); return i; } /* * Create a menu listing all the devices of a certain type in the system. * The passed-in menu is expected to be a "prototype" from which the new * menu is cloned. */ DMenu * deviceCreateMenu(DMenu *menu, DeviceType type, int (*hook)(dialogMenuItem *d), int (*check)(dialogMenuItem *d)) { Device **devs; int numdevs; DMenu *tmp = NULL; int i, j; devs = deviceFind(NULL, type); numdevs = deviceCount(devs); if (!numdevs) return NULL; tmp = (DMenu *)safe_malloc(sizeof(DMenu) + (sizeof(dialogMenuItem) * (numdevs + 1))); bcopy(menu, tmp, sizeof(DMenu)); for (i = 0; devs[i]; i++) { tmp->items[i].prompt = devs[i]->name; for (j = 0; j < numDevs; j++) { if (devs[i] == Devices[j]) { tmp->items[i].title = Devices[j]->description; break; } } if (j == numDevs) tmp->items[i].title = ""; tmp->items[i].fire = hook; tmp->items[i].checked = check; } tmp->items[i].title = NULL; return tmp; } Index: stable/4/release/sysinstall/disks.c =================================================================== --- stable/4/release/sysinstall/disks.c (revision 62574) +++ stable/4/release/sysinstall/disks.c (revision 62575) @@ -1,774 +1,841 @@ /* * The new sysinstall program. * * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * * $FreeBSD$ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer, * verbatim and that no modifications are made prior to this * point in the file. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * */ #include "sysinstall.h" #include #include #include #include +#ifdef PC98 +#define SUBTYPE_FREEBSD 50324 +#define SUBTYPE_FAT 37218 +#else +#define SUBTYPE_FREEBSD 165 +#define SUBTYPE_FAT 6 +#endif + /* Where we start displaying chunk information on the screen */ #define CHUNK_START_ROW 5 /* Where we keep track of MBR chunks */ static struct chunk *chunk_info[16]; static int current_chunk; static void diskPartitionNonInteractive(Device *dev); static void record_chunks(Disk *d) { struct chunk *c1 = NULL; int i = 0; int last_free = 0; if (!d->chunks) msgFatal("No chunk list found for %s!", d->name); for (c1 = d->chunks->part; c1; c1 = c1->next) { if (c1->type == unused && c1->size > last_free) { last_free = c1->size; current_chunk = i; } chunk_info[i++] = c1; } chunk_info[i] = NULL; if (current_chunk >= i) current_chunk = i - 1; } static int Total; static void print_chunks(Disk *d) { int row; int i; for (i = Total = 0; chunk_info[i]; i++) Total += chunk_info[i]->size; +#ifndef PC98 if (d->bios_cyl > 65536 || d->bios_hd > 256 || d->bios_sect >= 64) { dialog_clear_norefresh(); msgConfirm("WARNING: A geometry of %d/%d/%d for %s is incorrect. Using\n" "a more likely geometry. If this geometry is incorrect or you\n" "are unsure as to whether or not it's correct, please consult\n" "the Hardware Guide in the Documentation submenu or use the\n" "(G)eometry command to change it now.\n\n" "Remember: you need to enter whatever your BIOS thinks the\n" "geometry is! For IDE, it's what you were told in the BIOS\n" "setup. For SCSI, it's the translation mode your controller is\n" "using. Do NOT use a ``physical geometry''.", d->bios_cyl, d->bios_hd, d->bios_sect, d->name); Sanitize_Bios_Geom(d); } +#endif attrset(A_NORMAL); mvaddstr(0, 0, "Disk name:\t"); clrtobot(); attrset(A_REVERSE); addstr(d->name); attrset(A_NORMAL); attrset(A_REVERSE); mvaddstr(0, 55, "FDISK Partition Editor"); attrset(A_NORMAL); mvprintw(1, 0, "DISK Geometry:\t%lu cyls/%lu heads/%lu sectors = %lu sectors", d->bios_cyl, d->bios_hd, d->bios_sect, d->bios_cyl * d->bios_hd * d->bios_sect); mvprintw(3, 0, "%10s %10s %10s %8s %6s %10s %8s %8s", "Offset", "Size", "End", "Name", "PType", "Desc", "Subtype", "Flags"); for (i = 0, row = CHUNK_START_ROW; chunk_info[i]; i++, row++) { if (i == current_chunk) attrset(ATTR_SELECTED); mvprintw(row, 0, "%10ld %10lu %10lu %8s %6d %10s %8d\t%-6s", chunk_info[i]->offset, chunk_info[i]->size, chunk_info[i]->end, chunk_info[i]->name, chunk_info[i]->type, slice_type_name(chunk_info[i]->type, chunk_info[i]->subtype), chunk_info[i]->subtype, ShowChunkFlags(chunk_info[i])); if (i == current_chunk) attrset(A_NORMAL); } } static void print_command_summary() { mvprintw(14, 0, "The following commands are supported (in upper or lower case):"); mvprintw(16, 0, "A = Use Entire Disk C = Create Slice"); mvprintw(17, 0, "D = Delete Slice G = Set Drive Geometry S = Set Bootable"); mvprintw(18, 0, "T = Change Type U = Undo All Changes Q = Finish"); if (!RunningAsInit) mvprintw(18, 48, "W = Write Changes"); mvprintw(21, 0, "Use F1 or ? to get more help, arrow keys to select."); move(0, 0); } +#ifndef PC98 static u_char * getBootMgr(char *dname) { #ifndef __alpha__ /* only meaningful on x86 */ extern u_char mbr[], boot0[]; char str[80]; char *cp; int i = 0; cp = variable_get(VAR_BOOTMGR); if (!cp) { /* Figure out what kind of MBR the user wants */ sprintf(str, "Install Boot Manager for drive %s?", dname); MenuMBRType.title = str; i = dmenuOpenSimple(&MenuMBRType, FALSE); } else { if (!strncmp(cp, "boot", 4)) BootMgr = 0; else if (!strcmp(cp, "standard")) BootMgr = 1; else BootMgr = 2; } if (cp || i) { switch (BootMgr) { case 0: return boot0; case 1: return mbr; case 2: default: break; } } #endif return NULL; } +#endif int diskGetSelectCount(Device ***devs) { int i, cnt, enabled; char *cp; Device **dp; cp = variable_get(VAR_DISK); dp = *devs = deviceFind(cp, DEVICE_TYPE_DISK); cnt = deviceCount(dp); if (!cnt) return -1; for (i = 0, enabled = 0; i < cnt; i++) { if (dp[i]->enabled) ++enabled; } return enabled; } void diskPartition(Device *dev) { char *cp, *p; int rv, key = 0; Boolean chunking; char *msg = NULL; +#ifndef PC98 u_char *mbrContents; +#endif WINDOW *w = savescr(); Disk *d = (Disk *)dev->private; chunking = TRUE; keypad(stdscr, TRUE); /* Flush both the dialog and curses library views of the screen since we don't always know who called us */ dialog_clear_norefresh(), clear(); current_chunk = 0; /* Set up the chunk array */ record_chunks(d); while (chunking) { char *val, geometry[80]; /* Now print our overall state */ if (d) print_chunks(d); print_command_summary(); if (msg) { attrset(title_attr); mvprintw(23, 0, msg); attrset(A_NORMAL); beep(); msg = NULL; } else { move(23, 0); clrtoeol(); } /* Get command character */ key = getch(); switch (toupper(key)) { case '\014': /* ^L (redraw) */ clear(); msg = NULL; break; case '\020': /* ^P */ case KEY_UP: case '-': if (current_chunk != 0) --current_chunk; break; case '\016': /* ^N */ case KEY_DOWN: case '+': case '\r': case '\n': if (chunk_info[current_chunk + 1]) ++current_chunk; break; case KEY_HOME: current_chunk = 0; break; case KEY_END: while (chunk_info[current_chunk + 1]) ++current_chunk; break; case KEY_F(1): case '?': systemDisplayHelp("slice"); clear(); break; case 'A': #ifdef __alpha__ rv = 1; #else /* The rest is only relevant on x86 */ cp = variable_get(VAR_DEDICATE_DISK); if (cp && !strcasecmp(cp, "always")) rv = 1; else { rv = msgYesNo("Do you want to do this with a true partition entry\n" "so as to remain cooperative with any future possible\n" "operating systems on the drive(s)?\n" "(See also the section about ``dangerously dedicated''\n" "disks in the FreeBSD FAQ.)"); if (rv == -1) rv = 0; } #endif All_FreeBSD(d, rv); variable_set2(DISK_PARTITIONED, "yes", 0); record_chunks(d); clear(); break; case 'C': if (chunk_info[current_chunk]->type != unused) msg = "Slice in use, delete it first or move to an unused one."; else { char *val, tmp[20], *cp; - int size, subtype; + int size; +#ifdef PC98 + char name[16]; + + snprintf(name, 16, "%s", "FreeBSD"); + val = msgGetInput(name, + "Please specify the name for new FreeBSD slice."); + if (val) + strncpy(name, val, 16); +#else + int subtype; chunk_e partitiontype; - +#endif snprintf(tmp, 20, "%lu", chunk_info[current_chunk]->size); val = msgGetInput(tmp, "Please specify the size for new FreeBSD slice in blocks\n" "or append a trailing `M' for megabytes (e.g. 20M)."); if (val && (size = strtol(val, &cp, 0)) > 0) { if (*cp && toupper(*cp) == 'M') size *= ONE_MEG; else if (*cp && toupper(*cp) == 'G') size *= ONE_GIG; - strcpy(tmp, "165"); +#ifdef PC98 + Create_Chunk(d, chunk_info[current_chunk]->offset, size, + freebsd, 3, + (chunk_info[current_chunk]->flags & CHUNK_ALIGN), + name); + variable_set2(DISK_PARTITIONED, "yes", 0); + record_chunks(d); +#else + sprintf(tmp, "%d", SUBTYPE_FREEBSD); val = msgGetInput(tmp, "Enter type of partition to create:\n\n" "Pressing Enter will choose the default, a native FreeBSD\n" "slice (type 165). You can choose other types, 6 for a\n" "DOS partition or 131 for a Linux partition, for example.\n\n" "Note: If you choose a non-FreeBSD partition type, it will not\n" "be formatted or otherwise prepared, it will simply reserve space\n" "for you to use another tool, such as DOS FORMAT, to later format\n" "and use the partition."); if (val && (subtype = strtol(val, NULL, 0)) > 0) { - if (subtype == 165) + if (subtype == SUBTYPE_FREEBSD) partitiontype = freebsd; - else if (subtype == 6) + else if (subtype == SUBTYPE_FAT) partitiontype = fat; else partitiontype = unknown; #ifdef __alpha__ if (partitiontype == freebsd && size == chunk_info[current_chunk]->size) All_FreeBSD(d, 1); else #endif Create_Chunk(d, chunk_info[current_chunk]->offset, size, partitiontype, subtype, (chunk_info[current_chunk]->flags & CHUNK_ALIGN)); variable_set2(DISK_PARTITIONED, "yes", 0); record_chunks(d); } +#endif /* PC98 */ } clear(); } break; case KEY_DC: case 'D': if (chunk_info[current_chunk]->type == unused) msg = "Slice is already unused!"; else { Delete_Chunk(d, chunk_info[current_chunk]); variable_set2(DISK_PARTITIONED, "yes", 0); record_chunks(d); } break; case 'T': if (chunk_info[current_chunk]->type == unused) msg = "Slice is currently unused (use create instead)"; else { char *val, tmp[20]; int subtype; chunk_e partitiontype; - strcpy(tmp, "165"); + sprintf(tmp, "%d", SUBTYPE_FREEBSD); +#ifdef PC98 val = msgGetInput(tmp, "New partition type:\n\n" "Pressing Enter will choose the default, a native FreeBSD\n" + "slice (type 50324). Other popular values are 37218 for\n" + "DOS FAT partition.\n\n" + "Note: If you choose a non-FreeBSD partition type, it will not\n" + "be formatted or otherwise prepared, it will simply reserve space\n" + "for you to use another tool, such as DOS format, to later format\n" + "and actually use the partition."); +#else + val = msgGetInput(tmp, "New partition type:\n\n" + "Pressing Enter will choose the default, a native FreeBSD\n" "slice (type 165). Other popular values are 6 for\n" "DOS FAT partition, 131 for a Linux ext2fs partition or\n" "130 for a Linux swap partition.\n\n" "Note: If you choose a non-FreeBSD partition type, it will not\n" "be formatted or otherwise prepared, it will simply reserve space\n" "for you to use another tool, such as DOS format, to later format\n" "and actually use the partition."); +#endif /* PC98 */ if (val && (subtype = strtol(val, NULL, 0)) > 0) { - if (subtype == 165) + if (subtype == SUBTYPE_FREEBSD) partitiontype = freebsd; - else if (subtype == 6) + else if (subtype == SUBTYPE_FAT) partitiontype = fat; else partitiontype = unknown; chunk_info[current_chunk]->type = partitiontype; chunk_info[current_chunk]->subtype = subtype; } } break; case 'G': snprintf(geometry, 80, "%lu/%lu/%lu", d->bios_cyl, d->bios_hd, d->bios_sect); val = msgGetInput(geometry, "Please specify the new geometry in cyl/hd/sect format.\n" "Don't forget to use the two slash (/) separator characters!\n" "It's not possible to parse the field without them."); if (val) { long nc, nh, ns; nc = strtol(val, &val, 0); nh = strtol(val + 1, &val, 0); ns = strtol(val + 1, 0, 0); Set_Bios_Geom(d, nc, nh, ns); } clear(); break; case 'S': /* Set Bootable */ chunk_info[current_chunk]->flags |= CHUNK_ACTIVE; break; case 'U': if ((cp = variable_get(DISK_LABELLED)) && !strcmp(cp, "written")) { msgConfirm("You've already written this information out - you\n" "can't undo it."); } else if (!msgYesNo("Are you SURE you want to Undo everything?")) { char cp[BUFSIZ]; sstrncpy(cp, d->name, sizeof cp); Free_Disk(dev->private); d = Open_Disk(cp); if (!d) msgConfirm("Can't reopen disk %s! Internal state is probably corrupted", cp); dev->private = d; variable_unset(DISK_PARTITIONED); variable_unset(DISK_LABELLED); if (d) record_chunks(d); } clear(); break; case 'W': if (!msgYesNo("WARNING: This should only be used when modifying an EXISTING\n" "installation. If you are installing FreeBSD for the first time\n" "then you should simply type Q when you're finished here and your\n" "changes will be committed in one batch automatically at the end of\n" "these questions. If you're adding a disk, you should NOT write\n" "from this screen, you should do it from the label editor.\n\n" "Are you absolutely sure you want to do this now?")) { variable_set2(DISK_PARTITIONED, "yes", 0); +#ifndef PC98 /* Don't trash the MBR if the first (and therefore only) chunk is marked for a truly dedicated * disk (i.e., the disklabel starts at sector 0), even in cases where the user has requested * booteasy or a "standard" MBR -- both would be fatal in this case. */ /* * Don't offer to update the MBR on this disk if the first "real" chunk looks like * a FreeBSD "all disk" partition, or the disk is entirely FreeBSD. */ if (((d->chunks->part->type != freebsd) || (d->chunks->part->offset > 1))) mbrContents = getBootMgr(d->name); else mbrContents = NULL; Set_Boot_Mgr(d, mbrContents); +#endif /* !PC98 */ if (DITEM_STATUS(diskPartitionWrite(NULL)) != DITEM_SUCCESS) msgConfirm("Disk partition write returned an error status!"); else msgConfirm("Wrote FDISK partition information out successfully."); } clear(); break; case '|': if (!msgYesNo("Are you SURE you want to go into Wizard mode?\n" "No seat belts whatsoever are provided!")) { clear(); refresh(); slice_wizard(d); variable_set2(DISK_PARTITIONED, "yes", 0); record_chunks(d); } else msg = "Wise choice!"; clear(); break; case '\033': /* ESC */ case 'Q': chunking = FALSE; +#ifndef PC98 /* Don't trash the MBR if the first (and therefore only) chunk is marked for a truly dedicated * disk (i.e., the disklabel starts at sector 0), even in cases where the user has requested * booteasy or a "standard" MBR -- both would be fatal in this case. */ #if 0 if ((d->chunks->part->flags & CHUNK_FORCE_ALL) != CHUNK_FORCE_ALL && (mbrContents = getBootMgr(d->name)) != NULL) Set_Boot_Mgr(d, mbrContents); #else /* * Don't offer to update the MBR on this disk if the first "real" chunk looks like * a FreeBSD "all disk" partition, or the disk is entirely FreeBSD. */ if (((d->chunks->part->type != freebsd) || (d->chunks->part->offset > 1)) && (mbrContents = getBootMgr(d->name)) != NULL) Set_Boot_Mgr(d, mbrContents); #endif +#endif /* !PC98 */ break; default: beep(); msg = "Type F1 or ? for help"; break; } } p = CheckRules(d); if (p) { char buf[FILENAME_MAX]; use_helpline("Press F1 to read more about disk slices."); use_helpfile(systemHelpFile("partition", buf)); if (!variable_get(VAR_NO_WARN)) dialog_mesgbox("Disk slicing warning:", p, -1, -1); free(p); } restorescr(w); } static u_char * bootalloc(char *name) { char buf[FILENAME_MAX]; struct stat sb; snprintf(buf, sizeof buf, "/boot/%s", name); if (stat(buf, &sb) != -1) { int fd; fd = open(buf, O_RDONLY); if (fd != -1) { u_char *cp; cp = malloc(sb.st_size); if (read(fd, cp, sb.st_size) != sb.st_size) { free(cp); close(fd); msgDebug("bootalloc: couldn't read %d bytes from %s\n", sb.st_size, buf); return NULL; } close(fd); return cp; } msgDebug("bootalloc: couldn't open %s\n", buf); } else msgDebug("bootalloc: can't stat %s\n", buf); return NULL; } static int partitionHook(dialogMenuItem *selected) { Device **devs = NULL; devs = deviceFind(selected->prompt, DEVICE_TYPE_DISK); if (!devs) { msgConfirm("Unable to find disk %s!", selected->prompt); return DITEM_FAILURE; } /* Toggle enabled status? */ if (!devs[0]->enabled) { devs[0]->enabled = TRUE; diskPartition(devs[0]); } else devs[0]->enabled = FALSE; return DITEM_SUCCESS; } static int partitionCheck(dialogMenuItem *selected) { Device **devs = NULL; devs = deviceFind(selected->prompt, DEVICE_TYPE_DISK); if (!devs || devs[0]->enabled == FALSE) return FALSE; return TRUE; } int diskPartitionEditor(dialogMenuItem *self) { DMenu *menu; Device **devs; int i, cnt, devcnt; cnt = diskGetSelectCount(&devs); devcnt = deviceCount(devs); if (cnt == -1) { msgConfirm("No disks found! Please verify that your disk controller is being\n" "properly probed at boot time. See the Hardware Guide on the\n" "Documentation menu for clues on diagnosing this type of problem."); return DITEM_FAILURE; } else if (cnt) { /* Some are already selected */ for (i = 0; i < devcnt; i++) { if (devs[i]->enabled) { if (variable_get(VAR_NONINTERACTIVE)) diskPartitionNonInteractive(devs[i]); else diskPartition(devs[i]); } } } else { /* No disks are selected, fall-back case now */ if (devcnt == 1) { devs[0]->enabled = TRUE; if (variable_get(VAR_NONINTERACTIVE)) diskPartitionNonInteractive(devs[0]); else diskPartition(devs[0]); return DITEM_SUCCESS; } else { menu = deviceCreateMenu(&MenuDiskDevices, DEVICE_TYPE_DISK, partitionHook, partitionCheck); if (!menu) { msgConfirm("No devices suitable for installation found!\n\n" "Please verify that your disk controller (and attached drives)\n" "were detected properly. This can be done by pressing the\n" "[Scroll Lock] key and using the Arrow keys to move back to\n" "the boot messages. Press [Scroll Lock] again to return."); return DITEM_FAILURE; } else { i = dmenuOpenSimple(menu, FALSE) ? DITEM_SUCCESS : DITEM_FAILURE; free(menu); } return i; } } return DITEM_SUCCESS; } int diskPartitionWrite(dialogMenuItem *self) { Device **devs; int i; char *cp; devs = deviceFind(NULL, DEVICE_TYPE_DISK); if (!devs) { msgConfirm("Unable to find any disks to write to??"); return DITEM_FAILURE; } if (isDebug()) msgDebug("diskPartitionWrite: Examining %d devices\n", deviceCount(devs)); cp = variable_get(DISK_PARTITIONED); if (cp && !strcmp(cp, "written")) return DITEM_SUCCESS; for (i = 0; devs[i]; i++) { Disk *d = (Disk *)devs[i]->private; static u_char *boot1; #ifndef __alpha__ static u_char *boot2; #endif if (!devs[i]->enabled) continue; #ifdef __alpha__ if (!boot1) boot1 = bootalloc("boot1"); Set_Boot_Blocks(d, boot1, NULL); #else if (!boot1) boot1 = bootalloc("boot1"); if (!boot2) boot2 = bootalloc("boot2"); Set_Boot_Blocks(d, boot1, boot2); #endif msgNotify("Writing partition information to drive %s", d->name); if (!Fake && Write_Disk(d)) { msgConfirm("ERROR: Unable to write data to disk %s!", d->name); return DITEM_FAILURE; } /* If we've been through here before, we don't need to do the rest */ if (cp && !strcmp(cp, "written")) return DITEM_SUCCESS; } /* Now it's not "yes", but "written" */ variable_set2(DISK_PARTITIONED, "written", 0); return DITEM_SUCCESS | DITEM_RESTORE; } /* Partition a disk based wholly on which variables are set */ static void diskPartitionNonInteractive(Device *dev) { char *cp; int i, sz, all_disk = 0; +#ifndef PC98 u_char *mbrContents; +#endif Disk *d = (Disk *)dev->private; record_chunks(d); cp = variable_get(VAR_GEOMETRY); if (cp) { msgDebug("Setting geometry from script to: %s\n", cp); d->bios_cyl = strtol(cp, &cp, 0); d->bios_hd = strtol(cp + 1, &cp, 0); d->bios_sect = strtol(cp + 1, 0, 0); } cp = variable_get(VAR_PARTITION); if (cp) { if (!strcmp(cp, "free")) { /* Do free disk space case */ for (i = 0; chunk_info[i]; i++) { /* If a chunk is at least 10MB in size, use it. */ if (chunk_info[i]->type == unused && chunk_info[i]->size > (10 * ONE_MEG)) { - Create_Chunk(d, chunk_info[i]->offset, chunk_info[i]->size, freebsd, 3, +#ifdef PC98 + Create_Chunk(d, chunk_info[i]->offset, chunk_info[i]->size, + freebsd, 3, + (chunk_info[i]->flags & CHUNK_ALIGN), + "FreeBSD"); +#else + Create_Chunk(d, chunk_info[i]->offset, chunk_info[i]->size, + freebsd, 3, (chunk_info[i]->flags & CHUNK_ALIGN)); +#endif variable_set2(DISK_PARTITIONED, "yes", 0); break; } } if (!chunk_info[i]) { msgConfirm("Unable to find any free space on this disk!"); return; } } else if (!strcmp(cp, "all")) { /* Do all disk space case */ msgDebug("Warning: Devoting all of disk %s to FreeBSD.\n", d->name); All_FreeBSD(d, FALSE); } else if (!strcmp(cp, "exclusive")) { /* Do really-all-the-disk-space case */ msgDebug("Warning: Devoting all of disk %s to FreeBSD.\n", d->name); All_FreeBSD(d, all_disk = TRUE); } else if ((sz = strtol(cp, &cp, 0))) { /* Look for sz bytes free */ if (*cp && toupper(*cp) == 'M') sz *= ONE_MEG; else if (*cp && toupper(*cp) == 'G') sz *= ONE_GIG; for (i = 0; chunk_info[i]; i++) { /* If a chunk is at least sz MB, use it. */ if (chunk_info[i]->type == unused && chunk_info[i]->size >= sz) { - Create_Chunk(d, chunk_info[i]->offset, sz, freebsd, 3, (chunk_info[i]->flags & CHUNK_ALIGN)); +#ifdef PC98 + Create_Chunk(d, chunk_info[i]->offset, sz, freebsd, 3, + (chunk_info[i]->flags & CHUNK_ALIGN), + "FreeBSD"); +#else + Create_Chunk(d, chunk_info[i]->offset, sz, freebsd, 3, + (chunk_info[i]->flags & CHUNK_ALIGN)); +#endif variable_set2(DISK_PARTITIONED, "yes", 0); break; } } if (!chunk_info[i]) { msgConfirm("Unable to find %d free blocks on this disk!", sz); return; } } else if (!strcmp(cp, "existing")) { /* Do existing FreeBSD case */ for (i = 0; chunk_info[i]; i++) { if (chunk_info[i]->type == freebsd) break; } if (!chunk_info[i]) { msgConfirm("Unable to find any existing FreeBSD partitions on this disk!"); return; } } else { msgConfirm("`%s' is an invalid value for %s - is config file valid?", cp, VAR_PARTITION); return; } +#ifndef PC98 if (!all_disk) { mbrContents = getBootMgr(d->name); Set_Boot_Mgr(d, mbrContents); } +#endif variable_set2(DISK_PARTITIONED, "yes", 0); } } Index: stable/4/release/sysinstall/floppy.c =================================================================== --- stable/4/release/sysinstall/floppy.c (revision 62574) +++ stable/4/release/sysinstall/floppy.c (revision 62575) @@ -1,155 +1,189 @@ /* * The new sysinstall program. * * This is probably the last attempt in the `sysinstall' line, the next * generation being slated to essentially a complete rewrite. * * $FreeBSD$ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. * Copyright (c) 1995 * Gary J Palmer. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer, * verbatim and that no modifications are made prior to this * point in the file. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * */ /* These routines deal with getting things off of floppy media */ #include "sysinstall.h" #include #include #include #include #include #include #include #define MSDOSFS #include #include #undef MSDOSFS #include static Boolean floppyMounted; char *distWanted; static char mountpoint[] = "/dist"; Boolean mediaInitFloppy(Device *dev) { struct msdosfs_args dosargs; struct ufs_args u_args; char *mp; +#ifdef PC98 + char fddev[24]; +#endif if (floppyMounted) return TRUE; mp = dev->private ? (char *)dev->private : mountpoint; if (Mkdir(mp)) { msgConfirm("Unable to make %s directory mountpoint for %s!", mp, dev->devname); return FALSE; } msgDebug("Init floppy called for %s distribution.\n", distWanted ? distWanted : "some"); if (!variable_get(VAR_NONINTERACTIVE)) { if (!distWanted) msgConfirm("Please insert floppy in %s", dev->description); else msgConfirm("Please insert floppy containing %s in %s", distWanted, dev->description); } memset(&dosargs, 0, sizeof dosargs); +#ifdef PC98 + dosargs.fspec = fddev; +#else dosargs.fspec = dev->devname; +#endif dosargs.uid = dosargs.gid = 0; dosargs.mask = 0777; memset(&u_args, 0, sizeof(u_args)); +#ifdef PC98 + u_args.fspec = fddev; +#else u_args.fspec = dev->devname; +#endif - if (mount("msdos", mp, MNT_RDONLY, (caddr_t)&dosargs) == -1) { - if (mount("ufs", mp, MNT_RDONLY, (caddr_t)&u_args) == -1) { - msgConfirm("Error mounting floppy %s (%s) on %s : %s", - dev->name, dev->devname, mp, strerror(errno)); - return FALSE; - } - } +#ifdef PC98 + sprintf(fddev, "%s.1200", dev->devname); + if (mount("msdos", mp, MNT_RDONLY, (caddr_t)&dosargs) != -1) + goto success; + if (mount("ufs", mp, MNT_RDONLY, (caddr_t)&u_args) != -1) + goto success; + + sprintf(fddev, "%s.1232", dev->devname); + if (mount("msdos", mp, MNT_RDONLY, (caddr_t)&dosargs) != -1) + goto success; + if (mount("ufs", mp, MNT_RDONLY, (caddr_t)&u_args) != -1) + goto success; + + sprintf(fddev, "%s.1440", dev->devname); + if (mount("msdos", mp, MNT_RDONLY, (caddr_t)&dosargs) != -1) + goto success; + if (mount("ufs", mp, MNT_RDONLY, (caddr_t)&u_args) != -1) + goto success; +#else + if (mount("msdos", mp, MNT_RDONLY, (caddr_t)&dosargs) != -1) + goto success; + if (mount("ufs", mp, MNT_RDONLY, (caddr_t)&u_args) != -1) + goto success; +#endif /* PC98 */ + + msgConfirm("Error mounting floppy %s (%s) on %s : %s", + dev->name, dev->devname, mp, strerror(errno)); + return FALSE; + +success: floppyMounted = TRUE; distWanted = NULL; return TRUE; } FILE * mediaGetFloppy(Device *dev, char *file, Boolean probe) { char buf[PATH_MAX], *mp; FILE *fp; int nretries = 5; /* * floppies don't use mediaGenericGet() because it's too expensive * to speculatively open files on a floppy disk. Make user get it * right or give up with floppies. */ mp = dev->private ? (char *)dev->private : mountpoint; snprintf(buf, PATH_MAX, "%s/%s", mp, file); if (!file_readable(buf)) { if (probe) return NULL; else { while (!file_readable(buf)) { if (!--nretries) { msgConfirm("GetFloppy: Failed to get %s after retries;\ngiving up.", buf); return NULL; } distWanted = buf; mediaShutdownFloppy(dev); if (!mediaInitFloppy(dev)) return NULL; } } } fp = fopen(buf, "r"); return fp; } void mediaShutdownFloppy(Device *dev) { if (floppyMounted) { char *mp = dev->private ? (char *)dev->private : mountpoint; if (unmount(mp, MNT_FORCE) != 0) msgDebug("Umount of floppy on %s failed: %s (%d)\n", mp, strerror(errno), errno); else { floppyMounted = FALSE; if (!variable_get(VAR_NONINTERACTIVE) && variable_cmp(SYSTEM_STATE, "fixit")) msgConfirm("You may remove the floppy from %s", dev->description); } } } Index: stable/4/release/sysinstall/main.c =================================================================== --- stable/4/release/sysinstall/main.c (revision 62574) +++ stable/4/release/sysinstall/main.c (revision 62575) @@ -1,148 +1,157 @@ /* * The new sysinstall program. * * This is probably the last attempt in the `sysinstall' line, the next * generation being slated for what's essentially a complete rewrite. * * $FreeBSD$ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer, * verbatim and that no modifications are made prior to this * point in the file. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * */ #include "sysinstall.h" #include #include static void screech(int sig) { msgDebug("\007Signal %d caught! That's bad!\n", sig); longjmp(BailOut, sig); } int main(int argc, char **argv) { int choice, scroll, curr, max, status; /* Catch fatal signals and complain about them if running as init */ if (getpid() == 1) { signal(SIGBUS, screech); signal(SIGSEGV, screech); } signal(SIGPIPE, SIG_IGN); /* We don't work too well when running as non-root anymore */ if (geteuid() != 0) { fprintf(stderr, "Error: This utility should only be run as root.\n"); return 1; } +#ifdef PC98 + { + /* XXX */ + char *p = getenv("TERM"); + if (p && strcmp(p, "cons25") == 0) + putenv("TERM=cons25w"); + } +#endif + /* Set up whatever things need setting up */ systemInitialize(argc, argv); /* Set default flag and variable values */ installVarDefaults(NULL); /* only when multi-user is it reasonable to do this here */ if (!RunningAsInit) installEnvironment(); if (argc > 1 && !strcmp(argv[1], "-fake")) { variable_set2(VAR_DEBUG, "YES", 0); Fake = TRUE; msgConfirm("I'll be just faking it from here on out, OK?"); } /* Try to preserve our scroll-back buffer */ if (OnVTY) { for (curr = 0; curr < 25; curr++) putchar('\n'); } /* Move stderr aside */ if (DebugFD) dup2(DebugFD, 2); /* Initialize PC-card */ pccardInitialize(); /* Initialize USB */ usbInitialize(); /* Probe for all relevant devices on the system */ deviceGetAll(); /* First, see if we have any arguments to process (and argv[0] counts if it's not "sysinstall") */ if (!RunningAsInit) { int i, start_arg; if (!strstr(argv[0], "sysinstall")) start_arg = 0; else if (Fake) start_arg = 2; else start_arg = 1; for (i = start_arg; i < argc; i++) { if (DITEM_STATUS(dispatchCommand(argv[i])) != DITEM_SUCCESS) systemShutdown(1); } if (argc > start_arg) systemShutdown(0); } else dispatch_load_file_int(TRUE); status = setjmp(BailOut); if (status) { msgConfirm("A signal %d was caught - I'm saving what I can and shutting\n" "If you can reproduce the problem, please turn Debug on in\n" "the Options menu for the extra information it provides in\n" "debugging problems like this.", status); systemShutdown(status); } /* Begin user dialog at outer menu */ dialog_clear(); while (1) { choice = scroll = curr = max = 0; dmenuOpen(&MenuInitial, &choice, &scroll, &curr, &max, TRUE); if (getpid() != 1 #ifdef __alpha__ || !msgYesNo("Are you sure you wish to exit? The system will halt.") #else || !msgYesNo("Are you sure you wish to exit? The system will reboot\n" "(be sure to remove any floppies/CDROMs from the drives).") #endif ) break; } /* Say goodnight, Gracie */ systemShutdown(0); return 0; /* We should never get here */ } Index: stable/4/release/sysinstall/menus.c =================================================================== --- stable/4/release/sysinstall/menus.c (revision 62574) +++ stable/4/release/sysinstall/menus.c (revision 62575) @@ -1,1630 +1,1632 @@ /* * The new sysinstall program. * * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * * $FreeBSD$ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer, * verbatim and that no modifications are made prior to this * point in the file. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * */ #include "sysinstall.h" -#ifdef __alpha__ +#if defined(__alpha__) #define _AS(str) str "alpha/" -#else /* i386 */ +#elif defined(PC98) +#define _AS(str) str "pc98/" +#else #define _AS(str) str "i386/" #endif #define _AP(str) _AS(str "/pub/FreeBSD/releases/") /* Miscellaneous work routines for menus */ static int setSrc(dialogMenuItem *self) { Dists |= DIST_SRC; SrcDists = DIST_SRC_ALL; return DITEM_SUCCESS | DITEM_REDRAW; } static int clearSrc(dialogMenuItem *self) { Dists &= ~DIST_SRC; SrcDists = 0; return DITEM_SUCCESS | DITEM_REDRAW; } static int setCRYPTO(dialogMenuItem *self) { Dists |= DIST_CRYPTO; CRYPTODists = DIST_CRYPTO_ALL; return DITEM_SUCCESS | DITEM_REDRAW; } static int clearCRYPTO(dialogMenuItem *self) { Dists &= ~DIST_CRYPTO; CRYPTODists = 0; return DITEM_SUCCESS | DITEM_REDRAW; } static int setX11Misc(dialogMenuItem *self) { XF86Dists |= DIST_XF86_MISC_ALL; Dists |= DIST_XF86; return DITEM_SUCCESS | DITEM_REDRAW; } static int clearX11Misc(dialogMenuItem *self) { XF86Dists &= ~DIST_XF86_MISC_ALL; if (!XF86ServerDists && !XF86FontDists) Dists &= ~DIST_XF86; return DITEM_SUCCESS | DITEM_REDRAW; } static int setX11Servers(dialogMenuItem *self) { XF86Dists |= DIST_XF86_SERVER; XF86ServerDists = DIST_XF86_SERVER_ALL; return DITEM_SUCCESS | DITEM_REDRAW; } static int clearX11Servers(dialogMenuItem *self) { XF86Dists &= ~DIST_XF86_SERVER; XF86ServerDists = 0; return DITEM_SUCCESS | DITEM_REDRAW; } static int setX11Fonts(dialogMenuItem *self) { XF86Dists |= DIST_XF86_FONTS; XF86FontDists = DIST_XF86_FONTS_ALL; return DITEM_SUCCESS | DITEM_REDRAW; } static int clearX11Fonts(dialogMenuItem *self) { XF86Dists &= ~DIST_XF86_FONTS; XF86FontDists = 0; return DITEM_SUCCESS | DITEM_REDRAW; } #define _IS_SET(dist, set) (((dist) & (set)) == (set)) #define IS_DEVELOPER(dist, extra) (_IS_SET(dist, _DIST_DEVELOPER | extra) || \ _IS_SET(dist, _DIST_DEVELOPER | DIST_CRYPTO | extra)) #define IS_USER(dist, extra) (_IS_SET(dist, _DIST_USER | extra) || \ _IS_SET(dist, _DIST_USER | DIST_CRYPTO | extra)) static int checkDistDeveloper(dialogMenuItem *self) { return IS_DEVELOPER(Dists, 0) && _IS_SET(SrcDists, DIST_SRC_ALL); } static int checkDistXDeveloper(dialogMenuItem *self) { return IS_DEVELOPER(Dists, DIST_XF86) && _IS_SET(SrcDists, DIST_SRC_ALL); } static int checkDistKernDeveloper(dialogMenuItem *self) { return IS_DEVELOPER(Dists, 0) && _IS_SET(SrcDists, DIST_SRC_SYS); } static int checkDistXKernDeveloper(dialogMenuItem *self) { return IS_DEVELOPER(Dists, DIST_XF86) && _IS_SET(SrcDists, DIST_SRC_SYS); } static int checkDistUser(dialogMenuItem *self) { return IS_USER(Dists, 0); } static int checkDistXUser(dialogMenuItem *self) { return IS_USER(Dists, DIST_XF86); } static int checkDistMinimum(dialogMenuItem *self) { return Dists == DIST_BIN; } static int checkDistEverything(dialogMenuItem *self) { return Dists == DIST_ALL && _IS_SET(SrcDists, DIST_SRC_ALL) && \ _IS_SET(XF86Dists, DIST_XF86_ALL) && \ _IS_SET(XF86ServerDists, DIST_XF86_SERVER_ALL) && \ _IS_SET(XF86FontDists, DIST_XF86_FONTS_ALL); } static int CRYPTOFlagCheck(dialogMenuItem *item) { return CRYPTODists; } static int srcFlagCheck(dialogMenuItem *item) { return SrcDists; } static int x11FlagCheck(dialogMenuItem *item) { return Dists & DIST_XF86; } static int checkTrue(dialogMenuItem *item) { return TRUE; } /* All the system menus go here. * * Hardcoded things like version number strings will disappear from * these menus just as soon as I add the code for doing inline variable * expansion. */ DMenu MenuIndex = { DMENU_NORMAL_TYPE, "Glossary of functions", "This menu contains an alphabetized index of the top level functions in\n" "this program (sysinstall). Invoke an option by pressing [ENTER].\n" "Leave the index page by selecting Cancel [TAB-ENTER].", "Use PageUp or PageDown to move through this menu faster!", NULL, { { " Anon FTP", "Configure anonymous FTP logins.", dmenuVarCheck, configAnonFTP, NULL, "anon_ftp" }, { " Commit", "Commit any pending actions (dangerous!)", NULL, installCustomCommit }, { " Console settings", "Customize system console behavior.", NULL, dmenuSubmenu, NULL, &MenuSyscons }, { " Configure", "The system configuration menu.", NULL, dmenuSubmenu, NULL, &MenuConfigure }, { " Defaults, Load", "Load default settings.", NULL, dispatch_load_floppy }, { " Device, Mouse", "The mouse configuration menu.", NULL, dmenuSubmenu, NULL, &MenuMouse }, { " Disklabel", "The disk Label editor", NULL, diskLabelEditor }, { " Dists, All", "Root of the distribution tree.", NULL, dmenuSubmenu, NULL, &MenuDistributions }, { " Dists, Basic", "Basic FreeBSD distribution menu.", NULL, dmenuSubmenu, NULL, &MenuSubDistributions }, { " Dists, CRYPTO", "Encryption distribution menu.", NULL, dmenuSubmenu, NULL, &MenuCRYPTODistributions }, { " Dists, Developer", "Select developer's distribution.", checkDistDeveloper, distSetDeveloper }, { " Dists, Src", "Src distribution menu.", NULL, dmenuSubmenu, NULL, &MenuSrcDistributions }, { " Dists, X Developer", "Select X developer's distribution.", checkDistXDeveloper, distSetXDeveloper }, { " Dists, Kern Developer", "Select kernel developer's distribution.", checkDistKernDeveloper, distSetKernDeveloper }, { " Dists, User", "Select average user distribution.", checkDistUser, distSetUser }, { " Dists, X User", "Select average X user distribution.", checkDistXUser, distSetXUser }, { " Distributions, Adding", "Installing additional distribution sets", NULL, distExtractAll }, { " Distributions, XFree86","XFree86 distribution menu.", NULL, distSetXF86 }, { " Documentation", "Installation instructions, README, etc.", NULL, dmenuSubmenu, NULL, &MenuDocumentation }, { " Doc, README", "The distribution README file.", NULL, dmenuDisplayFile, NULL, "README" }, { " Doc, Hardware", "The distribution hardware guide.", NULL, dmenuDisplayFile, NULL, "HARDWARE" }, { " Doc, Install", "The distribution installation guide.", NULL, dmenuDisplayFile, NULL, "INSTALL" }, { " Doc, Copyright", "The distribution copyright notices.", NULL, dmenuDisplayFile, NULL, "COPYRIGHT" }, { " Doc, Release", "The distribution release notes.", NULL, dmenuDisplayFile, NULL, "RELNOTES" }, { " Doc, HTML", "The HTML documentation menu.", NULL, docBrowser }, { " Dump Vars", "(debugging) dump out internal variables.", NULL, dump_variables }, { " Emergency shell", "Start an Emergency Holographic shell.", NULL, installFixitHoloShell }, #ifdef __i386__ { " Fdisk", "The disk Partition Editor", NULL, diskPartitionEditor }, #endif { " Fixit", "Repair mode with CDROM or fixit floppy.", NULL, dmenuSubmenu, NULL, &MenuFixit }, { " FTP sites", "The FTP mirror site listing.", NULL, dmenuSubmenu, NULL, &MenuMediaFTP }, { " Gateway", "Set flag to route packets between interfaces.", dmenuVarCheck, dmenuToggleVariable, NULL, "gateway=YES" }, { " HTML Docs", "The HTML documentation menu", NULL, docBrowser }, { " Install, Standard", "A standard system installation.", NULL, installStandard }, { " Install, Express", "An express system installation.", NULL, installExpress }, { " Install, Custom", "The custom installation menu", NULL, dmenuSubmenu, NULL, &MenuInstallCustom }, { " Label", "The disk Label editor", NULL, diskLabelEditor }, { " Media", "Top level media selection menu.", NULL, dmenuSubmenu, NULL, &MenuMedia }, { " Media, Tape", "Select tape installation media.", NULL, mediaSetTape }, { " Media, NFS", "Select NFS installation media.", NULL, mediaSetNFS }, { " Media, Floppy", "Select floppy installation media.", NULL, mediaSetFloppy }, { " Media, CDROM", "Select CDROM installation media.", NULL, mediaSetCDROM }, { " Media, DOS", "Select DOS installation media.", NULL, mediaSetDOS }, { " Media, UFS", "Select UFS installation media.", NULL, mediaSetUFS }, { " Media, FTP", "Select FTP installation media.", NULL, mediaSetFTP }, { " Media, FTP Passive", "Select passive FTP installation media.", NULL, mediaSetFTPPassive }, { " Media, HTTP", "Select FTP via HTTP proxy installation media.", NULL, mediaSetHTTP }, { " Network Interfaces", "Configure network interfaces", NULL, tcpMenuSelect }, { " Networking Services", "The network services menu.", NULL, dmenuSubmenu, NULL, &MenuNetworking }, { " NFS, client", "Set NFS client flag.", dmenuVarCheck, dmenuToggleVariable, NULL, "nfs_client_enable=YES" }, { " NFS, server", "Set NFS server flag.", dmenuVarCheck, configNFSServer, NULL, "nfs_server_enable=YES" }, { " NTP Menu", "The NTP configuration menu.", NULL, dmenuSubmenu, NULL, &MenuNTP }, { " Options", "The options editor.", NULL, optionsEditor }, { " Packages", "The packages collection", NULL, configPackages }, { " Partition", "The disk Slice (PC-style partition) Editor", NULL, diskPartitionEditor }, { " PCNFSD", "Run authentication server for PC-NFS.", dmenuVarCheck, configPCNFSD, NULL, "pcnfsd" }, { " Root Password", "Set the system manager's password.", NULL, dmenuSystemCommand, NULL, "passwd root" }, { " Router", "Select routing daemon (default: routed)", NULL, configRouter, NULL, "router_enable" }, { " Syscons", "The system console configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSyscons }, { " Syscons, Font", "The console screen font.", NULL, dmenuSubmenu, NULL, &MenuSysconsFont }, { " Syscons, Keymap", "The console keymap configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap }, { " Syscons, Keyrate", "The console key rate configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsKeyrate }, { " Syscons, Saver", "The console screen saver configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsSaver }, { " Syscons, Screenmap", "The console screenmap configuration menu.", NULL, dmenuSubmenu, NULL, &MenuSysconsScrnmap }, { " Time Zone", "Set the system's time zone.", NULL, dmenuSystemCommand, NULL, "tzsetup" }, { " Upgrade", "Upgrade an existing system.", NULL, installUpgrade }, { " Usage", "Quick start - How to use this menu system.", NULL, dmenuDisplayFile, NULL, "usage" }, { " User Management", "Add user and group information.", NULL, dmenuSubmenu, NULL, &MenuUsermgmt }, { " XFree86, Fonts", "XFree86 Font selection menu.", NULL, dmenuSubmenu, NULL, &MenuXF86SelectFonts }, { " XFree86, Server", "XFree86 Server selection menu.", NULL, dmenuSubmenu, NULL, &MenuXF86SelectServer }, #ifdef __i386__ { " XFree86, PC98 Server", "XFree86 PC98 Server selection menu.", NULL, dmenuSubmenu, NULL, &MenuXF86SelectPC98Server }, #endif { NULL } }, }; /* The initial installation menu */ DMenu MenuInitial = { DMENU_NORMAL_TYPE, "/stand/sysinstall Main Menu", /* title */ "Welcome to the FreeBSD installation and configuration tool. Please\n" /* prompt */ "select one of the options below by using the arrow keys or typing the\n" "first character of the option name you're interested in. Invoke an\n" "option by pressing [ENTER] or [TAB-ENTER] to exit the installation.", "Press F1 for Installation Guide", /* help line */ "install", /* help file */ { { "Select" }, { "X Exit Install", NULL, NULL, dmenuExit }, { " Usage", "Quick start - How to use this menu system", NULL, dmenuDisplayFile, NULL, "usage" }, { "Standard", "Begin a standard installation (recommended)", NULL, installStandard }, { "Express", "Begin a quick installation (for the impatient)", NULL, installExpress }, { " Custom", "Begin a custom installation (for experts)", NULL, dmenuSubmenu, NULL, &MenuInstallCustom }, { "Configure", "Do post-install configuration of FreeBSD", NULL, dmenuSubmenu, NULL, &MenuConfigure }, { "Doc", "Installation instructions, README, etc.", NULL, dmenuSubmenu, NULL, &MenuDocumentation }, { "Keymap", "Select keyboard type", NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap }, { "Options", "View/Set various installation options", NULL, optionsEditor }, { "Fixit", "Enter repair mode with CDROM/floppy or start shell", NULL, dmenuSubmenu, NULL, &MenuFixit }, { "Upgrade", "Upgrade an existing system", NULL, installUpgrade }, { "Load Config","Load default install configuration", NULL, dispatch_load_floppy }, { "Index", "Glossary of functions", NULL, dmenuSubmenu, NULL, &MenuIndex }, { NULL } }, }; /* The main documentation menu */ DMenu MenuDocumentation = { DMENU_NORMAL_TYPE, "FreeBSD Documentation Menu", "If you are at all unsure about the configuration of your hardware\n" "or are looking to build a system specifically for FreeBSD, read the\n" "Hardware guide! New users should also read the Install document for\n" "a step-by-step tutorial on installing FreeBSD. For general information,\n" "consult the README file.", "Confused? Press F1 for help.", "usage", { { "X Exit", "Exit this menu (returning to previous)", NULL, dmenuExit }, { "2 README", "A general description of FreeBSD. Read this!", NULL, dmenuDisplayFile, NULL, "README" }, { "3 Hardware", "The FreeBSD survival guide for PC hardware.", NULL, dmenuDisplayFile, NULL, "HARDWARE" }, { "4 Install", "A step-by-step guide to installing FreeBSD.", NULL, dmenuDisplayFile, NULL, "INSTALL" }, { "5 Copyright", "The FreeBSD Copyright notices.", NULL, dmenuDisplayFile, NULL, "COPYRIGHT" }, { "6 Release" ,"The release notes for this version of FreeBSD.", NULL, dmenuDisplayFile, NULL, "RELNOTES" }, { "7 Shortcuts", "Creating shortcuts to sysinstall.", NULL, dmenuDisplayFile, NULL, "shortcuts" }, { "8 HTML Docs", "Go to the HTML documentation menu (post-install).", NULL, docBrowser }, { NULL } }, }; DMenu MenuMouseType = { DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS, "Select a protocol type for your mouse", "If your mouse is attached to the PS/2 mouse port or the bus mouse port,\n" "you should always choose \"Auto\", regardless of the model and the brand\n" "of the mouse. All other protocol types are for serial mice and should\n" "not be used with the PS/2 port mouse or the bus mouse. If you have\n" "a serial mouse and are not sure about its protocol, you should also try\n" "\"Auto\". It may not work for the serial mouse if the mouse does not\n" "support the PnP standard. But, it won't hurt. Many 2-button serial mice\n" "are compatible with \"Microsoft\" or \"MouseMan\". 3-button serial mice\n" "may be compatible with \"MouseSystems\" or \"MouseMan\". If the serial\n" "mouse has a wheel, it may be compatible with \"IntelliMouse\".", NULL, NULL, { { "1 Auto", "Bus mouse, PS/2 style mouse or PnP serial mouse", dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=auto" }, { "2 GlidePoint", "ALPS GlidePoint pad (serial)", dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=glidepoint" }, { "3 Hitachi","Hitachi tablet (serial)", dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mmhittab" }, { "4 IntelliMouse", "Microsoft IntelliMouse (serial)", dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=intellimouse" }, { "5 Logitech", "Logitech protocol (old models) (serial)", dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=logitech" }, { "6 Microsoft", "Microsoft protocol (serial)", dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=microsoft" }, { "7 MM Series","MM Series protocol (serial)", dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mmseries" }, { "8 MouseMan", "Logitech MouseMan/TrackMan models (serial)", dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mouseman" }, { "9 MouseSystems", "MouseSystems protocol (serial)", dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=mousesystems" }, { "A ThinkingMouse","Kensington ThinkingMouse (serial)", dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_TYPE "=thinkingmouse" }, { NULL } }, }; DMenu MenuMousePort = { DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS, "Select your mouse port from the following menu", "The built-in pointing device of laptop/notebook computers is usually\n" "a PS/2 style device.", NULL, NULL, { { "1 PS/2", "PS/2 style mouse (/dev/psm0)", dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/psm0" }, { "2 COM1", "Serial mouse on COM1 (/dev/cuaa0)", dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuaa0" }, { "3 COM2", "Serial mouse on COM2 (/dev/cuaa1)", dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuaa1" }, { "4 COM3", "Serial mouse on COM3 (/dev/cuaa2)", dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuaa2" }, { "5 COM4", "Serial mouse on COM4 (/dev/cuaa3)", dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuaa3" }, { "6 BusMouse", "Logitech, ATI or MS bus mouse (/dev/mse0)", dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/mse0" }, { NULL } }, }; DMenu MenuMouse = { DMENU_NORMAL_TYPE, "Please configure your mouse", "You can cut and paste text in the text console by running the mouse\n" "daemon. Specify a port and a protocol type of your mouse and enable\n" "the mouse daemon. If you don't want this feature, select 4 to disable\n" "the daemon.\n" "Once you've enabled the mouse daemon, you can specify \"/dev/sysmouse\"\n" "as your mouse device and \"SysMouse\" or \"MouseSystems\" as mouse\n" "protocol when running the X configuration utility (see Configuration\n" "menu).", NULL, NULL, { { "X Exit", "Exit this menu (returning to previous)", NULL, dmenuExit }, { "2 Enable", "Test and run the mouse daemon", NULL, mousedTest, NULL, NULL }, { "3 Type", "Select mouse protocol type", NULL, dmenuSubmenu, NULL, &MenuMouseType }, { "4 Port", "Select mouse port", NULL, dmenuSubmenu, NULL, &MenuMousePort }, { "5 Disable", "Disable the mouse daemon", NULL, mousedDisable, NULL, NULL }, { NULL } }, }; DMenu MenuXF86Config = { DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, "Please select the XFree86 configuration tool you want to use.", #ifdef __alpha__ "Due to problems with the VGA16 server right now, only the\n" "text-mode configuration tool (xf86config) is currently supported.", #else "The first tool, XF86Setup, is fully graphical and requires the\n" "VGA16 server in order to work (should have been selected by\n" "default, but if you de-selected it then you won't be able to\n" "use this fancy setup tool). The second tool, xf86config, is\n" "a more simplistic shell-script based tool and less friendly to\n" "new users, but it may work in situations where the fancier one\n" "does not.", #endif NULL, NULL, { { "X Exit", "Exit this menu (returning to previous)", NULL, dmenuExit }, #ifdef __alpha__ { "2 xf86config", "Shell-script based XFree86 configuration tool.", NULL, dmenuSetVariable, NULL, VAR_XF86_CONFIG "=xf86config" }, #else { "2 XF86Setup", "Fully graphical XFree86 configuration tool.", NULL, dmenuSetVariable, NULL, VAR_XF86_CONFIG "=XF86Setup" }, { "3 xf86config", "Shell-script based XFree86 configuration tool.", NULL, dmenuSetVariable, NULL, VAR_XF86_CONFIG "=xf86config" }, { "4 XF98Setup", "Fully graphical XFree86 configuration tool (PC98).", NULL, dmenuSetVariable, NULL, VAR_XF86_CONFIG "=XF98Setup" }, #endif { "D XDesktop", "X already set up, just do desktop configuration.", NULL, dmenuSubmenu, NULL, &MenuXDesktops }, { NULL } }, }; DMenu MenuXDesktops = { DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, "Please select the default X desktop to use.", "By default, XFree86 comes with a fairly vanilla desktop which\n" "is based around the twm(1) window manager and does not offer\n" "much in the way of features. It does have the advantage of\n" "being a standard part of X so you don't need to load anything\n" "extra in order to use it. If, however, you have access to a\n" "reasonably full packages collection on your installation media,\n" "you can choose any one of the following desktops as alternatives.", NULL, NULL, { { "X Exit", "Exit this menu (returning to previous)", NULL, dmenuExit }, { "2 KDE", "The K Desktop Environment.", NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=kde" }, { "3 GNOME + Afterstep", "GNOME + Afterstep window manager.", NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=gnome" }, { "4 GNOME + Enlightenment","GNOME + The E window manager", NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=enlightenment" }, { "5 Afterstep", "The Afterstep window manager", NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=afterstep" }, { "6 Windowmaker", "The Windowmaker window manager", NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=windowmaker" }, { "7 fvwm2", "The fvwm2 window manager", NULL, dmenuSetVariable, NULL, VAR_DESKSTYLE "=fvwm2" }, { NULL } }, }; DMenu MenuMediaCDROM = { DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, "Choose a CDROM type", "FreeBSD can be installed directly from a CDROM containing a valid\n" "FreeBSD distribution. If you are seeing this menu it is because\n" "more than one CDROM drive was found on your system. Please select one\n" "of the following CDROM drives as your installation drive.", "Press F1 to read the installation guide", "install", { { NULL } }, }; DMenu MenuMediaFloppy = { DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, "Choose a Floppy drive", "You have more than one floppy drive. Please choose which drive\n" "you would like to use.", NULL, NULL, { { NULL } }, }; DMenu MenuMediaDOS = { DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, "Choose a DOS partition", "FreeBSD can be installed directly from a DOS partition\n" "assuming, of course, that you have copied the relevant\n" "distributions into your DOS partition before starting this\n" "installation. If this is not the case then you should reboot\n" "DOS at this time and copy the distributions you wish to install\n" "into a \"FREEBSD\" subdirectory on one of your DOS partitions.\n" "Otherwise, please select the DOS partition containing the FreeBSD\n" "distribution files.", "Press F1 to read the installation guide", "install", { { NULL } }, }; DMenu MenuMediaFTP = { DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, "Please select a FreeBSD FTP distribution site", "Please select the site closest to you or \"other\" if you'd like to\n" "specify a different choice. Also note that not every site listed here\n" "carries more than the base distribution kits. Only the Primary site is\n" "guaranteed to carry the full range of possible distributions.", "Select a site that's close!", "install", { { "Primary Site", "ftp.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AS("=ftp://ftp.freebsd.org/pub/FreeBSD/releases/") }, { "URL", "Specify some other ftp site by URL", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH "=other" }, { " 5.0 SNAP Server", "current.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AS("=ftp://current.freebsd.org/pub/FreeBSD/snapshots/") }, { " 4.0 SNAP Server", "releng4.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AS("=ftp://releng4.freebsd.org/pub/FreeBSD/snapshots/") }, { "Argentina", "ftp.ar.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp.ar.freebsd.org") }, { " Australia", "ftp.au.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp.au.freebsd.org") }, { " Australia #2","ftp2.au.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp2.au.freebsd.org") }, { " Australia #3","ftp3.au.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp3.au.freebsd.org") }, { " Australia #4","ftp4.au.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp4.au.freebsd.org") }, { " Australia #5","ftp5.au.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp5.au.freebsd.org") }, { "Brazil", "ftp.br.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp.br.freebsd.org") }, { " Brazil #2", "ftp2.br.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp2.br.freebsd.org") }, { " Brazil #3", "ftp3.br.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp3.br.freebsd.org") }, { " Brazil #4", "ftp4.br.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp4.br.freebsd.org") }, { " Brazil #5", "ftp5.br.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp5.br.freebsd.org") }, { " Brazil #6", "ftp6.br.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp6.br.freebsd.org") }, { " Brazil #7", "ftp7.br.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp7.br.freebsd.org") }, { " Canada", "ftp.ca.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp.ca.freebsd.org") }, { " Czech Republic", "ftp.cz.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp.cz.freebsd.org") }, { "Denmark", "ftp.dk.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp.dk.freebsd.org") }, { " Denmark #2", "ftp2.dk.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp2.dk.freebsd.org") }, { "Estonia", "ftp.ee.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp.ee.freebsd.org") }, { "Finland", "ftp.fi.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp.fi.freebsd.org") }, { " France", "ftp.fr.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp.fr.freebsd.org") }, { " France #2", "ftp2.fr.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp2.fr.freebsd.org") }, { " France #3", "ftp3.fr.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp3.fr.freebsd.org") }, { "Germany", "ftp.de.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp.de.freebsd.org") }, { " Germany #2", "ftp2.de.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp2.de.freebsd.org") }, { " Germany #3", "ftp3.de.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp3.de.freebsd.org") }, { " Germany #4", "ftp4.de.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp4.de.freebsd.org") }, { " Germany #5", "ftp5.de.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp5.de.freebsd.org") }, { " Germany #6", "ftp6.de.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp6.de.freebsd.org") }, { " Germany #7", "ftp7.de.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp7.de.freebsd.org") }, { "Holland", "ftp.nl.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp.nl.freebsd.org") }, { " Hong Kong", "ftp.hk.super.net", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp.hk.super.net") }, { "Iceland", "ftp.is.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp.is.freebsd.org") }, { " Ireland", "ftp.ie.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp.ie.freebsd.org") }, { " Israel", "ftp.il.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp.il.freebsd.org") }, { " Israel #2", "ftp2.il.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp2.il.freebsd.org") }, { "Japan", "ftp.jp.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp.jp.freebsd.org") }, { " Japan #2", "ftp2.jp.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp2.jp.freebsd.org") }, { " Japan #3", "ftp3.jp.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp3.jp.freebsd.org") }, { " Japan #4", "ftp4.jp.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp4.jp.freebsd.org") }, { " Japan #5", "ftp5.jp.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp5.jp.freebsd.org") }, { " Japan #6", "ftp6.jp.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp6.jp.freebsd.org") }, { "Korea", "ftp.kr.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp.kr.freebsd.org") }, { " Korea #2", "ftp2.kr.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp2.kr.freebsd.org") }, { " Korea #3", "ftp3.kr.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp3.kr.freebsd.org") }, { " Korea #4", "ftp4.kr.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp4.kr.freebsd.org") }, { " Korea #5", "ftp5.kr.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp5.kr.freebsd.org") }, { "New Zealand", "ftp.nz.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp.nz.freebsd.org") }, { "Poland", "ftp.pl.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp.pl.freebsd.org") }, { " Portugal", "ftp.pt.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp.pt.freebsd.org") }, { " Portugal #2", "ftp2.pt.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp2.pt.freebsd.org") }, { "Russia", "ftp.ru.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp.ru.freebsd.org") }, { " Russia #2", "ftp2.ru.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp2.ru.freebsd.org") }, { " Russia #3", "ftp3.ru.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp3.ru.freebsd.org") }, { " Russia #4", "ftp4.ru.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp4.ru.freebsd.org") }, { "Slovak Republic", "ftp.sk.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp.sk.freebsd.org") }, { " South Africa", "ftp.za.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp.za.freebsd.org") }, { " South Africa #2", "ftp2.za.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp2.za.freebsd.org") }, { " South Africa #3", "ftp3.za.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp3.za.freebsd.org") }, { " South Africa #4", "ftp4.za.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp4.za.freebsd.org") }, { " Spain", "ftp.es.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp.es.freebsd.org") }, { " Spain #2", "ftp2.es.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp2.es.freebsd.org") }, { " Sweden", "ftp.se.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp.se.freebsd.org") }, { " Sweden #2", "ftp2.se.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp2.se.freebsd.org") }, { " Sweden #3", "ftp3.se.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp3.se.freebsd.org") }, { "Taiwan", "ftp.tw.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp.tw.freebsd.org") }, { " Taiwan #2", "ftp2.tw.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp2.tw.freebsd.org") }, { " Taiwan #3", "ftp3.tw.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp3.tw.freebsd.org") }, { " Thailand", "ftp.nectec.or.th", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AS("=ftp://ftp.nectec.or.th/pub/mirrors/FreeBSD/") }, { "UK", "ftp.uk.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp.uk.freebsd.org") }, { " UK #2", "ftp2.uk.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp2.uk.freebsd.org") }, { " UK #3", "ftp3.uk.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp3.uk.freebsd.org") }, { " UK #4", "ftp4.uk.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp4.uk.freebsd.org") }, { " UK #5", "ftp5.uk.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp5.uk.freebsd.org") }, { " USA", "ftp.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp.freebsd.org") }, { " USA #2", "ftp2.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp2.freebsd.org") }, { " USA #3", "ftp3.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp3.freebsd.org") }, { " USA #4", "ftp4.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp4.freebsd.org") }, { " USA #5", "ftp5.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp5.freebsd.org") }, { " USA #6", "ftp6.freebsd.org", NULL, dmenuSetVariable, NULL, VAR_FTP_PATH _AP("=ftp://ftp6.freebsd.org") }, { NULL } } }; DMenu MenuMediaTape = { DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, "Choose a tape drive type", "FreeBSD can be installed from tape drive, though this installation\n" "method requires a certain amount of temporary storage in addition\n" "to the space required by the distribution itself (tape drives make\n" "poor random-access devices, so we extract _everything_ on the tape\n" "in one pass). If you have sufficient space for this, then you should\n" "select one of the following tape devices detected on your system.", "Press F1 to read the installation guide", "install", { { NULL } }, }; DMenu MenuNetworkDevice = { DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, "Network interface information required", "If you are using PPP over a serial device, as opposed to a direct\n" "ethernet connection, then you may first need to dial your Internet\n" "Service Provider using the ppp utility we provide for that purpose.\n" "If you're using SLIP over a serial device then the expectation is\n" "that you have a HARDWIRED connection.\n\n" "You can also install over a parallel port using a special \"laplink\"\n" "cable to another machine running a fairly recent (2.0R or later)\n" "version of FreeBSD.", "Press F1 to read network configuration manual", "network_device", { { NULL } }, }; /* The media selection menu */ DMenu MenuMedia = { DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, "Choose Installation Media", "FreeBSD can be installed from a variety of different installation\n" "media, ranging from floppies to an Internet FTP server. If you're\n" "installing FreeBSD from a supported CDROM drive then this is generally\n" "the best media to use if you have no overriding reason for using other\n" "media.", "Press F1 for more information on the various media types", "media", { { "1 CDROM", "Install from a FreeBSD CDROM", NULL, mediaSetCDROM }, { "2 FTP", "Install from an FTP server", NULL, mediaSetFTPActive }, { "3 FTP Passive", "Install from an FTP server through a firewall", NULL, mediaSetFTPPassive }, { "3b HTTP", "Install from an FTP server through a http proxy", NULL, mediaSetHTTP }, { "4 DOS", "Install from a DOS partition", NULL, mediaSetDOS }, { "5 NFS", "Install over NFS", NULL, mediaSetNFS }, { "6 File System", "Install from an existing filesystem", NULL, mediaSetUFS }, { "7 Floppy", "Install from a floppy disk set", NULL, mediaSetFloppy }, { "8 Tape", "Install from SCSI or QIC tape", NULL, mediaSetTape }, { "9 Options", "Go to the Options screen", NULL, optionsEditor }, { NULL } }, }; /* The distributions menu */ DMenu MenuDistributions = { DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS, "Choose Distributions", "As a convenience, we provide several \"canned\" distribution sets.\n" "These select what we consider to be the most reasonable defaults for the\n" "type of system in question. If you would prefer to pick and choose the\n" "list of distributions yourself, simply select \"Custom\". You can also\n" "pick a canned distribution set and then fine-tune it with the Custom item.\n\n" "Choose an item by pressing [SPACE]. When you are finished, choose the Exit\n" "item or press [ENTER].", "Press F1 for more information on these options.", "distributions", { { "X Exit", "Exit this menu (returning to previous)", checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' }, { "All", "All system sources, binaries and X Window System)", checkDistEverything, distSetEverything, NULL, NULL, ' ', ' ', ' ' }, { "Reset", "Reset selected distribution list to nothing", NULL, distReset, NULL, NULL, ' ', ' ', ' ' }, { "4 Developer", "Full sources, binaries and doc but no games", checkDistDeveloper, distSetDeveloper }, { "5 X-Developer", "Same as above + X Window System", checkDistXDeveloper, distSetXDeveloper }, { "6 Kern-Developer", "Full binaries and doc, kernel sources only", checkDistKernDeveloper, distSetKernDeveloper }, { "7 X-Kern-Developer", "Same as above + X Window System", checkDistXKernDeveloper, distSetXKernDeveloper }, { "8 User", "Average user - binaries and doc only", checkDistUser, distSetUser }, { "9 X-User", "Same as above + X Window System", checkDistXUser, distSetXUser }, { "A Minimal", "The smallest configuration possible", checkDistMinimum, distSetMinimum }, { "B Custom", "Specify your own distribution set", NULL, dmenuSubmenu, NULL, &MenuSubDistributions, '>', '>', '>' }, { NULL } }, }; DMenu MenuSubDistributions = { DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS, "Select the distributions you wish to install.", "Please check off the distributions you wish to install. At the\n" "very minimum, this should be \"bin\". WARNING: Do not export the\n" "Encryption distribution out of the U.S.!\n" "It is for U.S. customers only.", NULL, NULL, { { "X Exit", "Exit this menu (returning to previous)", checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' }, { "All", "All system sources, binaries and X Window System", NULL, distSetEverything, NULL, NULL, ' ', ' ', ' ' }, { "Reset", "Reset all of the below", NULL, distReset, NULL, NULL, ' ', ' ', ' ' }, { " bin", "Binary base distribution (required)", dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_BIN }, #ifdef __i386__ { " compat1x", "FreeBSD 1.x binary compatibility", dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT1X }, { " compat20", "FreeBSD 2.0 binary compatibility", dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT20 }, { " compat21", "FreeBSD 2.1 binary compatibility", dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT21 }, { " compat22", "FreeBSD 2.2.x and 3.0 a.out binary compatibility", dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT22 }, #if __FreeBSD__ > 3 { " compat3x", "FreeBSD 3.x binary compatibility", dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_COMPAT3X }, #endif #endif { " CRYPTO", "Encryption code - NOT FOR EXPORT!", CRYPTOFlagCheck,distSetCRYPTO }, { " dict", "Spelling checker dictionary files", dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_DICT }, { " doc", "Miscellaneous FreeBSD online docs", dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_DOC }, { " games", "Games (non-commercial)", dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_GAMES }, { " info", "GNU info files", dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_INFO }, { " man", "System manual pages - recommended", dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_MANPAGES }, { " catman", "Preformatted system manual pages", dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_CATPAGES }, { " proflibs", "Profiled versions of the libraries", dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_PROFLIBS }, { " src", "Sources for everything but encryption", srcFlagCheck, distSetSrc }, { " ports", "The FreeBSD Ports collection", dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_PORTS }, { " local", "Local additions collection", dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_LOCAL}, { " XFree86", "The XFree86 3.3.6 distribution", #ifdef X_AS_PKG dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_XF86 }, #else x11FlagCheck, distSetXF86 }, #endif { NULL } }, }; DMenu MenuCRYPTODistributions = { DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS, "Select the encryption facilities you wish to install.", "Please check off any special encryption distributions\n" "you would like to install. Please note that these services are NOT FOR\n" "EXPORT from the United States. For information on non-U.S. FTP\n" "distributions of this software, please consult the release notes.", NULL, NULL, { { "X Exit", "Exit this menu (returning to previous)", checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' }, { "All", "Select all of the below", NULL, setCRYPTO, NULL, NULL, ' ', ' ', ' ' }, { "Reset", "Reset all of the below", NULL, clearCRYPTO, NULL, NULL, ' ', ' ', ' ' }, { " crypto", "Basic encryption services", dmenuFlagCheck, dmenuSetFlag, NULL, &CRYPTODists, '[', 'X', ']', DIST_CRYPTO_CRYPTO, }, #if __FreeBSD__ <= 3 { " krb", "KerberosIV authentication services", dmenuFlagCheck, dmenuSetFlag, NULL, &CRYPTODists, '[', 'X', ']', DIST_CRYPTO_KERBEROS }, #else { " krb4", "KerberosIV authentication services", dmenuFlagCheck, dmenuSetFlag, NULL, &CRYPTODists, '[', 'X', ']', DIST_CRYPTO_KERBEROS4 }, { " krb5", "Kerberos5 authentication services", dmenuFlagCheck, dmenuSetFlag, NULL, &CRYPTODists, '[', 'X', ']', DIST_CRYPTO_KERBEROS5 }, #endif { " skrb4", "Sources for KerberosIV", dmenuFlagCheck, dmenuSetFlag, NULL, &CRYPTODists, '[', 'X', ']', DIST_CRYPTO_SKERBEROS4 }, { " skrb5", "Sources for Kerberos5", dmenuFlagCheck, dmenuSetFlag, NULL, &CRYPTODists, '[', 'X', ']', DIST_CRYPTO_SKERBEROS5 }, { " ssecure", "BSD encryption sources", dmenuFlagCheck, dmenuSetFlag, NULL, &CRYPTODists, '[', 'X', ']', DIST_CRYPTO_SSECURE }, { " scrypto", "Contributed encryption sources", dmenuFlagCheck, dmenuSetFlag, NULL, &CRYPTODists, '[', 'X', ']', DIST_CRYPTO_SCRYPTO }, { NULL } }, }; DMenu MenuSrcDistributions = { DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS, "Select the sub-components of src you wish to install.", "Please check off those portions of the FreeBSD source tree\n" "you wish to install (remember to use SPACE, not ENTER!).", NULL, NULL, { { "X Exit", "Exit this menu (returning to previous)", checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' }, { "All", "Select all of the below", NULL, setSrc, NULL, NULL, ' ', ' ', ' ' }, { "Reset", "Reset all of the below", NULL, clearSrc, NULL, NULL, ' ', ' ', ' ' }, { " base", "top-level files in /usr/src", dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_BASE }, { " contrib", "/usr/src/contrib (contributed software)", dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_CONTRIB }, { " gnu", "/usr/src/gnu (software from the GNU Project)", dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_GNU }, { " etc", "/usr/src/etc (miscellaneous system files)", dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_ETC }, { " games", "/usr/src/games (the obvious!)", dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_GAMES }, { " include", "/usr/src/include (header files)", dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_INCLUDE }, { " lib", "/usr/src/lib (system libraries)", dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_LIB }, { " libexec", "/usr/src/libexec (system programs)", dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_LIBEXEC }, { " release", "/usr/src/release (release-generation tools)", dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_RELEASE }, { " bin", "/usr/src/bin (system binaries)", dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_BIN }, { " sbin", "/usr/src/sbin (system binaries)", dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SBIN }, { " share", "/usr/src/share (documents and shared files)", dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SHARE }, { " sys", "/usr/src/sys (FreeBSD kernel)", dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SYS }, { " tools", "/usr/src/tools (miscellaneous tools)", dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_TOOLS }, { " ubin", "/usr/src/usr.bin (user binaries)", dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_UBIN }, { " usbin", "/usr/src/usr.sbin (aux system binaries)", dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_USBIN }, { NULL } }, }; DMenu MenuXF86Select = { DMENU_NORMAL_TYPE, "XFree86 3.3.6 Distribution", "Please select the components you need from the XFree86 3.3.6\n" "distribution sets.", NULL, NULL, { { "X Exit", "Exit this menu (returning to previous)", NULL, dmenuExit }, { "Basic", "Basic component menu (required)", NULL, dmenuSubmenu, NULL, &MenuXF86SelectCore }, { "Server", "X server menu", NULL, dmenuSubmenu, NULL, &MenuXF86SelectServer }, { "Fonts", "Font set menu", NULL, dmenuSubmenu, NULL, &MenuXF86SelectFonts }, { NULL } }, }; DMenu MenuXF86SelectCore = { DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS, "XFree86 3.3.6 base distribution types", "Please check off the basic XFree86 components you wish to install.\n" "Bin, lib, and set are recommended for a minimum installaion.", NULL, NULL, { { "X Exit", "Exit this menu (returning to previous)", checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' }, { "All", "Select all below", NULL, setX11Misc, NULL, NULL, ' ', ' ', ' ' }, { "Reset", "Reset all below", NULL, clearX11Misc, NULL, NULL, ' ', ' ', ' ' }, { " bin", "Client applications and shared libs", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_BIN }, { " cfg", "Configuration files", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_CFG }, { " doc", "READMEs and release notes", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_DOC }, { " html", "HTML documentation files", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_HTML }, { " lib", "Data files needed at runtime", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_LIB }, { " lkit", "Server link kit for all other machines", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_LKIT }, { " man", "Manual pages", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_MAN }, { " prog", "Programmer's header and library files", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_PROG }, { " set", "XFree86 Setup Utility", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_SET }, #ifdef __i386__ { " 9set", "XFree86 Setup Utility for PC98 machines", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_9SET }, { " lk98", "Server link kit for PC98 machines", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_LKIT98 }, #endif { NULL } }, }; DMenu MenuXF86SelectFonts = { DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS, "Font distribution selection.", "Please check off the individual font distributions you wish to\n\ install. At the minimum, you should install the standard\n\ 75 DPI and misc fonts if you're also installing a server\n\ (these are selected by default).", NULL, NULL, { { "X Exit", "Exit this menu (returning to previous)", checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' }, { "All", "All fonts", NULL, setX11Fonts, NULL, NULL, ' ', ' ', ' ' }, { "Reset", "Reset font selections", NULL, clearX11Fonts, NULL, NULL, ' ', ' ', ' ' }, { " fnts", "Standard 75 DPI and miscellaneous fonts", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_MISC }, { " f100", "100 DPI fonts", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_100 }, { " fcyr", "Cyrillic Fonts", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_CYR }, { " fscl", "Speedo and Type scalable fonts", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_SCALE }, { " non", "Japanese, Chinese and other non-english fonts", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_NON }, { " server", "Font server", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_SERVER }, { NULL } }, }; DMenu MenuXF86SelectServer = { DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS, "X Server selection.", "Please check off the types of X servers you wish to install.\n" "If you are unsure as to which server will work for your graphics card,\n" "it is recommended that try the SVGA or VGA16 servers or, for PC98\n" "machines, the 9EGC or 9840 servers.", NULL, NULL, { { "X Exit", "Exit this menu (returning to previous)", checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' }, { "All", "Select all of the above", NULL, setX11Servers, NULL, NULL, ' ', ' ', ' ' }, { "Reset", "Reset all of the above", NULL, clearX11Servers, NULL, NULL, ' ', ' ', ' ' }, { " SVGA", "Standard VGA or Super VGA card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_SVGA }, { " VGA16", "Standard 16 color VGA card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_VGA16 }, { " Mono", "Standard Monochrome card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_MONO }, { " 3DL", "8, 16 and 24 bit color 3D Labs boards", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_3DL }, { " 8514", "8-bit (256 color) IBM 8514 or compatible card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_8514 }, { " AGX", "8-bit AGX card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_AGX }, { " I128", "8, 16 and 24-bit #9 Imagine I128 card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_I128 }, { " Ma8", "8-bit ATI Mach8 card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_MACH8 }, { " Ma32", "8 and 16-bit (65K color) ATI Mach32 card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_MACH32 }, { " Ma64", "8 and 16-bit (65K color) ATI Mach64 card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_MACH64 }, { " P9K", "8, 16, and 24-bit color Weitek P9000 based boards", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_P9000 }, { " S3", "8, 16 and 24-bit color S3 based boards", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_S3 }, { " S3V", "8, 16 and 24-bit color S3 Virge based boards", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_S3V }, { " W32", "8-bit ET4000/W32, /W32i and /W32p cards", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_W32 }, #ifdef __i386__ { " PC98", "Select an X server for a NEC PC98 [Submenu]", NULL, dmenuSubmenu, NULL, &MenuXF86SelectPC98Server, '>', ' ', '>', 0 }, #elif __alpha__ { " TGA", "TGA cards (alpha architecture only)", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_TGA }, #endif { NULL } }, }; #ifdef __i386__ DMenu MenuXF86SelectPC98Server = { DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS, "PC98 X Server selection.", "Please check off the types of NEC PC98 X servers you wish to install.\n\ If you are unsure as to which server will work for your graphics card,\n\ it is recommended that try the SVGA or VGA16 servers (the VGA16 and\n\ Mono servers are particularly well-suited to most LCD displays).", NULL, NULL, { { " 9480", "PC98 8-bit (256 color) PEGC-480 card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9480 }, { " 9EGC", "PC98 4-bit (16 color) EGC card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9EGC }, { " 9GA9", "PC98 GA-968V4/PCI (S3 968) card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9GA9 }, { " 9GAN", "PC98 GANB-WAP (cirrus) card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9GAN }, { " 9LPW", "PC98 PowerWindowLB (S3) card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9LPW }, { " 9MGA", "PC98 MGA (Matrox) card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9MGA }, { " 9NKV", "PC98 NKV-NEC (cirrus) card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9NKV }, { " 9NS3", "PC98 NEC (S3) card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9NS3 }, { " 9SPW", "PC98 SKB-PowerWindow (S3) card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9SPW }, { " 9SVG", "PC98 generic SVGA card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9SVG }, { " 9TGU", "PC98 Cyber9320 and TGUI9680 cards", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9TGU }, { " 9WEP", "PC98 WAB-EP (cirrus) card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9WEP }, { " 9WS", "PC98 WABS (cirrus) card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9WS }, { " 9WSN", "PC98 WSN-A2F (cirrus) card", dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_9WSN }, { NULL } } }; #endif DMenu MenuDiskDevices = { DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS, "Select Drive(s)", "Please select the drive, or drives, on which you wish to perform\n" "this operation. If you are attempting to install a boot partition\n" "on a drive other than the first one or have multiple operating\n" "systems on your machine, you will have the option to install a boot\n" "manager later. To select a drive, use the arrow keys to move to it\n" "and press [SPACE]. To de-select it, press [SPACE] again.\n\n" "Select OK or Cancel to leave this menu.", "Press F1 for important information regarding disk geometry!", "drives", { { NULL } }, }; DMenu MenuHTMLDoc = { DMENU_NORMAL_TYPE, "Select HTML Documentation pointer", "Please select the body of documentation you're interested in, the main\n" "ones right now being the FAQ and the Handbook. You can also choose \"other\"\n" "to enter an arbitrary URL for browsing.", "Press F1 for more help on what you see here.", "html", { { "X Exit", "Exit this menu (returning to previous)", NULL, dmenuExit }, { "2 Handbook", "The FreeBSD Handbook.", NULL, docShowDocument }, { "3 FAQ", "The Frequently Asked Questions guide.", NULL, docShowDocument }, { "4 Home", "The Home Pages for the FreeBSD Project (requires net)", NULL, docShowDocument }, { "5 Other", "Enter a URL.", NULL, docShowDocument }, { NULL } }, }; /* The main installation menu */ DMenu MenuInstallCustom = { DMENU_NORMAL_TYPE, "Choose Custom Installation Options", "This is the custom installation menu. You may use this menu to specify\n" "details on the type of distribution you wish to have, where you wish\n" "to install it from and how you wish to allocate disk storage to FreeBSD.", "Press F1 to read the installation guide", "install", { { "X Exit", "Exit this menu (returning to previous)", NULL, dmenuExit }, { "2 Options", "View/Set various installation options", NULL, optionsEditor }, #ifdef __alpha__ { "3 Label", "Label disk partitions", NULL, diskLabelEditor }, { "4 Distributions", "Select distribution(s) to extract", NULL, dmenuSubmenu, NULL, &MenuDistributions }, { "5 Media", "Choose the installation media type", NULL, dmenuSubmenu, NULL, &MenuMedia }, { "6 Commit", "Perform any pending Partition/Label/Extract actions", NULL, installCustomCommit }, #else { "3 Partition", "Allocate disk space for FreeBSD", NULL, diskPartitionEditor }, { "4 Label", "Label allocated disk partitions", NULL, diskLabelEditor }, { "5 Distributions", "Select distribution(s) to extract", NULL, dmenuSubmenu, NULL, &MenuDistributions }, { "6 Media", "Choose the installation media type", NULL, dmenuSubmenu, NULL, &MenuMedia }, { "7 Commit", "Perform any pending Partition/Label/Extract actions", NULL, installCustomCommit }, #endif { NULL } }, }; /* MBR type menu */ DMenu MenuMBRType = { DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS, "overwrite me", /* will be disk specific label */ "FreeBSD comes with a boot selector that allows you to easily\n" "select between FreeBSD and any other operating systems on your machine\n" "at boot time. If you have more than one drive and want to boot\n" "from the second one, the boot selector will also make it possible\n" "to do so (limitations in the PC BIOS usually prevent this otherwise).\n" "If you do not want a boot selector, or wish to replace an existing\n" "one, select \"standard\". If you would prefer your Master Boot\n" "Record to remain untouched then select \"None\".\n\n" " NOTE: PC-DOS users will almost certainly require \"None\"!", "Press F1 to read about drive setup", "drives", { { "BootMgr", "Install the FreeBSD Boot Manager", dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr }, { "Standard", "Install a standard MBR (no boot manager)", dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '(', '*', ')', 1 }, { "None", "Leave the Master Boot Record untouched", dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '(', '*', ')', 2 }, { NULL } }, }; /* Final configuration menu */ DMenu MenuConfigure = { DMENU_NORMAL_TYPE, "FreeBSD Configuration Menu", /* title */ "If you've already installed FreeBSD, you may use this menu to customize\n" "it somewhat to suit your particular configuration. Most importantly,\n" "you can use the Packages utility to load extra \"3rd party\"\n" "software not provided in the base distributions.", "Press F1 for more information on these options", "configure", { { "X Exit", "Exit this menu (returning to previous)", NULL, dmenuExit }, { " Distributions", "Install additional distribution sets", NULL, distExtractAll }, { " Packages", "Install pre-packaged software for FreeBSD", NULL, configPackages }, { " Root Password", "Set the system manager's password", NULL, dmenuSystemCommand, NULL, "passwd root" }, #ifdef __i386__ { " Fdisk", "The disk Slice (PC-style partition) Editor", NULL, diskPartitionEditor }, #endif { " Label", "The disk Label editor", NULL, diskLabelEditor }, { " User Management", "Add user and group information", NULL, dmenuSubmenu, NULL, &MenuUsermgmt }, { " Console", "Customize system console behavior", NULL, dmenuSubmenu, NULL, &MenuSyscons }, { " Time Zone", "Set which time zone you're in", NULL, dmenuSystemCommand, NULL, "tzsetup" }, { " Media", "Change the installation media type", NULL, dmenuSubmenu, NULL, &MenuMedia }, { " Mouse", "Configure your mouse", NULL, dmenuSubmenu, NULL, &MenuMouse, NULL }, { " Networking", "Configure additional network services", NULL, dmenuSubmenu, NULL, &MenuNetworking }, { " Startup", "Configure system startup options", NULL, dmenuSubmenu, NULL, &MenuStartup }, { " Options", "View/Set various installation options", NULL, optionsEditor }, { " XFree86", "Configure XFree86 Server", NULL, configXSetup }, { " Desktop", "Configure XFree86 Desktop", NULL, configXDesktop }, { " HTML Docs", "Go to the HTML documentation menu (post-install)", NULL, docBrowser }, { NULL } }, }; DMenu MenuStartup = { DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS, "Startup Services Menu", "This menu allows you to configure various aspects of your system's\n" "startup configuration. Remember to use SPACE to select items! The\n" "RETURN key will leave this menu (as with all checkbox menus).", NULL, NULL, { { "X Exit", "Exit this menu (returning to previous)", checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' }, { " APM", "Auto-power management services (typically laptops)", dmenuVarCheck, dmenuToggleVariable, NULL, "apm_enable=YES" }, { " pccard", "Enable PCCARD (AKA PCMCIA) services (also laptops)", dmenuVarCheck, dmenuToggleVariable, NULL, "pccard_enable=YES" }, { " pccard mem", "Set PCCARD memory address (if enabled)", dmenuVarCheck, dmenuISetVariable, NULL, "pccard_mem" }, { " pccard ifconfig", "List of PCCARD ethernet devices to configure", dmenuVarCheck, dmenuISetVariable, NULL, "pccard_ifconfig" }, { " ", " -- ", NULL, NULL, NULL, NULL, ' ', ' ', ' ' }, { " startup dirs", "Set the list of dirs to look for startup scripts", dmenuVarCheck, dmenuISetVariable, NULL, "local_startup" }, { " named", "Run a local name server on this host", dmenuVarCheck, dmenuToggleVariable, NULL, "named_enable=YES" }, { " named flags", "Set default flags to named (if enabled)", dmenuVarCheck, dmenuISetVariable, NULL, "named_flags" }, { " nis client", "This host wishes to be an NIS client.", dmenuVarCheck, dmenuToggleVariable, NULL, "nis_client_enable=YES" }, { " nis domainname", "Set NIS domainname (if enabled)", dmenuVarCheck, dmenuISetVariable, NULL, "nisdomainname" }, { " nis server", "This host wishes to be an NIS server.", dmenuVarCheck, dmenuToggleVariable, NULL, "nis_server_enable=YES" }, { " ", " -- ", NULL, NULL, NULL, NULL, ' ', ' ', ' ' }, { " accounting", "This host wishes to run process accounting.", dmenuVarCheck, dmenuToggleVariable, NULL, "accounting_enable=YES" }, { " lpd", "This host has a printer and wants to run lpd.", dmenuVarCheck, dmenuToggleVariable, NULL, "lpd_enable=YES" }, #ifdef __i386__ { " linux", "This host wants to be able to run linux binaries.", dmenuVarCheck, configLinux, NULL, VAR_LINUX_ENABLE "=YES" }, { " SVR4", "This host wants to be able to run SVR4 binaries.", dmenuVarCheck, dmenuToggleVariable, NULL, "svr4_enable=YES" }, { " SCO", "This host wants to be able to run IBCS2 binaries.", dmenuVarCheck, dmenuToggleVariable, NULL, "ibcs2_enable=YES" }, #elif __alpha__ { " OSF/1", "This host wants to be able to run DEC OSF/1 binaries.", dmenuVarCheck, dmenuToggleVariable, NULL, "osf1_enable=YES" }, #endif { " quotas", "This host wishes to check quotas on startup.", dmenuVarCheck, dmenuToggleVariable, NULL, "check_quotas=YES" }, { NULL } }, }; DMenu MenuNetworking = { DMENU_CHECKLIST_TYPE | DMENU_SELECTION_RETURNS, "Network Services Menu", "You may have already configured one network device (and the other\n" "various hostname/gateway/name server parameters) in the process\n" "of installing FreeBSD. This menu allows you to configure other\n" "aspects of your system's network configuration.", NULL, NULL, { { "X Exit", "Exit this menu (returning to previous)", checkTrue, dmenuExit, NULL, NULL, '<', '<', '<' }, { " Interfaces", "Configure additional network interfaces", NULL, tcpMenuSelect }, { " AMD", "This machine wants to run the auto-mounter service", dmenuVarCheck, dmenuToggleVariable, NULL, "amd_enable=YES" }, { " AMD Flags", "Set flags to AMD service (if enabled)", dmenuVarCheck, dmenuISetVariable, NULL, "amd_flags" }, { " Anon FTP", "This machine wishes to allow anonymous FTP.", dmenuVarCheck, configAnonFTP, NULL, "anon_ftp" }, { " Gateway", "This machine will route packets between interfaces", dmenuVarCheck, dmenuToggleVariable, NULL, "gateway_enable=YES" }, { " NFS client", "This machine will be an NFS client", dmenuVarCheck, dmenuToggleVariable, NULL, "nfs_client_enable=YES" }, { " NFS server", "This machine will be an NFS server", dmenuVarCheck, configNFSServer, NULL, "nfs_server_enable=YES" }, { " Ntpdate", "Select a clock-synchronization server", dmenuVarCheck, dmenuSubmenu, NULL, &MenuNTP, '[', 'X', ']', "ntpdate_enable=YES" }, { " PCNFSD", "Run authentication server for clients with PC-NFS.", dmenuVarCheck, configPCNFSD, NULL, "pcnfsd" }, { " Routed", "Select routing daemon (default: routed)", dmenuVarCheck, configRouter, NULL, "router_enable=YES" }, { " Rwhod", "This machine wants to run the rwho daemon", dmenuVarCheck, dmenuToggleVariable, NULL, "rwhod_enable=YES" }, { " Sendmail", "This machine wants to run the sendmail daemon", dmenuVarCheck, dmenuToggleVariable, NULL, "sendmail_enable=YES" }, { " Sshd", "This machine wants to run the ssh daemon", dmenuVarCheck, dmenuToggleVariable, NULL, "sshd_enable=YES" }, { " TCP Extensions", "Allow RFC1323 and RFC1644 TCP extensions?", dmenuVarCheck, dmenuToggleVariable, NULL, "tcp_extensions=YES" }, { NULL } }, }; DMenu MenuNTP = { DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS, "NTPDATE Server Selection", "There are a number of time synchronization servers available\n" "for public use around the Internet. Please select one reasonably\n" "close to you to have your system time synchronized accordingly.", "These are the primary open-access NTP servers", NULL, { { "None", "No ntp server", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=NO,ntpdate_flags=none" }, { "Other", "Select a site not on this list", dmenuVarsCheck, configNTP, NULL, NULL }, { "Australia", "ntp.tip.csiro.au (HP 5071A Cesium Beam)", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=ntp.tip.csiro.au" }, { " Canada", "tick.usask.ca (GOES clock)", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=tick.usask.ca" }, { "France", "canon.inria.fr (TDF clock)", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=canon.inria.fr" }, { "Germany", "ntps1-{0,1,2}.uni-erlangen.de (GPS)", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=ntps1-0.uni-erlangen.de" }, { " Germany #2", "ntps1-0.cs.tu-berlin.de (GPS)", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=ntps1-0.cs.tu-berlin.de" }, { "Japan", "clock.nc.fukuoka-u.ac.jp (GPS clock)", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=clock.nc.fukuoka-u.ac.jp" }, { " Japan #2", "clock.tl.fukuoka-u.ac.jp (GPS clock)", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=clock.tl.fukuoka-u.ac.jp" }, { "Netherlands", "ntp0.nl.net (GPS clock)", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=ntp0.nl.net" }, { " Norway", "timehost.ifi.uio.no (NTP clock)", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=timehost.ifi.uio.no" }, { "Sweden", "Time1.Stupi.SE (Cesium/GPS)", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=Time1.Stupi.SE" }, { " Switzerland", "swisstime.ethz.ch (DCF77 clock)", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=swisstime.ethz.ch" }, { "U.S. East Coast", "bitsy.mit.edu (WWV clock)", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=bitsy.mit.edu" }, { " U.S. East Coast #2", "otc1.psu.edu (WWV clock)", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=otc1.psu.edu" }, { " U.S. West Coast #1", "clepsydra.dec.com (GOES clock)", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=clepsydra.dec.com" }, { " U.S. West Coast #2", "clock.llnl.gov (WWVB clock)", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=clock.llnl.gov" }, { " U.S. Midwest", "ncar.ucar.edu (WWVB clock)", dmenuVarsCheck, dmenuSetVariables, NULL, "ntpdate_enable=YES,ntpdate_flags=ncar.ucar.edu" }, { NULL } }, }; DMenu MenuSyscons = { DMENU_NORMAL_TYPE, "System Console Configuration", "The default system console driver for FreeBSD (syscons) has a\n" "number of configuration options which may be set according to\n" "your preference.\n\n" "When you are done setting configuration options, select Cancel.", "Configure your system console settings", NULL, { { "X Exit", "Exit this menu (returning to previous)", NULL, dmenuExit }, { "2 Font", "Choose an alternate screen font", NULL, dmenuSubmenu, NULL, &MenuSysconsFont }, { "3 Keymap", "Choose an alternate keyboard map", NULL, dmenuSubmenu, NULL, &MenuSysconsKeymap }, { "4 Repeat", "Set the rate at which keys repeat", NULL, dmenuSubmenu, NULL, &MenuSysconsKeyrate }, { "5 Saver", "Configure the screen saver", NULL, dmenuSubmenu, NULL, &MenuSysconsSaver }, { "6 Screenmap", "Choose an alternate screenmap", NULL, dmenuSubmenu, NULL, &MenuSysconsScrnmap }, { NULL } }, }; DMenu MenuSysconsKeymap = { DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS, "System Console Keymap", "The default system console driver for FreeBSD (syscons) defaults\n" "to a standard \"American\" keyboard map. Users in other countries\n" "(or with different keyboard preferences) may wish to choose one of\n" "the other keymaps below.\n" "Note that sysinstall itself only uses the part of the keyboard map\n" "which is required to generate the ANSI character subset, but your\n" "choice of keymap will also be saved for later (fuller) use.", "Choose a keyboard map", NULL, { { "Belgian", "Belgian ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=be.iso" }, { " Brazil CP850", "Brazil CP850 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=br275.cp850" }, { " Brazil ISO (accent)", "Brazil ISO keymap (accent keys)", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=br275.iso.acc" }, { " Brazil ISO", "Brazil ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=br275.iso" }, { " Croatian ISO", "Croatian ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=hr.iso" }, { "Danish CP865", "Danish Code Page 865 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=danish.cp865" }, { " Danish ISO", "Danish ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=danish.iso" }, { "Estonian ISO", "Estonian ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=estonian.iso" }, { " Estonian ISO 15", "Estonian ISO 8859-15 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=estonian.iso15" }, { " Estonian CP850", "Estonian Code Page 850 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=estonian.cp850" }, { " Finnish CP850","Finnish Code Page 850 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=finnish.cp850" }, { " Finnish ISO", "Finnish ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=finnish.iso" }, { " French ISO (accent)", "French ISO keymap (accent keys)", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=fr.iso.acc" }, { " French ISO", "French ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=fr.iso" }, { "German CP850", "German Code Page 850 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=german.cp850" }, { " German ISO", "German ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=german.iso" }, { "Hungarian 101", "Hungarian ISO keymap (101 key)", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=hu.iso2.101keys" }, { " Hungarian 102", "Hungarian ISO keymap (102 key)", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=hu.iso2.102keys" }, { "Icelandic (accent)", "Icelandic ISO keymap (accent keys)", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=icelandic.iso.acc" }, { " Icelandic", "Icelandic ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=icelandic.iso" }, { " Italian", "Italian ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=it.iso" }, { "Latin American", "Latin American ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=lat-amer" }, { "Japanese 106", "Japanese 106 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=jp.106" }, { "Norway ISO", "Norwegian ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=norwegian.iso" }, { "Polish ISO", "Polish ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=pl_PL.ISO_8859-2" }, { " Portuguese (accent)", "Portuguese ISO keymap (accent keys)", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=pt.iso.acc" }, { " Portuguese", "Portuguese ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=pt.iso" }, { "Russia CP866", "Russian CP866 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=ru.cp866" }, { " Russia KOI8-R", "Russian KOI8-R keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=ru.koi8-r" }, { "Slovenian", "Slovenian ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=si.iso" }, { " Spanish (accent)", "Spanish ISO keymap (accent keys)", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=spanish.iso.acc" }, { " Spanish", "Spanish ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=spanish.iso" }, { " Swedish CP850", "Swedish Code Page 850 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swedish.cp850" }, { " Swedish ISO", "Swedish ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swedish.iso" }, { " Swiss French ISO (accent)", "Swiss French ISO keymap (accent keys)", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swissfrench.iso.acc" }, { " Swiss French ISO", "Swiss French ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swissfrench.iso" }, { " Swiss French CP850", "Swiss French Code Page 850 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swissfrench.cp850" }, { " Swiss German ISO (accent)", "Swiss German ISO keymap (accent keys)", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swissgerman.iso.acc" }, { " Swiss German ISO", "Swiss German ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swissgerman.iso" }, { " Swiss German CP850", "Swiss German Code Page 850 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=swissgerman.cp850" }, { "U.K. CP850", "United Kingdom Code Page 850 keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=uk.cp850" }, { " U.K. ISO", "United Kingdom ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=uk.iso" }, { " U.S. Dvorak", "United States Dvorak keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=us.dvorak" }, { " U.S. ISO", "United States ISO keymap", dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=us.iso" }, { NULL } }, }; DMenu MenuSysconsKeyrate = { DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS, "System Console Keyboard Repeat Rate", "This menu allows you to set the speed at which keys repeat\n" "when held down.", "Choose a keyboard repeat rate", NULL, { { "Slow", "Slow keyboard repeat rate", dmenuVarCheck, dmenuSetVariable, NULL, "keyrate=slow" }, { "Normal", "\"Normal\" keyboard repeat rate", dmenuVarCheck, dmenuSetVariable, NULL, "keyrate=normal" }, { "Fast", "Fast keyboard repeat rate", dmenuVarCheck, dmenuSetVariable, NULL, "keyrate=fast" }, { "Default", "Use default keyboard repeat rate", dmenuVarCheck, dmenuSetVariable, NULL, "keyrate=NO" }, { NULL } }, }; DMenu MenuSysconsSaver = { DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS, "System Console Screen Saver", "By default, the console driver will not attempt to do anything\n" "special with your screen when it's idle. If you expect to leave your\n" "monitor switched on and idle for long periods of time then you should\n" "probably enable one of these screen savers to prevent phosphor burn-in.", "Choose a nifty-looking screen saver", NULL, { { "1 Blank", "Simply blank the screen", dmenuVarCheck, configSaver, NULL, "saver=blank" }, { "2 Daemon", "\"BSD Daemon\" animated screen saver (text)", dmenuVarCheck, configSaver, NULL, "saver=daemon" }, { "3 Fade", "Fade out effect screen saver", dmenuVarCheck, configSaver, NULL, "saver=fade" }, { "4 Fire", "Flames effect screen saver", dmenuVarCheck, configSaver, NULL, "saver=fire" }, { "5 Green", "\"Green\" power saving mode (if supported by monitor)", dmenuVarCheck, configSaver, NULL, "saver=green" }, { "6 Logo", "\"BSD Daemon\" animated screen saver (graphics)", dmenuVarCheck, configSaver, NULL, "saver=logo" }, { "7 Rain", "Rain drops screen saver", dmenuVarCheck, configSaver, NULL, "saver=rain" }, { "8 Snake", "Draw a FreeBSD \"snake\" on your screen", dmenuVarCheck, configSaver, NULL, "saver=snake" }, { "9 Star", "A \"twinkling stars\" effect", dmenuVarCheck, configSaver, NULL, "saver=star" }, { "Warp", "A \"stars warping\" effect", dmenuVarCheck, configSaver, NULL, "saver=warp" }, { "Timeout", "Set the screen saver timeout interval", NULL, configSaverTimeout, NULL, NULL, ' ', ' ', ' ' }, { NULL } }, }; DMenu MenuSysconsScrnmap = { DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS, "System Console Screenmap", "Unless you load a specific font, most PC hardware defaults to\n" "displaying characters in the IBM 437 character set. However,\n" "in the Unix world, this character set is very rarely used. Most\n" "Western European countries, for example, prefer ISO 8859-1.\n" "American users won't notice the difference since the bottom half\n" "of all these character sets is ANSI anyway.\n" "If your hardware is capable of downloading a new display font,\n" "you should probably choose that option. However, for hardware\n" "where this is not possible (e.g. monochrome adapters), a screen\n" "map will give you the best approximation that your hardware can\n" "display at all.", "Choose a screen map", NULL, { { "None", "No screenmap, use default font", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=NO" }, { "KOI8-R to IBM866", "Russian KOI8-R to IBM 866 screenmap", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=koi8-r2cp866" }, { "ISO 8859-1 to IBM437", "W-Europe ISO 8859-1 to IBM 437 screenmap", dmenuVarCheck, dmenuSetVariable, NULL, "scrnmap=iso-8859-1_to_cp437" }, { NULL } }, }; DMenu MenuSysconsFont = { DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS, "System Console Font", "Most PC hardware defaults to displaying characters in the\n" "IBM 437 character set. However, in the Unix world, this\n" "character set is very rarely used. Most Western European\n" "countries, for example, prefer ISO 8859-1.\n" "American users won't notice the difference since the bottom half\n" "of all these charactersets is ANSI anyway. However, they might\n" "want to load a font anyway to use the 30- or 50-line displays.\n" "If your hardware is capable of downloading a new display font,\n" "you can select the appropriate font below.", "Choose a font", NULL, { { "1 None", "Use default font", dmenuVarCheck, dmenuSetVariables, NULL, "font8x8=NO,font8x14=NO,font8x16=NO" }, { "2 IBM 437", "English", dmenuVarCheck, dmenuSetVariables, NULL, "font8x8=cp437-8x8,font8x14=cp437-8x14,font8x16=cp437-8x16" }, { "3 IBM 850", "Western Europe, IBM encoding", dmenuVarCheck, dmenuSetVariables, NULL, "font8x8=cp850-8x8,font8x14=cp850-8x14,font8x16=cp850-8x16" }, { "4 IBM 865", "Norwegian, IBM encoding", dmenuVarCheck, dmenuSetVariables, NULL, "font8x8=cp865-8x8,font8x14=cp865-8x14,font8x16=cp865-8x16" }, { "5 IBM 866", "Russian, IBM encoding", dmenuVarCheck, dmenuSetVariables, NULL, "font8x8=cp866-8x8,font8x14=cp866-8x14,font8x16=cp866-8x16" }, { "6 ISO 8859-1", "Western Europe, ISO encoding", dmenuVarCheck, dmenuSetVariables, NULL, "font8x8=iso-8x8,font8x14=iso-8x14,font8x16=iso-8x16" }, { "7 ISO 8859-2", "Eastern Europe, ISO encoding", dmenuVarCheck, dmenuSetVariables, NULL, "font8x8=iso02-8x8,font8x14=iso02-8x14,font8x16=iso02-8x16" }, { "8 KOI8-R", "Russian, KOI8-R encoding", dmenuVarCheck, dmenuSetVariables, NULL, "font8x8=koi8-r-8x8,font8x14=koi8-r-8x14,font8x16=koi8-r-8x16" }, { "9 SWISS", "English, better resolution", dmenuVarCheck, dmenuSetVariables, NULL, "font8x8=swiss-8x8,font8x14=NO,font8x16=swiss-8x16" }, { NULL } }, }; DMenu MenuUsermgmt = { DMENU_NORMAL_TYPE, "User and group management", "The submenus here allow to manipulate user groups and\n" "login accounts.\n", "Configure your user groups and users", NULL, { { "X Exit", "Exit this menu (returning to previous)", NULL, dmenuExit }, { "User", "Add a new user to the system.", NULL, userAddUser }, { "Group", "Add a new user group to the system.", NULL, userAddGroup }, { NULL } }, }; DMenu MenuFixit = { DMENU_NORMAL_TYPE, "Please choose a fixit option", "There are three ways of going into \"fixit\" mode:\n" "- you can use the 2nd FreeBSD CDROM, in which case there will be\n" " full access to the complete set of FreeBSD commands and utilities,\n" "- you can use the more limited (but perhaps customized) fixit floppy,\n" "- or you can start an Emergency Holographic Shell now, which is\n" " limited to the subset of commands that is already available right now.", "Press F1 for more detailed repair instructions", "fixit", { { "X Exit", "Exit this menu (returning to previous)", NULL, dmenuExit }, { "2 CDROM", "Use the 2nd \"live\" CDROM from the distribution", NULL, installFixitCDROM }, { "3 Floppy", "Use a floppy generated from the fixit image", NULL, installFixitFloppy }, { "4 Shell", "Start an Emergency Holographic Shell", NULL, installFixitHoloShell }, { NULL } }, }; Index: stable/4/release/sysinstall/sysinstall.h =================================================================== --- stable/4/release/sysinstall/sysinstall.h (revision 62574) +++ stable/4/release/sysinstall/sysinstall.h (revision 62575) @@ -1,755 +1,756 @@ /* * The new sysinstall program. * * This is probably the last attempt in the `sysinstall' line, the next * generation being slated to essentially a complete rewrite. * * $FreeBSD$ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer, * verbatim and that no modifications are made prior to this * point in the file. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * */ #ifndef _SYSINSTALL_H_INCLUDE #define _SYSINSTALL_H_INCLUDE #include #include #include #include #include #include #include #include #include #include "ui_objects.h" #include "dir.h" #include "colors.h" #include "libdisk.h" #include "dist.h" /*** Defines ***/ /* device limits */ #define DEV_NAME_MAX 64 /* The maximum length of a device name */ #define DEV_MAX 100 /* The maximum number of devices we'll deal with */ #define INTERFACE_MAX 50 /* Maximum number of network interfaces we'll deal with */ #define IO_ERROR -2 /* Status code for I/O error rather than normal EOF */ /* Number of seconds to wait for data to come off even the slowest media */ #define MEDIA_TIMEOUT 300 /* * I make some pretty gross assumptions about having a max of 50 chunks * total - 8 slices and 42 partitions. I can't easily display many more * than that on the screen at once! * * For 2.1 I'll revisit this and try to make it more dynamic, but since * this will catch 99.99% of all possible cases, I'm not too worried. */ #define MAX_CHUNKS 40 /* Internal environment variable names */ #define DISK_PARTITIONED "_diskPartitioned" #define DISK_LABELLED "_diskLabelled" #define DISK_SELECTED "_diskSelected" #define SYSTEM_STATE "_systemState" #define RUNNING_ON_ROOT "_runningOnRoot" #define TCP_CONFIGURED "_tcpConfigured" /* Ones that can be tweaked from config files */ #define VAR_BLANKTIME "blanktime" #define VAR_BOOTMGR "bootManager" #define VAR_BROWSER_BINARY "browserBinary" #define VAR_BROWSER_PACKAGE "browserPackage" #define VAR_CPIO_VERBOSITY "cpioVerbose" #define VAR_DEBUG "debug" #define VAR_DESKSTYLE "_deskStyle" #define VAR_DISK "disk" #define VAR_DISTS "dists" #define VAR_DIST_MAIN "distMain" #define VAR_DIST_CRYPTO "distCRYPTO" #define VAR_DIST_SRC "distSRC" #define VAR_DIST_X11 "distX11" #define VAR_DIST_XSERVER "distXserver" #define VAR_DIST_XFONTS "distXfonts" #define VAR_DEDICATE_DISK "dedicateDisk" #define VAR_DOMAINNAME "domainname" #define VAR_EDITOR "editor" #define VAR_EXTRAS "ifconfig_" #define VAR_COMMAND "command" #define VAR_CONFIG_FILE "configFile" #define VAR_FTP_DIR "ftpDirectory" #define VAR_FTP_PASS "ftpPass" #define VAR_FTP_PATH "_ftpPath" #define VAR_FTP_PORT "ftpPort" #define VAR_FTP_STATE "ftpState" #define VAR_FTP_USER "ftpUser" #define VAR_FTP_HOST "ftpHost" #define VAR_HTTP_PATH "_httpPath" #define VAR_HTTP_PORT "httpPort" #define VAR_HTTP_HOST "httpHost" #define VAR_HTTP_FTP_MODE "httpFtpMode" #define VAR_GATEWAY "defaultrouter" #define VAR_GEOMETRY "geometry" #define VAR_HOSTNAME "hostname" #define VAR_IFCONFIG "ifconfig_" #define VAR_INTERFACES "network_interfaces" #define VAR_INSTALL_CFG "installConfig" #define VAR_INSTALL_ROOT "installRoot" #define VAR_IPADDR "ipaddr" #define VAR_KEYMAP "keymap" #define VAR_KGET "kget" #define VAR_LABEL "label" #define VAR_LABEL_COUNT "labelCount" #define VAR_LINUX_ENABLE "linux_enable" #define VAR_MEDIA_TYPE "mediaType" #define VAR_MEDIA_TIMEOUT "MEDIA_TIMEOUT" #define VAR_MOUSED "moused_enable" #define VAR_MOUSED_PORT "moused_port" #define VAR_MOUSED_TYPE "moused_type" #define VAR_NAMESERVER "nameserver" #define VAR_NETINTERACTIVE "netInteractive" #define VAR_NETMASK "netmask" #define VAR_NETWORK_DEVICE "netDev" #define VAR_NEWFS_ARGS "newfsArgs" #define VAR_NFS_PATH "nfs" #define VAR_NFS_HOST "nfsHost" #define VAR_NFS_SECURE "nfs_reserved_port_only" #define VAR_NFS_SERVER "nfs_server_enable" #define VAR_NO_CONFIRM "noConfirm" #define VAR_NO_ERROR "noError" #define VAR_NO_WARN "noWarn" #define VAR_NO_USR "noUsr" #define VAR_NONINTERACTIVE "nonInteractive" #define VAR_NOVELL "novell" #define VAR_NTPDATE_FLAGS "ntpdate_flags" #define VAR_PACKAGE "package" #define VAR_PARTITION "partition" #define VAR_PCNFSD "pcnfsd" #define VAR_PKG_TMPDIR "PKG_TMPDIR" #define VAR_PORTS_PATH "ports" #define VAR_PPP_ENABLE "ppp_enable" #define VAR_PPP_PROFILE "ppp_profile" #define VAR_RELNAME "releaseName" #define VAR_ROOT_SIZE "rootSize" #define VAR_ROUTER "router" #define VAR_ROUTER_ENABLE "router_enable" #define VAR_ROUTERFLAGS "router_flags" #define VAR_SERIAL_SPEED "serialSpeed" #define VAR_SLOW_ETHER "slowEthernetCard" #define VAR_SWAP_SIZE "swapSize" #define VAR_TAPE_BLOCKSIZE "tapeBlocksize" #define VAR_TRY_DHCP "tryDHCP" #define VAR_UFS_PATH "ufs" #define VAR_USR_SIZE "usrSize" #define VAR_VAR_SIZE "varSize" #define VAR_XF86_CONFIG "_xf86config" #define DEFAULT_TAPE_BLOCKSIZE "20" /* One MB worth of blocks */ #define ONE_MEG 2048 #define ONE_GIG (ONE_MEG * 1024) /* Which selection attributes to use */ #define ATTR_SELECTED (ColorDisplay ? item_selected_attr : item_attr) #define ATTR_TITLE button_active_attr /* Handy strncpy() macro */ #define SAFE_STRCPY(to, from) sstrncpy((to), (from), sizeof (to) - 1) /*** Types ***/ typedef unsigned int Boolean; typedef struct disk Disk; typedef struct chunk Chunk; /* Bitfields for menu options */ #define DMENU_NORMAL_TYPE 0x1 /* Normal dialog menu */ #define DMENU_RADIO_TYPE 0x2 /* Radio dialog menu */ #define DMENU_CHECKLIST_TYPE 0x4 /* Multiple choice menu */ #define DMENU_SELECTION_RETURNS 0x8 /* Immediate return on item selection */ typedef struct _dmenu { int type; /* What sort of menu we are */ char *title; /* Our title */ char *prompt; /* Our prompt */ char *helpline; /* Line of help at bottom */ char *helpfile; /* Help file for "F1" */ dialogMenuItem items[0]; /* Array of menu items */ } DMenu; /* An rc.conf variable */ typedef struct _variable { struct _variable *next; char *name; char *value; int dirty; } Variable; #define NO_ECHO_OBJ(type) ((type) | (DITEM_NO_ECHO << 16)) #define TYPE_OF_OBJ(type) ((type) & 0xff) #define ATTR_OF_OBJ(type) ((type) >> 16) /* A screen layout structure */ typedef struct _layout { int y; /* x & Y co-ordinates */ int x; int len; /* The size of the dialog on the screen */ int maxlen; /* How much the user can type in ... */ char *prompt; /* The string for the prompt */ char *help; /* The display for the help line */ void *var; /* The var to set when this changes */ int type; /* The type of the dialog to create */ void *obj; /* The obj pointer returned by libdialog */ } Layout; typedef enum { DEVICE_TYPE_NONE, DEVICE_TYPE_DISK, DEVICE_TYPE_FLOPPY, DEVICE_TYPE_FTP, DEVICE_TYPE_NETWORK, DEVICE_TYPE_CDROM, DEVICE_TYPE_TAPE, DEVICE_TYPE_DOS, DEVICE_TYPE_UFS, DEVICE_TYPE_NFS, DEVICE_TYPE_ANY, DEVICE_TYPE_HTTP, } DeviceType; /* CDROM mount codes */ #define CD_UNMOUNTED 0 #define CD_ALREADY_MOUNTED 1 #define CD_WE_MOUNTED_IT 2 /* A "device" from sysinstall's point of view */ typedef struct _device { char name[DEV_NAME_MAX]; char *description; char *devname; DeviceType type; Boolean enabled; Boolean (*init)(struct _device *dev); FILE * (*get)(struct _device *dev, char *file, Boolean probe); void (*shutdown)(struct _device *dev); void *private; unsigned int flags; } Device; /* Some internal representations of partitions */ typedef enum { PART_NONE, PART_SLICE, PART_SWAP, PART_FILESYSTEM, PART_FAT, } PartType; /* The longest newfs command we'll hand to system() */ #define NEWFS_CMD_MAX 256 typedef struct _part_info { Boolean newfs; char mountpoint[FILENAME_MAX]; char newfs_cmd[NEWFS_CMD_MAX]; } PartInfo; /* An option */ typedef struct _opt { char *name; char *desc; enum { OPT_IS_STRING, OPT_IS_INT, OPT_IS_FUNC, OPT_IS_VAR } type; void *data; void *aux; char *(*check)(); } Option; /* Weird index nodey things we use for keeping track of package information */ typedef enum { PACKAGE, PLACE } node_type; /* Types of nodes */ typedef struct _pkgnode { /* A node in the reconstructed hierarchy */ struct _pkgnode *next; /* My next sibling */ node_type type; /* What am I? */ char *name; /* My name */ char *desc; /* My description (Hook) */ struct _pkgnode *kids; /* My little children */ void *data; /* A place to hang my data */ } PkgNode; typedef PkgNode *PkgNodePtr; /* A single package */ typedef struct _indexEntry { /* A single entry in an INDEX file */ char *name; /* name */ char *path; /* full path to port */ char *prefix; /* port prefix */ char *comment; /* one line description */ char *descrfile; /* path to description file */ char *deps; /* packages this depends on */ int depc; /* how many depend on me */ int installed; /* indicates if it is installed */ char *maintainer; /* maintainer */ } IndexEntry; typedef IndexEntry *IndexEntryPtr; typedef int (*commandFunc)(char *key, void *data); #define HOSTNAME_FIELD_LEN 128 #define IPADDR_FIELD_LEN 16 #define EXTRAS_FIELD_LEN 128 /* This is the structure that Network devices carry around in their private, erm, structures */ typedef struct _devPriv { int use_dhcp; char ipaddr[IPADDR_FIELD_LEN]; char netmask[IPADDR_FIELD_LEN]; char extras[EXTRAS_FIELD_LEN]; } DevInfo; /*** Externs ***/ extern jmp_buf BailOut; /* Used to get the heck out */ extern int DebugFD; /* Where diagnostic output goes */ extern Boolean Fake; /* Don't actually modify anything - testing */ extern Boolean SystemWasInstalled; /* Did we install it? */ extern Boolean RunningAsInit; /* Are we running stand-alone? */ extern Boolean DialogActive; /* Is the dialog() stuff up? */ extern Boolean ColorDisplay; /* Are we on a color display? */ extern Boolean OnVTY; /* On a syscons VTY? */ Boolean USAResident; /* Are we cryptographically challenged? */ extern Variable *VarHead; /* The head of the variable chain */ extern Device *mediaDevice; /* Where we're getting our distribution from */ extern unsigned int Dists; /* Which distributions we want */ extern unsigned int CRYPTODists; /* Which naughty distributions we want */ extern unsigned int SrcDists; /* Which src distributions we want */ extern unsigned int XF86Dists; /* Which XFree86 dists we want */ extern unsigned int XF86ServerDists; /* The XFree86 servers we want */ extern unsigned int XF86FontDists; /* The XFree86 fonts we want */ extern int BootMgr; /* Which boot manager to use */ extern int StatusLine; /* Where to print our status messages */ extern DMenu MenuInitial; /* Initial installation menu */ extern DMenu MenuFixit; /* Fixit repair menu */ extern DMenu MenuMBRType; /* Type of MBR to write on the disk */ extern DMenu MenuConfigure; /* Final configuration menu */ extern DMenu MenuDocumentation; /* Documentation menu */ extern DMenu MenuFTPOptions; /* FTP Installation options */ extern DMenu MenuIndex; /* Index menu */ extern DMenu MenuOptions; /* Installation options */ extern DMenu MenuOptionsLanguage; /* Language options menu */ extern DMenu MenuMedia; /* Media type menu */ extern DMenu MenuMouse; /* Mouse type menu */ extern DMenu MenuMediaCDROM; /* CDROM media menu */ extern DMenu MenuMediaDOS; /* DOS media menu */ extern DMenu MenuMediaFloppy; /* Floppy media menu */ extern DMenu MenuMediaFTP; /* FTP media menu */ extern DMenu MenuMediaTape; /* Tape media menu */ extern DMenu MenuNetworkDevice; /* Network device menu */ extern DMenu MenuNTP; /* NTP time server menu */ extern DMenu MenuStartup; /* Startup services menu */ extern DMenu MenuSyscons; /* System console configuration menu */ extern DMenu MenuSysconsFont; /* System console font configuration menu */ extern DMenu MenuSysconsKeymap; /* System console keymap configuration menu */ extern DMenu MenuSysconsKeyrate; /* System console keyrate configuration menu */ extern DMenu MenuSysconsSaver; /* System console saver configuration menu */ extern DMenu MenuSysconsScrnmap; /* System console screenmap configuration menu */ extern DMenu MenuNetworking; /* Network configuration menu */ extern DMenu MenuInstallCustom; /* Custom Installation menu */ extern DMenu MenuDistributions; /* Distribution menu */ extern DMenu MenuDiskDevices; /* Disk type devices */ extern DMenu MenuSubDistributions; /* Custom distribution menu */ extern DMenu MenuCRYPTODistributions;/* Encryption distribution menu */ extern DMenu MenuSrcDistributions; /* Source distribution menu */ extern DMenu MenuXF86; /* XFree86 main menu */ extern DMenu MenuXF86Select; /* XFree86 distribution selection menu */ extern DMenu MenuXF86SelectCore; /* XFree86 core distribution menu */ extern DMenu MenuXF86SelectServer; /* XFree86 server distribution menu */ extern DMenu MenuXF86SelectPC98Server; /* XFree86 server distribution menu */ extern DMenu MenuXF86SelectFonts; /* XFree86 font selection menu */ extern DMenu MenuXF86SelectFonts; /* XFree86 font selection menu */ extern DMenu MenuXDesktops; /* Disk devices menu */ extern DMenu MenuHTMLDoc; /* HTML Documentation menu */ extern DMenu MenuUsermgmt; /* User management menu */ extern DMenu MenuFixit; /* Fixit floppy/CDROM/shell menu */ extern DMenu MenuXF86Config; /* Select XFree86 configuration type */ /* Stuff from libdialog which isn't properly declared outside */ extern void display_helpfile(void); extern void display_helpline(WINDOW *w, int y, int width); /*** Prototypes ***/ /* anonFTP.c */ extern int configAnonFTP(dialogMenuItem *self); /* cdrom.c */ extern Boolean mediaInitCDROM(Device *dev); extern FILE *mediaGetCDROM(Device *dev, char *file, Boolean probe); extern void mediaShutdownCDROM(Device *dev); /* command.c */ extern void command_clear(void); extern void command_sort(void); extern void command_execute(void); extern void command_shell_add(char *key, char *fmt, ...); extern void command_func_add(char *key, commandFunc func, void *data); /* config.c */ extern void configEnvironmentRC_conf(void); extern void configEnvironmentResolv(char *config); extern void configRC_conf(void); extern void configMake_conf(char *config); extern int configFstab(dialogMenuItem *self); extern int configRC(dialogMenuItem *self); extern int configResolv(dialogMenuItem *self); extern int configPackages(dialogMenuItem *self); extern int configSaver(dialogMenuItem *self); extern int configSaverTimeout(dialogMenuItem *self); extern int configLinux(dialogMenuItem *self); extern int configNTP(dialogMenuItem *self); extern int configUsers(dialogMenuItem *self); extern int configXSetup(dialogMenuItem *self); extern int configXDesktop(dialogMenuItem *self); extern int configRouter(dialogMenuItem *self); extern int configPCNFSD(dialogMenuItem *self); extern int configNFSServer(dialogMenuItem *self); extern int configWriteRC_conf(dialogMenuItem *self); /* crc.c */ extern int crc(int, unsigned long *, unsigned long *); /* devices.c */ extern DMenu *deviceCreateMenu(DMenu *menu, DeviceType type, int (*hook)(dialogMenuItem *d), int (*check)(dialogMenuItem *d)); extern void deviceGetAll(void); extern void deviceReset(void); extern void deviceRescan(void); extern Device **deviceFind(char *name, DeviceType type); extern Device **deviceFindDescr(char *name, char *desc, DeviceType class); extern int deviceCount(Device **devs); extern Device *new_device(char *name); extern Device *deviceRegister(char *name, char *desc, char *devname, DeviceType type, Boolean enabled, Boolean (*init)(Device *mediadev), FILE * (*get)(Device *dev, char *file, Boolean probe), void (*shutDown)(Device *mediadev), void *private); extern Boolean dummyInit(Device *dev); extern FILE *dummyGet(Device *dev, char *dist, Boolean probe); extern void dummyShutdown(Device *dev); /* dhcp.c */ extern int dhcpParseLeases(char *file, char *hostname, char *domain, char *nameserver, char *ipaddr, char *gateway, char *netmask); /* disks.c */ extern int diskPartitionEditor(dialogMenuItem *self); extern int diskPartitionWrite(dialogMenuItem *self); extern int diskGetSelectCount(Device ***devs); extern void diskPartition(Device *dev); /* dispatch.c */ extern int dispatchCommand(char *command); extern int dispatch_load_floppy(dialogMenuItem *self); extern int dispatch_load_file_int(int); extern int dispatch_load_file(dialogMenuItem *self); /* dist.c */ extern int distReset(dialogMenuItem *self); extern int distConfig(dialogMenuItem *self); extern int distSetCustom(dialogMenuItem *self); extern int distUnsetCustom(dialogMenuItem *self); extern int distSetDeveloper(dialogMenuItem *self); extern int distSetXDeveloper(dialogMenuItem *self); extern int distSetKernDeveloper(dialogMenuItem *self); extern int distSetXKernDeveloper(dialogMenuItem *self); extern int distSetUser(dialogMenuItem *self); extern int distSetXUser(dialogMenuItem *self); extern int distSetMinimum(dialogMenuItem *self); extern int distSetEverything(dialogMenuItem *self); extern int distSetCRYPTO(dialogMenuItem *self); extern int distSetSrc(dialogMenuItem *self); extern int distSetXF86(dialogMenuItem *self); extern int distExtractAll(dialogMenuItem *self); /* dmenu.c */ extern int dmenuDisplayFile(dialogMenuItem *tmp); extern int dmenuSubmenu(dialogMenuItem *tmp); extern int dmenuSystemCommand(dialogMenuItem *tmp); extern int dmenuSystemCommandBox(dialogMenuItem *tmp); extern int dmenuExit(dialogMenuItem *tmp); extern int dmenuISetVariable(dialogMenuItem *tmp); extern int dmenuSetVariable(dialogMenuItem *tmp); extern int dmenuSetKmapVariable(dialogMenuItem *tmp); extern int dmenuSetVariables(dialogMenuItem *tmp); extern int dmenuToggleVariable(dialogMenuItem *tmp); extern int dmenuSetFlag(dialogMenuItem *tmp); extern int dmenuSetValue(dialogMenuItem *tmp); extern Boolean dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max, Boolean buttons); extern Boolean dmenuOpenSimple(DMenu *menu, Boolean buttons); extern int dmenuVarCheck(dialogMenuItem *item); extern int dmenuVarsCheck(dialogMenuItem *item); extern int dmenuFlagCheck(dialogMenuItem *item); extern int dmenuRadioCheck(dialogMenuItem *item); /* doc.c */ extern int docBrowser(dialogMenuItem *self); extern int docShowDocument(dialogMenuItem *self); /* dos.c */ extern Boolean mediaCloseDOS(Device *dev, FILE *fp); extern Boolean mediaInitDOS(Device *dev); extern FILE *mediaGetDOS(Device *dev, char *file, Boolean probe); extern void mediaShutdownDOS(Device *dev); /* floppy.c */ extern int getRootFloppy(void); extern Boolean mediaInitFloppy(Device *dev); extern FILE *mediaGetFloppy(Device *dev, char *file, Boolean probe); extern void mediaShutdownFloppy(Device *dev); /* ftp_strat.c */ extern Boolean mediaCloseFTP(Device *dev, FILE *fp); extern Boolean mediaInitFTP(Device *dev); extern FILE *mediaGetFTP(Device *dev, char *file, Boolean probe); extern void mediaShutdownFTP(Device *dev); /* http.c */ extern Boolean mediaInitHTTP(Device *dev); extern FILE *mediaGetHTTP(Device *dev, char *file, Boolean probe); /* globals.c */ extern void globalsInit(void); /* index.c */ int index_read(FILE *fp, PkgNodePtr papa); int index_menu(PkgNodePtr root, PkgNodePtr top, PkgNodePtr plist, int *pos, int *scroll); void index_init(PkgNodePtr top, PkgNodePtr plist); void index_node_free(PkgNodePtr top, PkgNodePtr plist); void index_sort(PkgNodePtr top); void index_print(PkgNodePtr top, int level); int index_extract(Device *dev, PkgNodePtr top, PkgNodePtr who, Boolean depended); int index_initialize(char *path); PkgNodePtr index_search(PkgNodePtr top, char *str, PkgNodePtr *tp); /* install.c */ extern Boolean checkLabels(Boolean whinge, Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vdev); extern int installCommit(dialogMenuItem *self); extern int installCustomCommit(dialogMenuItem *self); extern int installExpress(dialogMenuItem *self); extern int installStandard(dialogMenuItem *self); extern int installFixitHoloShell(dialogMenuItem *self); extern int installFixitCDROM(dialogMenuItem *self); extern int installFixitFloppy(dialogMenuItem *self); extern int installFixupBin(dialogMenuItem *self); extern int installFixupXFree(dialogMenuItem *self); extern int installUpgrade(dialogMenuItem *self); extern int installFilesystems(dialogMenuItem *self); extern int installVarDefaults(dialogMenuItem *self); extern void installEnvironment(void); extern int installX11package(dialogMenuItem *self); extern Boolean copySelf(void); /* kget.c */ extern int kget(char *out); /* keymap.c */ extern int loadKeymap(const char *lang); /* label.c */ extern int diskLabelEditor(dialogMenuItem *self); extern int diskLabelCommit(dialogMenuItem *self); /* lndir.c */ extern int lndir(char *from, char *to); /* makedevs.c (auto-generated) */ extern const char termcap_ansi[]; extern const char termcap_vt100[]; +extern const char termcap_cons25w[]; extern const char termcap_cons25[]; extern const char termcap_cons25_m[]; extern const char termcap_cons25r[]; extern const char termcap_cons25r_m[]; extern const char termcap_cons25l1[]; extern const char termcap_cons25l1_m[]; extern const u_char font_iso_8x16[]; extern const u_char font_cp850_8x16[]; extern const u_char font_cp866_8x16[]; extern const u_char koi8_r2cp866[]; extern u_char default_scrnmap[]; /* media.c */ extern char *cpioVerbosity(void); extern void mediaClose(void); extern int mediaTimeout(void); extern int mediaSetCDROM(dialogMenuItem *self); extern int mediaSetFloppy(dialogMenuItem *self); extern int mediaSetDOS(dialogMenuItem *self); extern int mediaSetTape(dialogMenuItem *self); extern int mediaSetFTP(dialogMenuItem *self); extern int mediaSetFTPActive(dialogMenuItem *self); extern int mediaSetFTPPassive(dialogMenuItem *self); extern int mediaSetHTTP(dialogMenuItem *self); extern int mediaSetUFS(dialogMenuItem *self); extern int mediaSetNFS(dialogMenuItem *self); extern int mediaSetFTPUserPass(dialogMenuItem *self); extern int mediaSetCPIOVerbosity(dialogMenuItem *self); extern int mediaGetType(dialogMenuItem *self); extern Boolean mediaExtractDist(char *dir, char *dist, FILE *fp); extern Boolean mediaExtractDistBegin(char *dir, int *fd, int *zpid, int *cpic); extern Boolean mediaExtractDistEnd(int zpid, int cpid); extern Boolean mediaVerify(void); extern FILE *mediaGenericGet(char *base, const char *file); /* misc.c */ extern Boolean file_readable(char *fname); extern Boolean file_executable(char *fname); extern Boolean directory_exists(const char *dirname); extern char *root_bias(char *path); extern char *itoa(int value); extern char *string_concat(char *p1, char *p2); extern char *string_concat3(char *p1, char *p2, char *p3); extern char *string_prune(char *str); extern char *string_skipwhite(char *str); extern char *string_copy(char *s1, char *s2); extern char *pathBaseName(const char *path); extern void safe_free(void *ptr); extern void *safe_malloc(size_t size); extern void *safe_realloc(void *orig, size_t size); extern dialogMenuItem *item_add(dialogMenuItem *list, char *prompt, char *title, int (*checked)(dialogMenuItem *self), int (*fire)(dialogMenuItem *self), void (*selected)(dialogMenuItem *self, int is_selected), void *data, int aux, int *curr, int *max); extern void items_free(dialogMenuItem *list, int *curr, int *max); extern int Mkdir(char *); extern int Mount(char *, void *data); extern WINDOW *openLayoutDialog(char *helpfile, char *title, int x, int y, int width, int height); extern ComposeObj *initLayoutDialog(WINDOW *win, Layout *layout, int x, int y, int *max); extern int layoutDialogLoop(WINDOW *win, Layout *layout, ComposeObj **obj, int *n, int max, int *cbutton, int *cancel); extern WINDOW *savescr(void); extern void restorescr(WINDOW *w); extern char *sstrncpy(char *dst, const char *src, int size); /* mouse.c */ extern int mousedTest(dialogMenuItem *self); extern int mousedDisable(dialogMenuItem *self); /* msg.c */ extern Boolean isDebug(void); extern void msgInfo(char *fmt, ...); extern void msgYap(char *fmt, ...); extern void msgWarn(char *fmt, ...); extern void msgDebug(char *fmt, ...); extern void msgError(char *fmt, ...); extern void msgFatal(char *fmt, ...); extern void msgConfirm(char *fmt, ...); extern void msgNotify(char *fmt, ...); extern void msgWeHaveOutput(char *fmt, ...); extern int msgYesNo(char *fmt, ...); extern char *msgGetInput(char *buf, char *fmt, ...); extern int msgSimpleConfirm(char *); extern int msgSimpleNotify(char *); /* network.c */ extern Boolean mediaInitNetwork(Device *dev); extern void mediaShutdownNetwork(Device *dev); /* nfs.c */ extern Boolean mediaInitNFS(Device *dev); extern FILE *mediaGetNFS(Device *dev, char *file, Boolean probe); extern void mediaShutdownNFS(Device *dev); /* options.c */ extern int optionsEditor(dialogMenuItem *self); /* package.c */ extern int packageAdd(dialogMenuItem *self); extern int package_add(char *name); extern int package_extract(Device *dev, char *name, Boolean depended); extern Boolean package_exists(char *name); /* pccard.c */ extern void pccardInitialize(void); /* system.c */ extern void systemInitialize(int argc, char **argv); extern void systemShutdown(int status); extern int execExecute(char *cmd, char *name); extern int systemExecute(char *cmd); extern int systemDisplayHelp(char *file); extern char *systemHelpFile(char *file, char *buf); extern void systemChangeFont(const u_char font[]); extern void systemChangeLang(char *lang); extern void systemChangeTerminal(char *color, const u_char c_termcap[], char *mono, const u_char m_termcap[]); extern void systemChangeScreenmap(const u_char newmap[]); extern void systemCreateHoloshell(void); extern int vsystem(char *fmt, ...); /* tape.c */ extern char *mediaTapeBlocksize(void); extern Boolean mediaInitTape(Device *dev); extern FILE *mediaGetTape(Device *dev, char *file, Boolean probe); extern void mediaShutdownTape(Device *dev); /* tcpip.c */ extern int tcpOpenDialog(Device *dev); extern int tcpMenuSelect(dialogMenuItem *self); extern Device *tcpDeviceSelect(void); /* termcap.c */ extern int set_termcap(void); /* ufs.c */ extern void mediaShutdownUFS(Device *dev); extern Boolean mediaInitUFS(Device *dev); extern FILE *mediaGetUFS(Device *dev, char *file, Boolean probe); /* usb.c */ extern void usbInitialize(void); /* user.c */ extern int userAddGroup(dialogMenuItem *self); extern int userAddUser(dialogMenuItem *self); /* variable.c */ extern void variable_set(char *var, int dirty); extern void variable_set2(char *name, char *value, int dirty); extern char *variable_get(char *var); extern int variable_cmp(char *var, char *value); extern void variable_unset(char *var); extern char *variable_get_value(char *var, char *prompt, int dirty); extern int variable_check(char *data); extern int dump_variables(dialogMenuItem *self); /* wizard.c */ extern void slice_wizard(Disk *d); #endif /* _SYSINSTALL_H_INCLUDE */ Index: stable/4/release/sysinstall/termcap.c =================================================================== --- stable/4/release/sysinstall/termcap.c (revision 62574) +++ stable/4/release/sysinstall/termcap.c (revision 62575) @@ -1,135 +1,146 @@ /* * Copyright (c) 1994, Paul Richards. * * All rights reserved. * * This software may be used, modified, copied, distributed, and sold, in both * source and binary form provided that the above copyright and these terms * are retained, verbatim, as the first lines of this file. Under no * circumstances is the author responsible for the proper functioning of this * software, nor does the author assume any responsibility for damages * incurred with its use. */ #include "sysinstall.h" #include #include #include #include #include #define VTY_STATUS_LINE 24 #define TTY_STATUS_LINE 23 static void prompt_term(char **termp, char **termcapp) { char str[80]; static struct { const char *term, *termcap; } lookup[] = { { "ansi", termcap_ansi }, { "vt100", termcap_vt100 }, + { "cons25w", termcap_cons25w }, { "cons25", termcap_cons25 }, { "cons25-m", termcap_cons25_m } }; if (RunningAsInit) { while (1) { int i; printf("\nThese are the predefined terminal types available to\n"); printf("sysinstall when running stand-alone. Please choose the\n"); printf("closest match for your particular terminal.\n\n"); printf("1 ...................... Standard ANSI terminal.\n"); printf("2 ...................... VT100 or compatible terminal.\n"); printf("3 ...................... FreeBSD system console (color).\n"); printf("4 ...................... FreeBSD system console (monochrome).\n\n"); printf("Your choice: (1-4) "); fflush(stdout); fgets(str, 80, stdin); i = str[0] - '0'; if (i > 0 && i < 5) { *termp = (char *)lookup[i - 1].term; *termcapp = (char *)lookup[i - 1].termcap; break; } else printf("\007Invalid choice, please try again.\n\n"); } } else { printf("\nPlease set your TERM variable before running this program.\n"); printf("Defaulting to an ANSI compatible terminal - please press RETURN\n"); fgets(str, 80, stdin); /* Just to make it interactive */ *termp = (char *)"ansi"; *termcapp = (char *)termcap_ansi; } } int set_termcap(void) { char *term; int stat; struct ttysize ts; term = getenv("TERM"); stat = ioctl(STDERR_FILENO, GIO_COLOR, &ColorDisplay); if (!RunningAsInit) { if (getenv("SYSINSTALL_DEBUG")) DebugFD = open("sysinstall.debug", O_WRONLY|O_CREAT|O_TRUNC, 0644); else DebugFD = -1; if (DebugFD < 0) DebugFD = open("/dev/null", O_RDWR, 0); } if (!OnVTY || (stat < 0)) { if (!term) { char *term, *termcap; prompt_term(&term, &termcap); if (setenv("TERM", term, 1) < 0) return -1; if (setenv("TERMCAP", termcap, 1) < 0) return -1; } if (DebugFD < 0) DebugFD = open("/dev/null", O_RDWR, 0); } else { int i, on; if (getpid() == 1) { DebugFD = open("/dev/ttyv1", O_WRONLY); if (DebugFD != -1) { on = 1; i = ioctl(DebugFD, TIOCCONS, (char *)&on); msgDebug("ioctl(%d, TIOCCONS, NULL) = %d (%s)\n", DebugFD, i, !i ? "success" : strerror(errno)); } } + +#ifdef PC98 + if (!term) { + if (setenv("TERM", "cons25w", 1) < 0) + return -1; + if (setenv("TERMCAP", termcap_cons25w, 1) < 0) + return -1; + } +#else if (ColorDisplay) { if (!term) { if (setenv("TERM", "cons25", 1) < 0) return -1; if (setenv("TERMCAP", termcap_cons25, 1) < 0) return -1; } } else { if (!term) { if (setenv("TERM", "cons25-m", 1) < 0) return -1; if (setenv("TERMCAP", termcap_cons25_m, 1) < 0) return -1; } } +#endif } if (ioctl(0, TIOCGSIZE, &ts) == -1) { msgDebug("Unable to get terminal size - errno %d\n", errno); ts.ts_lines = 0; } StatusLine = ts.ts_lines ? ts.ts_lines - 1: (OnVTY ? VTY_STATUS_LINE : TTY_STATUS_LINE); return 0; } Index: stable/4/release/sysinstall/wizard.c =================================================================== --- stable/4/release/sysinstall/wizard.c (revision 62574) +++ stable/4/release/sysinstall/wizard.c (revision 62575) @@ -1,183 +1,200 @@ /* * ---------------------------------------------------------------------------- * "THE BEER-WARE LICENSE" (Revision 42): * wrote this file. As long as you retain this notice you * can do whatever you want with this stuff. If we meet some day, and you think * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * * $FreeBSD$ * */ #include "sysinstall.h" #include #include int scan_block(int fd, daddr_t block) { u_char foo[512]; if (-1 == lseek(fd,block * 512,SEEK_SET)) err(1,"lseek"); if (512 != read(fd,foo, 512)) return 1; return 0; } void Scan_Disk(Disk *d) { char device[64]; u_long l; int i,j,fd; strcpy(device,"/dev/r"); strcat(device,d->name); fd = open(device,O_RDWR); if (fd < 0) { msgWarn("open(%s) failed", device); return; } for(i=-1,l=0;;l++) { j = scan_block(fd,l); if (j != i) { if (i == -1) { printf("%c: %lu.",j ? 'B' : 'G', l); fflush(stdout); } else if (i == 0) { printf(".%lu\nB: %lu.",l-1,l); fflush(stdout); } else { printf(".%lu\nG: %lu.",l-1,l); fflush(stdout); } i = j; } } close(fd); } void slice_wizard(Disk *d) { Disk *db; char myprompt[BUFSIZ]; char input[BUFSIZ]; char *p,*q=0; char **cp,*cmds[200]; int ncmd,i; sprintf(myprompt,"%s> ", d->name); while(1) { printf("--==##==--\n"); Debug_Disk(d); p = CheckRules(d); if (p) { printf("%s",p); free(p); } printf(myprompt); fflush(stdout); q = p = fgets(input,sizeof(input),stdin); if(!p) break; for(cp = cmds; (*cp = strsep(&p, " \t\n")) != NULL;) if (**cp != '\0') cp++; ncmd = cp - cmds; if(!ncmd) continue; if (!strcasecmp(*cmds,"quit")) { break; } if (!strcasecmp(*cmds,"exit")) { break; } if (!strcasecmp(*cmds,"q")) { break; } if (!strcasecmp(*cmds,"x")) { break; } if (!strcasecmp(*cmds,"delete") && ncmd == 2) { printf("delete = %d\n", Delete_Chunk(d, (struct chunk *)strtol(cmds[1],0,0))); continue; } if (!strcasecmp(*cmds,"allfreebsd")) { All_FreeBSD(d, 0); continue; } if (!strcasecmp(*cmds,"dedicate")) { All_FreeBSD(d, 1); continue; } if (!strcasecmp(*cmds,"bios") && ncmd == 4) { Set_Bios_Geom(d, strtol(cmds[1],0,0), strtol(cmds[2],0,0), strtol(cmds[3],0,0)); continue; } if (!strcasecmp(*cmds,"list")) { cp = Disk_Names(); printf("Disks:"); for(i=0;cp[i];i++) { printf(" %s",cp[i]); free(cp[i]); } free(cp); continue; } +#ifdef PC98 + if (!strcasecmp(*cmds,"create") && ncmd == 7) { + printf("Create=%d\n", + Create_Chunk(d, + strtol(cmds[1],0,0), + strtol(cmds[2],0,0), + strtol(cmds[3],0,0), + strtol(cmds[4],0,0), + strtol(cmds[5],0,0), + cmds[6])); + continue; + } +#else if (!strcasecmp(*cmds,"create") && ncmd == 6) { - printf("Create=%d\n", Create_Chunk(d, strtol(cmds[1],0,0), strtol(cmds[2],0,0), strtol(cmds[3],0,0), strtol(cmds[4],0,0), strtol(cmds[5],0,0))); continue; } +#endif if (!strcasecmp(*cmds,"read")) { db = d; if (ncmd > 1) d = Open_Disk(cmds[1]); else d = Open_Disk(d->name); if (d) Free_Disk(db); else d = db; continue; } if (!strcasecmp(*cmds,"scan")) { Scan_Disk(d); continue; } if (!strcasecmp(*cmds,"write")) { printf("Write=%d\n", Fake ? 0 : Write_Disk(d)); Free_Disk(d); d = Open_Disk(d->name); continue; } if (strcasecmp(*cmds,"help")) printf("\007ERROR\n"); printf("CMDS:\n"); printf("allfreebsd\t\t"); printf("dedicate\t\t"); printf("bios cyl hd sect\n"); printf("collapse [pointer]\t\t"); +#ifdef PC98 + printf("create offset size enum subtype flags name\n"); +#else printf("create offset size enum subtype flags\n"); +#endif printf("subtype(part): swap=1, ffs=7\t\t"); printf("delete pointer\n"); printf("list\t\t"); printf("quit\n"); printf("read [disk]\t\t"); printf("scan\n"); printf("write\t\t"); printf("ENUM:\n\t"); for(i=0;chunk_n[i];i++) printf("%d = %s%s",i,chunk_n[i],i == 4 ? "\n\t" : " "); printf("\n"); } }