summaryrefslogtreecommitdiffstats
path: root/release
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1995-12-07 10:34:59 +0000
committerpeter <peter@FreeBSD.org>1995-12-07 10:34:59 +0000
commit03382d7ccd5ed3c8bf17b6719df445c2d9c5dea6 (patch)
tree3d31cd880ab6a9af9ad3ab3c6313d70e1c542d60 /release
parent53a232b78efd4ef6c84ff8047a3a43c3d8cf0a25 (diff)
downloadFreeBSD-src-03382d7ccd5ed3c8bf17b6719df445c2d9c5dea6.zip
FreeBSD-src-03382d7ccd5ed3c8bf17b6719df445c2d9c5dea6.tar.gz
Update the -current sources from the 2.1 branch.
Approved (in spirit) by: jkh
Diffstat (limited to 'release')
-rw-r--r--release/MIRROR.SITES157
-rw-r--r--release/Makefile122
-rwxr-xr-xrelease/adduser.sh183
-rw-r--r--release/alpha/boot_crunch.conf4
-rw-r--r--release/alpha/fixit_crunch.conf20
-rw-r--r--release/amd64/boot_crunch.conf4
-rwxr-xr-xrelease/bininst143
-rw-r--r--release/boot_crunch.conf4
-rw-r--r--release/boot_flp.conf18
-rw-r--r--release/cpio_crunch.conf37
-rw-r--r--release/cpio_flp_1.conf37
-rw-r--r--release/extract.sh41
-rw-r--r--release/fixit_crunch.conf20
-rw-r--r--release/i386/boot_crunch.conf4
-rw-r--r--release/instdist.sh565
-rw-r--r--release/libdisk/change.c7
-rw-r--r--release/libdisk/create_chunk.c506
-rw-r--r--release/libdisk/libdisk.h17
-rw-r--r--release/libdisk/tst01.c9
-rw-r--r--release/libdisk/write_disk.c6
-rw-r--r--release/miscfuncs.sh140
-rw-r--r--release/mkchecksums.sh25
-rw-r--r--release/mkextract.sh60
-rw-r--r--release/mkxf86extract.sh61
-rw-r--r--release/netinst.sh208
-rw-r--r--release/pc98/boot_crunch.conf4
-rw-r--r--release/root_crunch.conf8
-rw-r--r--release/sysinstall/Makefile15
-rw-r--r--release/sysinstall/attr.c83
-rw-r--r--release/sysinstall/cdrom.c48
-rw-r--r--release/sysinstall/command.c41
-rw-r--r--release/sysinstall/config.c361
-rw-r--r--release/sysinstall/decode.c27
-rw-r--r--release/sysinstall/devices.c21
-rw-r--r--release/sysinstall/disks.c395
-rw-r--r--release/sysinstall/dist.c248
-rw-r--r--release/sysinstall/dist.h35
-rw-r--r--release/sysinstall/dmenu.c62
-rw-r--r--release/sysinstall/dos.c30
-rw-r--r--release/sysinstall/floppy.c97
-rw-r--r--release/sysinstall/ftp.c16
-rw-r--r--release/sysinstall/ftp_strat.c249
-rw-r--r--release/sysinstall/globals.c6
-rw-r--r--release/sysinstall/help/XF86.hlp157
-rw-r--r--release/sysinstall/help/configure.hlp8
-rw-r--r--release/sysinstall/help/distributions.hlp41
-rw-r--r--release/sysinstall/help/drives.hlp4
-rw-r--r--release/sysinstall/help/hardware.hlp311
-rw-r--r--release/sysinstall/help/install.hlp580
-rw-r--r--release/sysinstall/help/media.hlp58
-rw-r--r--release/sysinstall/help/network_device.hlp72
-rw-r--r--release/sysinstall/help/options.hlp114
-rw-r--r--release/sysinstall/help/partition.hlp196
-rw-r--r--release/sysinstall/help/readme.hlp91
-rw-r--r--release/sysinstall/help/relnotes.hlp590
-rw-r--r--release/sysinstall/help/slice.hlp61
-rw-r--r--release/sysinstall/help/usage.hlp56
-rw-r--r--release/sysinstall/install.c766
-rw-r--r--release/sysinstall/label.c447
-rw-r--r--release/sysinstall/main.c25
-rw-r--r--release/sysinstall/media.c229
-rw-r--r--release/sysinstall/media_strategy.c838
-rw-r--r--release/sysinstall/menus.c915
-rw-r--r--release/sysinstall/misc.c87
-rw-r--r--release/sysinstall/msg.c31
-rw-r--r--release/sysinstall/network.c172
-rw-r--r--release/sysinstall/nfs.c49
-rw-r--r--release/sysinstall/sysinstall.h271
-rw-r--r--release/sysinstall/system.c121
-rw-r--r--release/sysinstall/tape.c46
-rw-r--r--release/sysinstall/tcpip.c158
-rw-r--r--release/sysinstall/ufs.c13
-rw-r--r--release/sysinstall/variable.c66
-rw-r--r--release/sysinstall/wizard.c9
74 files changed, 5149 insertions, 5577 deletions
diff --git a/release/MIRROR.SITES b/release/MIRROR.SITES
index 5b118db..62625ce 100644
--- a/release/MIRROR.SITES
+++ b/release/MIRROR.SITES
@@ -1,13 +1,13 @@
-$Id: MIRROR.SITES,v 1.1 1995/10/15 01:41:51 jfieber Exp $
+$Id: MIRROR.SITES,v 1.2 1995/11/16 09:30:09 asami Exp $
Obtaining FreeBSD
The official sources for FreeBSD available via anonymous FTP from:
-
+
ftp://ftp.FreeBSD.org/pub/FreeBSD
-
+
and on CD-ROM from Walnut Creek CDROM:
-
+
Walnut Creek CDROM
1547 Palos Verdes Mall, Suite 260
Walnut Creek CA 94596 USA
@@ -15,76 +15,75 @@ Obtaining FreeBSD
Fax: +1 510 674-0821
Email: info@cdrom.com
WWW: http://www.cdrom.com/
-
-
+
+
Additionally, FreeBSD is available via anonymous FTP from the
following mirror sites. If you choose to obtain FreeBSD via anonymous
FTP, please try to use a site near you.
-
+
Australia
-
+
+ ftp://ftp.physics.usyd.edu.au/FreeBSD
Contact: dawes@xfree86.org.
-
+
+ ftp://minnie.cs.adfa.oz.au/FreeBSD
Contact: wkt@dolphin.cs.adfa.oz.au.
-
+
Canada
-
+
+ ftp://ftp.synapse.net/contrib/FreeBSD
Contact: evanc@synapse.net.
-
+
Finland
-
+
+ ftp://nic.funet.fi/pub/unix/FreeBSD
Contact: count@nic.funet.fi.
-
+
France
-
+
+ ftp://ftp.ibp.fr/pub/FreeBSD
Contact: Remy.Card@ibp.fr.
-
+
Germany
-
+
+ ftp://ftp.fb9dv.uni-duisburg.de/pub/unix/FreeBSD
Contact: ftp@ftp.fb9dv.uni-duisburg.de.
-
+
+ ftp://gil.physik.rwth-aachen.de/pub/FreeBSD
Contact: kuku@gil.physik.rwth-aachen.de.
-
+
+ ftp://ftp.uni-paderborn.de/freebsd
Contact: ftp@uni-paderborn.de.
-
+
+ ftp://ftp.leo.org/pub/comp/os/bsd/FreeBSD
Contact: bsd@leo.org.
-
+
+ ftp://ftp.tu-dresden.de/pub/soft/unix/bsd/FreeBSD
Contact: pdsowner@rcs1.urz.tu-dresden.de.
-
+
Hong Kong
-
- + ftp://ftp.hk.super.net/pub/FreeBSD
+
+ + ftp://ftp.hk.super.net/pub/mirror/FreeBSD
Contact: ftp-admin@HK.Super.NET.
-
+
Ireland
-
+
+ ftp://ftp.internet-eireann.ie/pub/FreeBSD
Contact: ftpadmin@internet-eireann.ie.
-
+
Israel
-
-
+
+ ftp://orgchem.weizmann.ac.il/pub/FreeBSD
Contact: serg@klara.weizmann.ac.il.
-
+
Japan
-
+
+ ftp://ftp.tokyonet.ad.jp/pub/FreeBSD
Contact: ftpadmin@TokyoNet.AD.JP.
+ ftp://ftp.nisiq.net/pub/os/FreeBSD/
Contact: ftp-admin@nisiq.net.
-
+
+ ftp://ftp.iij.ad.jp/pub/FreeBSD/
Contact: ftp@ftp.iij.ad.jp.
@@ -93,77 +92,82 @@ Obtaining FreeBSD
+ ftp://ftp.ee.uec.ac.jp/pub/os/mirror/ftp.freebsd.org
Contact: ftp-admin@ftp.ee.uec.ac.jp.
-
+
+ ftp://ftp.u-aizu.ac.jp/pub/os/FreeBSD
Contact: ftp-admin@u-aizu.ac.jp.
Korea
-
+
+ ftp://ftp.cau.ac.kr/pub/FreeBSD
Contact: ftpadm@ftp.cau.ac.kr.
-
+
+ + ftp://ftp.easy.re.kr/pub/FreeBSD
+ Contact: ftpadm@easy.re.kr.
+
Netherlands
-
+
+ ftp://ftp.nl.net/pub/os/FreeBSD
Contact: archive@nl.net.
-
+
+ Poland
+
+ + ftp://SunSITE.icm.edu.pl/pub/FreeBSD/ftp.freebsd.org
+ Contact: w.sylwestrzak@icm.edu.pl
+
Russia
-
+
+ ftp://ftp.kiae.su/FreeBSD
Contact: ftp@ftp.kiae.su.
-
+
Sweden
-
+
+ ftp://ftp.luth.se/pub/FreeBSD
Contact: ragge@ludd.luth.se.
-
+
Taiwan
-
+
+ ftp://NCTUCCCA.edu.tw/Operating-Systems/FreeBSD
Contact: freebsd@NCTUCCCA.edu.tw.
-
+
+ ftp://netbsd.csie.nctu.edu.tw/pub/FreeBSD
Contact: ftp@netbsd.csie.nctu.edu.tw.
-
+
Thailand
-
- + ftp://ftp.nectec.or.th/pub/FreeBSD
+
+ + ftp://ftp.nectec.or.th/pub/mirrors/FreeBSD
Contact: ftpadmin@ftp.nectec.or.th.
-
+
+ UK
+
+ + ftp://src.doc.ic.ac.uk/packages/unix/FreeBSD
+ Contact: wizards@doc.ic.ac.uk.
+
+ + ftp://unix.hensa.ac.uk/mirrors/walnut.creek/FreeBSD
+ Contact: archive-admin@unix.hensa.ac.uk.
+
+ + ftp://ftp.demon.co.uk/pub/BSD/FreeBSD
+ Contact: uploads@demon.net.
+
USA
-
- + ftp://gatekeeper.dec.com/pub/BSD/FreeBSD
- Contact: hubbard@gatekeeper.dec.com.
-
+
+ ftp://ftp.cybernetics.net/pub/FreeBSD
Contact: michael@Cybernetics.NET.
-
+
+ ftp://ftp.neosoft.com/systems/FreeBSD
Contact: smace@NeoSoft.COM.
-
+
+ ftp://kryten.atinc.com/pub/FreeBSD
Contact: jmb@kryten.atinc.com.
-
+
+ ftp://ftp.dataplex.net/pub/FreeBSD
Contact: rkw@dataplex.net.
-
+
+ ftp://ftp.cps.cmich.edu/pub/ftp.freebsd.org
Contact: ftpadmin@cps.cmich.edu.
-
+
+ ftp://ftp.cslab.vt.edu/pub/FreeBSD
Contact: ftp@ftp.cslab.vt.edu.
-
- UK
-
- + ftp://src.doc.ic.ac.uk/packages/unix/FreeBSD
- Contact: wizards@doc.ic.ac.uk.
-
- + ftp://unix.hensa.ac.uk/pub/walnut.creek/FreeBSD
- Contact: archive-admin@unix.hensa.ac.uk.
-
- + ftp://ftp.demon.co.uk/pub/BSD/FreeBSD
- Contact: uploads@demon.net.
-
+
The latest versions of export-restricted code for FreeBSD (2.0C or
@@ -171,22 +175,21 @@ Obtaining FreeBSD
locations. If you are outside the U.S. or Canada, please get secure
(DES) and eBones (Kerberos) from one of the following foreign
distribution sites:
-
- SouthAfrica
-
+
+ South Africa
+
+ ftp://ftp.internat.freebsd.org/pub/FreeBSD
Contact: Mark Murray mark@grondar.za.
-
+
+ ftp://storm.sea.uct.ac.za/pub/FreeBSD
Contact: Shaun Courtney ftp@storm.sea.uct.ac.za.
-
+
Brazil
-
+
+ ftp://ftp.iqm.unicamp.br/pub/FreeBSD
Contact: Pedro A M Vazquez vazquez@iqm.unicamp.br.
-
+
Finland
-
+
+ ftp://nic.funet.fi/pub/unix/FreeBSD/eurocrypt
Contact: count@nic.funet.fi.
-
diff --git a/release/Makefile b/release/Makefile
index 9d57226..e9ae128 100644
--- a/release/Makefile
+++ b/release/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.193 1995/06/11 19:29:26 rgrimes Exp $
+# $Id: Makefile,v 1.194 1995/07/25 19:13:20 jkh Exp $
#
# How to roll a release:
#
@@ -11,10 +11,10 @@
# that on a 14.4 line just yet...
#
# SET THIS !!!
-#BUILDNAME=SOME_RANDOM_BUILD
-
+BUILDNAME=2.1.0-RELEASE
+CHROOTDIR=/a/release
# If this is a RELEASE, then set
-#RELEASETAG=something
+RELEASETAG=RELENG_2_1_0
# Things which without too much trouble can be considered variables
@@ -22,6 +22,12 @@ EXPORT_DISTS= games manpages proflibs dict info
EXTRA_DISTS= krb des ${EXPORT_DISTS}
ALL_DISTS= bin ${EXTRA_DISTS}
+# 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
+#EXTRA_SRC+= usr.sbin/config kconf
+
BOOT1= etc/protocols etc/sysconfig
FAQS= MIRROR.SITES
@@ -44,8 +50,8 @@ ZIPNSPLIT= gzip --no-name -9 -c | split -b 240640 -
# Size of the mfs to put in the kernel we boot.
# You want to keep this as small as possible, it costs dearly in RAM.
-BOOTMFSSIZE= 1075
-MFSINODE= 80000
+BOOTMFSSIZE= 1000
+MFSINODE= 70000
# Things which will get you into trouble if you change them
DISTRIBUTIONS= bin ${EXTRA_DISTS}
@@ -64,16 +70,15 @@ release:
.endif
.if exists(${CHROOTDIR})
chflags -R noschg ${CHROOTDIR}/.
- rm -rf ${CHROOTDIR}/*
-.else
- mkdir ${CHROOTDIR}
+ rm -rf ${CHROOTDIR}
.endif
+ mkdir -p ${CHROOTDIR}
cd ${.CURDIR}/../etc ; ${MAKE} distrib-dirs DESTDIR=${CHROOTDIR}
cd ${.CURDIR}/../etc ; ${MAKE} distribution DESTDIR=${CHROOTDIR}
cd ${.CURDIR}/.. ; ${MAKE} install DESTDIR=${CHROOTDIR}
echo "#!/bin/sh" > ${CHROOTDIR}/mk
echo "set -ex" >> ${CHROOTDIR}/mk
- echo "CFLAGS='-O2 -pipe'" >> ${CHROOTDIR}/mk
+ echo "CFLAGS='-O -pipe'" >> ${CHROOTDIR}/mk
echo "export CFLAGS" >> ${CHROOTDIR}/mk
echo "RELEASEDIR=/R" >> ${CHROOTDIR}/mk
echo "export RELEASEDIR" >> ${CHROOTDIR}/mk
@@ -82,32 +87,30 @@ release:
echo "cd /usr/src/release" >> ${CHROOTDIR}/mk
echo "make obj" >> ${CHROOTDIR}/mk
echo "make doRELEASE" >> ${CHROOTDIR}/mk
+ echo "echo Release Finished" >> ${CHROOTDIR}/mk
.if !defined(RELEASETAG)
cd ${CHROOTDIR}/usr ; cvs co -P src
.else
cd ${CHROOTDIR}/usr ; cvs co -P -r ${RELEASETAG} src
.endif
( cd ${CHROOTDIR}/usr/src/sys/conf && \
- mv newvers.sh foo && \
- sed "s/^RELEASE=.*/RELEASE=${BUILDNAME}/" foo > newvers.sh; rm foo )
- # To be used in development...
- #find ${.CURDIR} -print | cpio -dumpv ${CHROOTDIR}
+ cp newvers.sh foo && \
+ sed "s/^RELEASE=.*/RELEASE=${BUILDNAME}/" foo > newvers.sh; rm foo )
+ ( cd ${CHROOTDIR}/usr/src/release/sysinstall && \
+ sed "s/__RELEASE/${BUILDNAME}/" version.h > version.h.new && mv version.h.new version.h )
chmod 755 ${CHROOTDIR}/mk
chroot ${CHROOTDIR} /mk
-# Same as above, but assume that a build just fell over, has been corrected
-# and now we just want to pick up where we left off.
+# Same as above but for re-rolling the release after simply changing a few
+# things.
rerelease:
.if !defined(CHROOTDIR) || !defined(BUILDNAME)
- @echo "To make a release you must set CHROOTDIR and BUILDNAME" && false
+ @echo "To make a re-release you must set CHROOTDIR and BUILDNAME" && false
.endif
@if [ ! -d ${CHROOTDIR} ]; then echo "No ${CHROOTDIR} directory to re-release in!"; exit 1; fi
- cd ${.CURDIR}/../etc ; ${MAKE} distrib-dirs DESTDIR=${CHROOTDIR}
- cd ${.CURDIR}/../etc ; ${MAKE} distribution DESTDIR=${CHROOTDIR}
- cd ${.CURDIR}/.. ; ${MAKE} -k install DESTDIR=${CHROOTDIR}
echo "#!/bin/sh" > ${CHROOTDIR}/mk
echo "set -ex" >> ${CHROOTDIR}/mk
- echo "CFLAGS='-O2 -pipe'" >> ${CHROOTDIR}/mk
+ echo "CFLAGS='-O -pipe'" >> ${CHROOTDIR}/mk
echo "export CFLAGS" >> ${CHROOTDIR}/mk
echo "RELEASEDIR=/R" >> ${CHROOTDIR}/mk
echo "export RELEASEDIR" >> ${CHROOTDIR}/mk
@@ -122,6 +125,7 @@ rerelease:
echo "cd /usr/src/release" >> ${CHROOTDIR}/mk
echo "make obj" >> ${CHROOTDIR}/mk
echo "make doRELEASE" >> ${CHROOTDIR}/mk
+ echo "echo Re-Release Finished" >> ${CHROOTDIR}/mk
.if !defined(RELEASENOUPDATE)
.if !defined(RELEASETAG)
cd ${CHROOTDIR}/usr ; cvs update -P -d -q src
@@ -130,13 +134,17 @@ rerelease:
.endif
.endif
( cd ${CHROOTDIR}/usr/src/sys/conf && \
- mv newvers.sh foo && \
- sed "s/^RELEASE=.*/RELEASE=${BUILDNAME}/" foo > newvers.sh; rm foo )
- # To be used in development...
- #find ${.CURDIR} -print | cpio -dumpv ${CHROOTDIR}
+ mv newvers.sh foo && \
+ sed "s/^RELEASE=.*/RELEASE=${BUILDNAME}/" foo > newvers.sh; rm foo )
+ ( cd ${CHROOTDIR}/usr/src/release/sysinstall && \
+ sed "s/__RELEASE/${BUILDNAME}/" version.h > version.h.new && mv version.h.new version.h )
chmod 755 ${CHROOTDIR}/mk
chroot ${CHROOTDIR} /mk
+whap:
+ ( cd ${CHROOTDIR}/usr/src/release/sysinstall && \
+ sed "s/__RELEASE/${BUILDNAME}/" version.h > version.h.new && mv version.h.new version.h )
+
clean:
rm -rf root_crunch boot_crunch release.[0-9] release.1[0]
@@ -179,15 +187,20 @@ release.2:
install -m 444 -o bin -g bin libgcc.so.261.0 ${RD}/trees/bin/usr/lib
touch release.2
-# Make and install a couple of kernels we need.
+# Make and install a couple of kernels we need. To keep BOOTMFS smaller,
+# we cull out certain options (see fgrep -v) before building it.
release.3:
rm -rf ${RD}/kernels
mkdir -p ${RD}/kernels
@cd ${.CURDIR} && $(MAKE) ckRELEASEDIR
cd ${.CURDIR}/../sys/i386/conf && \
- sed 's/GENERIC/BOOTMFS/g' GENERIC > BOOTMFS && \
+ fgrep -v SYSV GENERIC | \
+ fgrep -v pty | \
+ fgrep -v PROCFS | \
+ sed 's/GENERIC/BOOTMFS/g' > BOOTMFS && \
echo "options \"MFS_ROOT=${BOOTMFSSIZE}\"" >> BOOTMFS && \
echo "options MFS" >> BOOTMFS
+
for i in BOOTMFS GENERIC ; do \
cd ${.CURDIR}/../sys/i386/conf && \
config $$i && \
@@ -198,7 +211,6 @@ release.3:
rm -rf ${.CURDIR}/../sys/compile/$$i ; \
done
rm -f ${.CURDIR}/../sys/i386/conf/BOOTCDROM
- cd ${RD}/kernels && kzip GENERIC
touch release.3
# Make and install the three crunched binaries which live on the floppies.
@@ -300,6 +312,18 @@ release.7:
TD=src ARG="$$i" ; \
fi ; \
done
+.if defined(EXTRA_SRC)
+ @set ${EXTRA_SRC} ; \
+ while [ $$# -ge 2 ] ; do \
+ if [ -d /usr/src/$$1 -a "$$1" != "CVS" ] ; then \
+ cd ${.CURDIR} ; \
+ $(MAKE) doTARBALL SD=/usr/src \
+ TN="s$$2" \
+ TD=src ARG="$$1" ; \
+ fi ; \
+ shift ; shift ; \
+ done
+.endif
( cd ${RD}/dists/src && \
if [ -f ssecure.aa ] ; then mv ssecure.* ../des ; fi && \
if [ -f sebones.aa ] ; then mv sebones.* ../des ; fi )
@@ -330,11 +354,11 @@ release.8: write_mfs_in_kernel
cd ${RD}/mfsfd && \
mkdir -p dev mnt stand/help
@cd ${.CURDIR} && $(MAKE) installCRUNCH CRUNCH=boot \
- DIR=${RD}/mfsfd/stand ZIP=false
+ DIR=${RD}/mfsfd/stand ZIP=true
( cd ${RD}/trees/bin/dev && \
ls console tty ttyv0 ttyv1 ttyv2 ttyv3 null zero \
- *[sw]d* cuaa[01] fd[01] rfd[01] \
- cd0a mcd0a scd0a matcd0a rst0 ft0 rwt0 | \
+ *[sw]d* cuaa[01] cuaa[23] fd[01] rfd[01] \
+ cd0a mcd0a scd0a matcd0a wcd0c rst0 rft0 rwt0 | \
cpio -dump ${RD}/mfsfd/dev )
( cd ${RD}/mfsfd/dev && rm -f *[sw]d*[bdefgh] )
cd ${RD}/trees/bin && ls ${BOOT1} | cpio -dump ${RD}/mfsfd/stand
@@ -342,12 +366,9 @@ release.8: write_mfs_in_kernel
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
- rm -rf ${.CURDIR}/sysinstall/help/ja_JP.JIS
tar --exclude CVS -cf - -C ${.CURDIR}/sysinstall help | \
tar xvf - -C ${RD}/mfsfd/stand
- install -c ${.CURDIR}/../COPYRIGHT ${RD}/mfsfd/stand/help/en_US.ISO8859-1/COPYRIGHT
- (cd ${RD}/mfsfd/stand/help && tar cf - * | gzip -9 > ../help.tgz)
- (cd ${RD}/mfsfd/stand && rm -rf help)
+ install -c ${.CURDIR}/../COPYRIGHT ${RD}/mfsfd/stand/help/COPYRIGHT.hlp
( \
a=`expr ${BOOTMFSSIZE} \* 2` && \
echo && \
@@ -357,6 +378,8 @@ release.8: write_mfs_in_kernel
echo " :pc#$$a:oc#0:bc#4096:fc#512:" && \
echo \
) >> /etc/disktab
+
+ # first the standard boot floppy, with GENERIC kernel
cd ${.CURDIR} && ${MAKE} doFS FSSIZE=${BOOTMFSSIZE} \
FSPROTO=${RD}/mfsfd FSLABEL=mfs${BOOTMFSSIZE} \
FSINODE=${MFSINODE}
@@ -386,7 +409,9 @@ release.9:
mv ${RD}/rootfd/stand/info/src/ssecure.inf ${RD}/rootfd/stand/info/des
mv ${RD}/rootfd/stand/info/src/sebones.inf ${RD}/rootfd/stand/info/des
tar -cf - -C ${RD}/trees/bin/dev MAKEDEV | tar xvf - -C ${RD}/rootfd/stand
- cd ${RD}/rootfd && ( rm -f OK && find . -print && touch OK && echo OK ) | cpio -H tar -oa | gzip -9 -c | dd conv=osync > ${RD}/floppies/root.tmp
+ cp ${.CURDIR}/sysinstall/power.uu ${RD}/rootfd/stand && \
+ cd ${RD}/rootfd/stand && uudecode power.uu && rm power.uu
+ cd ${RD}/rootfd && ( rm -f OK && find . -print && touch OK && echo OK ) | cpio -H newc -oa | gzip -9 -c | dd conv=osync > ${RD}/floppies/root.tmp
mv ${RD}/floppies/root.tmp ${RD}/floppies/root.flp
touch release.9
@@ -397,23 +422,15 @@ release.10:
mkdir ${RD}/fixitfd
cd ${RD}/fixitfd && \
mkdir stand bin sbin etc mnt mnt1 mnt2 mnt3 mnt4 tmp
- ln -f ${RD}/kernels/GENERIC.kz ${RD}/fixitfd/kernel
@cd ${.CURDIR} && $(MAKE) installCRUNCH CRUNCH=fixit \
DIR=${RD}/fixitfd/stand ZIP=true
( cd ${RD}/trees/bin/dev && \
- sh MAKEDEV wd0s5 wd0s6 wd0s7 wd0s8 && \
- ls console tty ttyv0 ttyv1 null zero \
- *[sw]d* fd[01] rfd[01] | \
+ sh MAKEDEV all && \
+ find . -print | \
cpio -dump ${RD}/fixitfd/dev )
- ln -f ${RD}/fixitfd/stand/init ${RD}/fixitfd/sbin
- ln -f ${RD}/fixitfd/stand/sh ${RD}/fixitfd/bin
- cp ${RD}/trees/bin/usr/mdec/fdboot ${RD}/fixitfd/etc/boot1
- cp ${RD}/trees/bin/usr/mdec/bootfd ${RD}/fixitfd/etc/boot2
+ cp ${RD}/trees/bin/etc/spwd.db ${RD}/fixitfd/etc
cp ${.CURDIR}/fixit.profile ${RD}/fixitfd/.profile
- echo 'echo /etc/rc' > ${RD}/fixitfd/etc/rc
- echo 'exit 1' >> ${RD}/fixitfd/etc/rc
- touch ${RD}/fixitfd/etc/spwd.db
- cd ${.CURDIR} && ${MAKE} doFLOPPY FLOPPY=fixit
+ cd ${.CURDIR} && ${MAKE} doFLOPPY FLOPPY=fixit FDINODE=1024
touch release.10
ftp.1:
@@ -421,7 +438,7 @@ ftp.1:
mkdir ${FD}
cd ${RD} && find floppies -print | cpio -dumpl ${FD}
cd ${RD}/dists && find . -print | cpio -dumpl ${FD}
- cd ${RD}/trees/bin/usr/share/FAQ/Text && ln -f ${FAQS} ${FD}
+ cd ${.CURDIR} && ln -f ${FAQS} ${FD}
# This rule makes ${CHROOTDIR}/R/ftp a suitable anon ftp for testing.
ftp.2:
@@ -469,13 +486,14 @@ doTARBALL:
)
doRELEASE: release.1 release.2 release.3 release.4 release.5 release.6 \
- release.7 release.8 release.9
+ release.7 release.8 release.9 release.10
cd ${.CURDIR} && ${MAKE} cdrom.1 ftp.1
@echo "Release done"
floppies:
- rm -f release.4 release.8 release.9
- cd ${.CURDIR} && ${MAKE} doRELEASE
+ cd ${.CURDIR} && ${MAKE} boot.flp
+ cd ${.CURDIR} && ${MAKE} root.flp
+ cd ${.CURDIR} && ${MAKE} fixit.flp
boot.flp:
rm -f release.4 release.8
diff --git a/release/adduser.sh b/release/adduser.sh
deleted file mode 100755
index 3ccd700..0000000
--- a/release/adduser.sh
+++ /dev/null
@@ -1,183 +0,0 @@
-#!/stand/sh
-#
-# Written: November 6th, 1994
-# Copyright (C) 1994 by Michael Reifenberger
-#
-# Permission to copy or use this software for any purpose is granted
-# provided that this message stay intact, and at this location (e.g. no
-# putting your name on top after doing something trivial like reindenting
-# it, just to make it look like you wrote it!).
-
-########################
-# First set some globals
-startuid=1000;
-startgid=1000;
-gname=guest
-uname=guest
-shell="/bin/csh"
-needgentry="NO"
-
-. /stand/miscfuncs.sh
-
-#########################
-# Some Functions we need.
-#
-###########################
-# Show the User all options
-usage() {
-message "
-adduser -h Prints help
-adduser -i For interactively adding users
-
-Command line options:
-adduser [-u UserName][-g GroupName][-s Shell]"
- exit 1
-}
-##########################
-# Get the next free UserID
-getuid() {
-local xx=$startuid;
-uid=$startuid;
-for i in `cut -f 3 -d : /etc/master.passwd | cut -c 2- | sort -n`; do
- if [ $i -lt $xx ]; then
- elif [ $i -eq $xx ]; then xx=`expr $xx + 1`
- else uid=$xx; return 0
- fi
-done
-}
-#######################################################
-# Get the next free GroupID or the GroupID of GroupName
-getgid() {
-local xx=$startgid;
-gid=$startgid;
-needgentry="YES"
-if grep -q \^$gname: /etc/group; then
- gid=`grep \^$gname: /etc/group | cut -f 3 -d:`
- needgentry="NO"
-else
- for i in `cut -f 3 -d : /etc/group | cut -c 2- | sort -n`; do
- if [ $i -lt $xx ]; then
- elif [ $i -eq $xx ]; then xx=`expr $xx + 1`
- else gid=$xx; return 0
- fi
- done
-fi
-}
-##########################################
-# Ask the User interactively what he wants
-interact() {
-dialog --title "Add New User Name" --clear \
---inputbox "Please specify a login name for the user:\n\
-Hit [return] for a default of <$uname>" -1 -1 2> /tmp/i.$$
-ret=$?
-case $ret in
- 0)
- if [ x`cat /tmp/i.$$` != x ]; then
- uname=`cat /tmp/i.$$`; fi;;
- 1|255)
- exit 1;;
-esac
-if grep -q \^$uname: /etc/master.passwd; then
- error "Username $uname already exists."
- exit 1
-fi
-dialog --title "Group Name" --clear \
---inputbox "Which group should $uname belong to?\n\
-Hit [return] for default of <$gname>" -1 -1 2> /tmp/i.$$
-ret=$?
-case $ret in
- 0)
- if [ x`cat /tmp/i.$$` != x ]; then
- gname=`cat /tmp/i.$$`; fi;;
- 1|255)
- exit 1;;
-esac
-dialog --title "Login Shell" --clear \
---inputbox "Please specify which login shell\n<$uname> should use\n\
-Hit [return] for default of <$shell>" -1 -1 2> /tmp/i.$$
-ret=$?
-case $ret in
- 0)
- if [ x`cat /tmp/i.$$` != x ]; then
- shell=`cat /tmp/i.$$`; fi;;
- 1|255)
- exit 1;;
-esac
-##############
-# Remove junk
-rm -f /tmp/i.$$
-}
-
-#########
-# START #
-#########
-
-###################################
-# Parse the commandline for options
-set -- `getopt hiu:g:s: $*`
-if [ $? != 0 ]; then
- usage
-fi
-for i; do
- case "$i"
- in
- -h)
- usage; shift;;
- -i)
- interact; shift; iflag=yes; break;;
- -u)
- uname=$2; shift; shift;;
- -g)
- gname=$2; shift; shift;;
- -s)
- shell=$2; shift; shift;;
- --)
- shift; break;;
-# *)
-# usage; shift;;
- esac
-done
-#####################
-# This is no Edituser
-if grep -q \^$uname: /etc/master.passwd; then
- error "This user already exists in the master password file.\n
-Use 'chpass' to edit an existing user rather than adduser.."
- exit 1;
-fi
-
-###############
-# Get Free ID's
-getuid;
-getgid;
-###################
-# Only if necessary
-if [ $needgentry = "YES" ]; then
- echo "$gname:*:$gid:$uname" >> /etc/group
-fi
-################
-# Make /home BTW
-mkdir -p -m755 /home/$uname
-if [ ! -d /home/$uname ]; then
- error "Could not create /home/$uname"
- exit 1
-else
- for xx in /usr/share/skel/*; do
- cp $xx /home/$uname/.`basename $xx | cut -f 2 -d .`
- done
-fi
-#####################
-# Make the User happy
-if [ ! -x $shell ]; then
- message "There is no <$shell> shell, using /bin/sh instead.\n
- If you wish, you can change this choice later with 'chpass'"
- shell="/bin/csh"
-elif ! grep -q $shell /etc/shells; then
- echo $shell >> /etc/shells
- echo "<$shell> added to /etc/shells"
-fi
-echo "$uname:*:$uid:$gid::0:0:User &:/home/$uname:$shell" >> /etc/master.passwd
-pwd_mkdb /etc/master.passwd
-chown -R $uname.$gname /home/$uname
-chmod -R 644 /home/$uname
-chmod 755 /home/$uname
-passwd $uname
diff --git a/release/alpha/boot_crunch.conf b/release/alpha/boot_crunch.conf
index e5a7ceb..bb0e7e6 100644
--- a/release/alpha/boot_crunch.conf
+++ b/release/alpha/boot_crunch.conf
@@ -1,10 +1,10 @@
-# $Id: boot_crunch.conf,v 1.19.2.1 1995/06/04 11:52:44 jkh Exp $
+# $Id: boot_crunch.conf,v 1.20.2.3 1995/10/05 08:58:19 jkh Exp $
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
progs sh find
-progs ft ppp
+progs pwd ft ppp
progs sysinstall newfs gzip cpio bad144 fsck ifconfig route slattach
progs mount_nfs
ln gzip gunzip
diff --git a/release/alpha/fixit_crunch.conf b/release/alpha/fixit_crunch.conf
index 9061a38..502e86e 100644
--- a/release/alpha/fixit_crunch.conf
+++ b/release/alpha/fixit_crunch.conf
@@ -1,4 +1,4 @@
-# $Id: fixit_crunch.conf,v 1.2 1995/04/12 08:00:24 phk Exp $
+# $Id: fixit_crunch.conf,v 1.3.4.7 1995/10/05 09:27:06 jkh Exp $
# first, we list the source dirs that our programs reside in. These are
# searched in order listed to find the dir containing each program.
@@ -14,34 +14,28 @@ srcdirs /usr/src/sbin/i386
# /bin stuff
progs cat chmod chroot cp date dd df echo ed expr hostname kill ln ls mkdir
-progs mt mv pwd rcp rm rmdir sh sleep stty sync test
+progs mt mv pwd rcp rm rmdir sleep stty sync test
ln test [
-ln sh -sh # init invokes the shell this way
# /sbin stuff
-progs bad144 badsect chown clri disklabel dump dmesg fdisk fsck ifconfig init
-progs mknod mount newfs ping reboot restore swapon umount
+progs badsect chown clri disklabel dump dmesg fdisk
+progs mknod mount newfs ping reboot restore scsi swapon umount
progs mount_msdos mount_cd9660 mount_nfs
ln dump rdump
ln restore rrestore
+ln newfs mount_mfs
# /usr/bin stuff
-progs ftp rsh sed telnet rlogin common find
+progs ftp rsh sed telnet rlogin common find grep
ln common vi
ln common view
ln common ex
-# gnu stuff
-
-progs cpio gzip
-ln gzip gunzip
-ln gzip gzcat
-
# finally, we specify the libraries to link in with our binary
libs -lcrypt -ltelnet -lutil -ll
-libs -lcurses -ltermcap -ledit -lkvm
+libs -lcurses -ltermcap -ledit -lgnuregex -lkvm -lscsi
diff --git a/release/amd64/boot_crunch.conf b/release/amd64/boot_crunch.conf
index e5a7ceb..bb0e7e6 100644
--- a/release/amd64/boot_crunch.conf
+++ b/release/amd64/boot_crunch.conf
@@ -1,10 +1,10 @@
-# $Id: boot_crunch.conf,v 1.19.2.1 1995/06/04 11:52:44 jkh Exp $
+# $Id: boot_crunch.conf,v 1.20.2.3 1995/10/05 08:58:19 jkh Exp $
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
progs sh find
-progs ft ppp
+progs pwd ft ppp
progs sysinstall newfs gzip cpio bad144 fsck ifconfig route slattach
progs mount_nfs
ln gzip gunzip
diff --git a/release/bininst b/release/bininst
deleted file mode 100755
index b4e6aab..0000000
--- a/release/bininst
+++ /dev/null
@@ -1,143 +0,0 @@
-#!/stand/sh
-#
-# bininst - perform the last stage of installation by somehow getting
-# a bindist onto the user's disk and unpacking it. The name bininst
-# is actually something of a misnomer, since this utility will install
-# more than just the bindist set.
-#
-# Written: November 11th, 1994
-# Copyright (C) 1994 by Jordan K. Hubbard
-#
-# Permission to copy or use this software for any purpose is granted
-# provided that this message stay intact, and at this location (e.g. no
-# putting your name on top after doing something trivial like reindenting
-# it, just to make it look like you wrote it!).
-#
-# $Id: bininst,v 1.55 1994/12/29 20:09:59 jkh Exp $
-
-if [ "${_BININST_LOADED_}" = "yes" ]; then
- error "Error, $0 loaded more than once!"
- return 1
-else
- _BININST_LOADED_=yes
-fi
-
-# Grab the miscellaneous functions.
-. /stand/miscfuncs.sh
-
-# Grab the installation routines
-. /stand/instdist.sh
-
-# Grab the network setup routines
-. /stand/netinst.sh
-
-# Deal with trigger-happy users.
-trap interrupt 1 2 15
-
-# set initial defaults
-set_defaults()
-{
- network_set_defaults
- media_set_defaults
- INSTALLING="yes"
- mkdir -p ${TMP}
- cp /stand/etc/* /etc
-}
-
-# Print welcome banner.
-welcome()
-{
- dialog --title "Welcome to FreeBSD!" --msgbox \
-"Installation may now proceed from tape, CDROM, a network (NFS or ftp
-over ethernet, SLIP or parallel port) or DOS (existing hard disk
-partition or floppies). If you're installing over a network, make
-sure your cables are plugged in and ready to go. If you're installing
-from tape, CDROM or floppies, now would be a good time to remember
-where you put the distribution media! :-) Please remove the cpio
-floppy from the drive and press return." -1 -1
-}
-
-do_last_config()
-{
- DONE=""
- while [ "${DONE}" = "" ]; do
- dialog --title "Final Configuration!" --menu \
-"We now come to the end of the installation. If there's a\n\
-floppy in the boot drive, now would probably be a good time\n\
-to remove it as the system will reboot when you exit the shell\n\
-at the end of this stage.\n\n\
-Please select one of the following options:" -1 -1 5 \
-"tzsetup" "Configure your time zone" \
-"network" "Configure networking" \
-"user" "Add a user name for yourself to the system" \
-"guest" "Simply add a user \"guest\" with all default options" \
-"done" "Exit the installation." 2> ${TMP}/menu.tmp.$$
- RETVAL=$?
- CHOICE=`cat ${TMP}/menu.tmp.$$`
- rm -f ${TMP}/menu.tmp.$$
- if ! handle_rval ${RETVAL}; then exit 0; fi
-
- case ${CHOICE} in
- tzsetup)
- dialog --clear
- sh /stand/tzsetup
- dialog --clear
- ;;
-
- network)
- network_setup
- ;;
-
- user)
- sh /stand/adduser.sh -i
- ;;
-
- guest)
- sh /stand/adduser.sh
- ;;
-
- done)
- DONE="yes"
- ;;
- esac
- done
-
- dialog --title "Auf Wiedersehen!" --msgbox \
-"Don't forget that the login name \"root\" has no password.
-If you didn't create any users with adduser, you can at least log in
-as this user. Also be aware that root is the _superuser_, which means
-that you can easily wipe out your system if you're not careful!
-
-There are many useful pre-compiled packages for ${DISTNAME}
-available which you may also wish to investigate. Look in:
-
- ftp://ftp.freebsd.org/pub/FreeBSD/${DISTNAME}/packages
-
-Any install-related comments to jkh@freebsd.org, phk@freebsd.org or
-paul@freebsd.org.
-
-We sincerely hope you enjoy FreeBSD 2.0!
-
- The FreeBSD Project Team" -1 -1
-}
-
-welcome
-set_defaults
-
-while [ "${INSTALLING}" = "yes" ]; do
- if media_select_distribution; then
- if media_chose; then
- for xx in ${MEDIA_DISTRIBUTIONS}; do
- MEDIA_DISTRIBUTION=`eval echo \`echo $xx\``
- media_install_set
- done
- fi
- else
- do_last_config
- INSTALLING="no"
- fi
-done
-echo; echo "Spawning shell. Exit shell to continue with new bindist."
-echo "Progress <installation completed>" > /dev/ttyv1
-/stand/sh
-exit 20
diff --git a/release/boot_crunch.conf b/release/boot_crunch.conf
index e5a7ceb..bb0e7e6 100644
--- a/release/boot_crunch.conf
+++ b/release/boot_crunch.conf
@@ -1,10 +1,10 @@
-# $Id: boot_crunch.conf,v 1.19.2.1 1995/06/04 11:52:44 jkh Exp $
+# $Id: boot_crunch.conf,v 1.20.2.3 1995/10/05 08:58:19 jkh Exp $
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
progs sh find
-progs ft ppp
+progs pwd ft ppp
progs sysinstall newfs gzip cpio bad144 fsck ifconfig route slattach
progs mount_nfs
ln gzip gunzip
diff --git a/release/boot_flp.conf b/release/boot_flp.conf
deleted file mode 100644
index 23433ac..0000000
--- a/release/boot_flp.conf
+++ /dev/null
@@ -1,18 +0,0 @@
-# $Id: boot_flp.conf,v 1.3 1994/11/18 11:31:28 phk Exp $
-
-srcdirs /usr/src/bin /usr/src/sbin /usr/src/usr.bin /usr/src/gnu/usr.bin
-srcdirs /usr/src/usr.sbin
-
-# Programs from bin/
-# progs sh mkdir rm mknod chmod expr
-# progs ln test mount umount cat mv sync cp
-# progs cpio gzip sysinstall newfs
-progs sysinstall newfs gzip cpio fsck dialog bad144 fsck
-ln gzip gunzip
-ln gzip zcat
-# ln sh -sh
-# ln sysinstall oinit
-# ln test [
-
-# libs -ll -ledit -ltermcap -lutil -lscrypt
-libs -ldialog -lncurses -lmytinfo
diff --git a/release/cpio_crunch.conf b/release/cpio_crunch.conf
deleted file mode 100644
index b690ed5a..0000000
--- a/release/cpio_crunch.conf
+++ /dev/null
@@ -1,37 +0,0 @@
-# $Id: cpio_crunch.conf,v 1.6 1995/05/21 18:29:51 jkh Exp $
-
-# 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/gnu/usr.bin
-srcdirs /usr/src/bin /usr/src/sbin /usr/src/sbin/i386 /usr/src/usr.bin
-srcdirs /usr/src/usr.sbin
-
-# 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 cksum cp date dd df echo ed expr grep hostname kill ln
-progs mkdir mt mv pwd rcp rm rmdir sleep slattach stty sync test ft
-ln test [
-
-# /sbin stuff
-
-progs badsect basename chown clri disklabel dmesg dump dmesg fdisk ft
-progs getopt init mknod mount mount_cd9660 mount_msdos mount_nfs
-progs ping reboot restore swapon umount
-ln dump rdump
-ln restore rrestore
-ln reboot halt
-
-# /usr/bin stuff
-
-progs tar ncftp ppp rsh sed telnet rlogin
-#progs tip
-#ln tip cu
-
-# finally, we specify the libraries to link in with our binary
-libs -lcrypt -ltelnet -lutil -ll -ledit
-libs -lgnuregex -lreadline -lcurses -ltermcap -lkvm
diff --git a/release/cpio_flp_1.conf b/release/cpio_flp_1.conf
deleted file mode 100644
index 114a0f4..0000000
--- a/release/cpio_flp_1.conf
+++ /dev/null
@@ -1,37 +0,0 @@
-# fixit.conf - put in anything we think we might want on a fixit floppy
-
-# 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/gnu/usr.bin
-srcdirs /usr/src/bin /usr/src/sbin /usr/src/sbin/i386 /usr/src/usr.bin
-srcdirs /usr/src/usr.sbin
-
-# 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 cksum cp date dd df echo ed expr grep hostname kill ln ls
-progs mkdir mt mv pwd rcp rm rmdir sh sleep slattach stty sync test
-ln test [
-ln sh -sh # init invokes the shell this way
-
-# /sbin stuff
-
-progs badsect basename chown clri disklabel dmesg dump dmesg fdisk fsck ft
-progs getopt ifconfig init mknod mount mount_cd9660 mount_msdos mount_nfs
-progs newfs ping reboot restore route swapon umount
-ln dump rdump
-ln restore rrestore
-ln reboot halt
-
-# /usr/bin stuff
-
-progs tar tip ftp ncftp rsh sed telnet rlogin
-ln tip cu
-
-# finally, we specify the libraries to link in with our binary
-libs -lcrypt -ltelnet -lutil -ll -ledit
-libs -lgnuregex -lreadline -lcurses -ltermcap -lkvm
diff --git a/release/extract.sh b/release/extract.sh
deleted file mode 100644
index 97bc4a7..0000000
--- a/release/extract.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/sh
-# $Id: extract.sh,v 1.16 1994/11/29 00:56:30 jkh Exp $
-PATH=/stand:$PATH
-DDIR=/
-
-if [ -f bindist.aa ] ; then
- # Temporary kludge for pathological bindist.
- if [ -f $DDIR/etc/myname ]; then
- cp $DDIR/etc/hosts $DDIR/etc/myname $DDIR/stand/etc
- fi
- if [ -f $DDIR/etc/defaultrouter ]; then
- cp $DDIR/etc/defaultrouter $DDIR/stand/etc
- fi
- echo; echo "Extracting bindist, please wait."
- cat bindist.?? | gzip -c -d | ( cd $DDIR; cpio -H tar -imdu )
- if [ -f $DDIR/stand/etc/myname ]; then
- # Add back what the bindist nuked.
- cp $DDIR/stand/etc/myname $DDIR/etc
- cat $DDIR/stand/etc/hosts >> $DDIR/etc/hosts
- fi
- if [ -f $DDIR/stand/etc/defaultrouter ]; then
- cp $DDIR/stand/etc/defaultrouter $DDIR/etc
- fi
- chmod 1777 /tmp
- rm -f /sys
- ln -s /usr/src/sys /sys
-fi
-
-for i in *.aa
-do
- b=`basename $i .aa`
- if [ "$b" != bindist ] ; then
- if [ "$b" = des ] ; then
- # We cannot replace /sbin/init while it runs
- # so move it out of the way for now
- mv /sbin/init /sbin/non_des_init
- fi
- echo "Extracting $b"
- cat $b.?? | gzip -c -d | ( cd $DDIR; cpio -H tar -imdu )
- fi
-done
diff --git a/release/fixit_crunch.conf b/release/fixit_crunch.conf
index 9061a38..502e86e 100644
--- a/release/fixit_crunch.conf
+++ b/release/fixit_crunch.conf
@@ -1,4 +1,4 @@
-# $Id: fixit_crunch.conf,v 1.2 1995/04/12 08:00:24 phk Exp $
+# $Id: fixit_crunch.conf,v 1.3.4.7 1995/10/05 09:27:06 jkh Exp $
# first, we list the source dirs that our programs reside in. These are
# searched in order listed to find the dir containing each program.
@@ -14,34 +14,28 @@ srcdirs /usr/src/sbin/i386
# /bin stuff
progs cat chmod chroot cp date dd df echo ed expr hostname kill ln ls mkdir
-progs mt mv pwd rcp rm rmdir sh sleep stty sync test
+progs mt mv pwd rcp rm rmdir sleep stty sync test
ln test [
-ln sh -sh # init invokes the shell this way
# /sbin stuff
-progs bad144 badsect chown clri disklabel dump dmesg fdisk fsck ifconfig init
-progs mknod mount newfs ping reboot restore swapon umount
+progs badsect chown clri disklabel dump dmesg fdisk
+progs mknod mount newfs ping reboot restore scsi swapon umount
progs mount_msdos mount_cd9660 mount_nfs
ln dump rdump
ln restore rrestore
+ln newfs mount_mfs
# /usr/bin stuff
-progs ftp rsh sed telnet rlogin common find
+progs ftp rsh sed telnet rlogin common find grep
ln common vi
ln common view
ln common ex
-# gnu stuff
-
-progs cpio gzip
-ln gzip gunzip
-ln gzip gzcat
-
# finally, we specify the libraries to link in with our binary
libs -lcrypt -ltelnet -lutil -ll
-libs -lcurses -ltermcap -ledit -lkvm
+libs -lcurses -ltermcap -ledit -lgnuregex -lkvm -lscsi
diff --git a/release/i386/boot_crunch.conf b/release/i386/boot_crunch.conf
index e5a7ceb..bb0e7e6 100644
--- a/release/i386/boot_crunch.conf
+++ b/release/i386/boot_crunch.conf
@@ -1,10 +1,10 @@
-# $Id: boot_crunch.conf,v 1.19.2.1 1995/06/04 11:52:44 jkh Exp $
+# $Id: boot_crunch.conf,v 1.20.2.3 1995/10/05 08:58:19 jkh Exp $
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
progs sh find
-progs ft ppp
+progs pwd ft ppp
progs sysinstall newfs gzip cpio bad144 fsck ifconfig route slattach
progs mount_nfs
ln gzip gunzip
diff --git a/release/instdist.sh b/release/instdist.sh
deleted file mode 100644
index cbee774..0000000
--- a/release/instdist.sh
+++ /dev/null
@@ -1,565 +0,0 @@
-#!/stand/sh
-#
-# instdist - Install a distribution from some sort of media.
-#
-# Written: November 11th, 1994
-# Copyright (C) 1994 by Jordan K. Hubbard
-#
-# Permission to copy or use this software for any purpose is granted
-# provided that this message stay intact, and at this location (e.g. no
-# putting your name on top after doing something trivial like reindenting
-# it, just to make it look like you wrote it!).
-#
-# $Id: instdist.sh,v 1.50 1995/01/09 14:41:13 jkh Exp $
-
-if [ "${_INSTINST_SH_LOADED_}" = "yes" ]; then
- return 0
-else
- _INSTINST_SH_LOADED_=yes
-fi
-
-# Grab the miscellaneous functions.
-. /stand/miscfuncs.sh
-
-# Set the initial state for media installation.
-media_set_defaults()
-{
- MEDIA_TYPE=""
- MEDIA_DEVICE=""
- MEDIA_DISTRIBUTIONS=""
- DISTRIB_SUBDIR=""
- TMPDIR=""
- FTP_PATH=""
- NFS_PATH=""
-}
-
-# Set the installation media to undefined.
-media_reset()
-{
- MEDIA_DEVICE=""
- MEDIA_TYPE=""
- MEDIA_DISTRIBUTIONS=""
- FTP_PATH=""
- NFS_PATH=""
- NFS_OPTIONS=""
-}
-
-# Set the location of our temporary unpacking directory.
-media_set_tmpdir()
-{
- if [ "X${TMPDIR}" != "X" ]; then
- return
- fi
-
- TITLE="Choose temporary directory"
- TMPDIR="/usr/tmp"
- DEFAULT_VALUE="${TMPDIR}"
- if ! input \
-"Please specify the name of a directory containing enough free
-space to hold the temporary files for this distribution. At
-minimum, a binary distribution will require around 21MB of
-temporary space. At maximum, a srcdist may take 30MB or more.
-If the directory you specify does not exist, it will be created
-for you. If you do not have enough free space to hold both the
-packed and unpacked distribution files, consider using the NFS
-or CDROM installation methods as they require no temporary
-storage."; then return 1; fi
- TMPDIR=${ANSWER}
- mkdir -p ${TMPDIR}
- return 0
-}
-
-media_cd_tmpdir()
-{
- if ! cd ${TMPDIR} > /dev/ttyv1 2>&1; then
- error "No such file or directory for ${TMPDIR}, sorry! Please fix this and try again."
- return 1
- fi
-}
-
-media_rm_tmpdir()
-{
- cd /
- if [ "X${NO_ASK_REMOVE}" != "X" ]; then
- rm -rf ${_TARGET}
- return
- fi
- if [ -d ${TMPDIR}/${MEDIA_DISTRIBUTION} ]; then
- _TARGET=${TMPDIR}/${MEDIA_DISTRIBUTION}
- else
- _TARGET=${TMPDIR}
- fi
- if dialog --title "Delete contents?" --yesno \
- "Do you wish to delete ${_TARGET}?" -1 -1; then
- rm -rf ${_TARGET}
- if dialog --title "Future Confirmation?" --yesno \
- "Do you wish to suppress this dialog in the future?" -1 -1;
- then
- NO_ASK_REMOVE=yes
- fi
- fi
-}
-
-media_select_ftp_site()
-{
- dialog --title "Please specify an ftp site" --menu \
-"FreeBSD is distributed from a number of sites on the Internet.\n\
-Please select the site closest to you or \"other\" if you'd like\n\
-to specify another choice. Also note that not all sites carry\n\
-every possible distribution! Distributions other than the basic\n\
-binary set are only guaranteed to be available from the Primary site.\n\
-If the first site selected doesn't respond, try one of the alternates.\n\
-Please use arrow keys to scroll through all items." \
--1 -1 5 \
- "Primary" "ftp.freebsd.org" \
- "Secondary" "freefall.cdrom.com" \
- "Australia" "ftp.physics.usyd.edu.au" \
- "Finland" "nic.funet.fi" \
- "France" "ftp.ibp.fr" \
- "Germany" "ftp.uni-duisburg.de" \
- "Israel" "orgchem.weizmann.ac.il" \
- "Japan" "ftp.sra.co.jp" \
- "Japan-2" "ftp.mei.co.jp" \
- "Japan-3" "ftp.waseda.ac.jp" \
- "Japan-4" "ftp.pu-toyama.ac.jp" \
- "Japan-5" "ftpsv1.u-aizu.ac.jp" \
- "Japan-6" "tutserver.tutcc.tut.ac.jp" \
- "Japan-7" "ftp.ee.uec.ac.jp" \
- "Korea" "ftp.cau.ac.kr" \
- "Netherlands" "ftp.nl.net" \
- "Russia" "ftp.kiae.su" \
- "Taiwan" "netbsd.csie.nctu.edu.tw" \
- "Thailand" "ftp.nectec.or.th" \
- "UK" "ftp.demon.co.uk" \
- "UK-2" "src.doc.ic.ac.uk" \
- "UK-3" "unix.hensa.ac.uk" \
- "USA" "ref.tfs.com" \
- "USA-2" "ftp.dataplex.net" \
- "USA-3" "kryten.atinc.com" \
- "USA-4" "ftp.neosoft.com" \
- "other" "None of the above. I want to specify my own." \
- 2> ${TMP}/menu.tmp.$$
- RETVAL=$?
- ANSWER=`cat ${TMP}/menu.tmp.$$`
- rm -f ${TMP}/menu.tmp.$$
- if ! handle_rval ${RETVAL}; then return 1; fi
- case ${ANSWER} in
- Primary) FTP_PATH="ftp://ftp.freebsd.org/pub/FreeBSD/${DISTNAME}" ;;
- Secondary) FTP_PATH="ftp://freefall.cdrom.com/pub/FreeBSD/${DISTNAME}" ;;
- Australia) FTP_PATH="ftp://ftp.physics.usyd.edu.au/FreeBSD/${DISTNAME}" ;;
- Finland) FTP_PATH="ftp://nic.funet.fi/pub/unix/FreeBSD/${DISTNAME}" ;;
- France) FTP_PATH="ftp://ftp.ibp.fr/pub/FreeBSD/${DISTNAME}" ;;
- Germany) FTP_PATH="ftp://ftp.uni-duisburg.de/pub/unix/FreeBSD/${DISTNAME}" ;;
- Israel) FTP_PATH="ftp://orgchem.weizmann.ac.il/pub/FreeBSD-${DISTNAME}" ;;
- Japan) FTP_PATH="ftp://ftp.sra.co.jp/pub/os/FreeBSD/distribution/${DISTNAME}" ;;
- Japan-2) FTP_PATH="ftp://ftp.mei.co.jp/free/PC-UNIX/FreeBSD/${DISTNAME}" ;;
- Japan-3) FTP_PATH="ftp://ftp.waseda.ac.jp/pub/FreeBSD/${DISTNAME}" ;;
- Japan-4) FTP_PATH="ftp://ftp.pu-toyama.ac.jp/pub/FreeBSD/${DISTNAME}" ;;
- Japan-5) FTP_PATH="ftp://ftpsv1.u-aizu.ac.jp/pub/os/FreeBSD/${DISTNAME}" ;;
- Japan-6) FTP_PATH="ftp://tutserver.tutcc.tut.ac.jp/FreeBSD/FreeBSD-${DISTNAME}" ;;
- Japan-7) FTP_PATH="ftp://ftp.ee.uec.ac.jp/pub/os/FreeBSD.other/FreeBSD-${DISTNAME}" ;;
- Korea) FTP_PATH="ftp://ftp.cau.ac.kr/pub/FreeBSD/${DISTNAME}" ;;
- Netherlands) FTP_PATH="ftp://ftp.nl.net/pub/os/FreeBSD/${DISTNAME}" ;;
- Russia) FTP_PATH="ftp://ftp.kiae.su/FreeBSD/${DISTNAME}" ;;
- Taiwan) FTP_PATH="ftp://netbsd.csie.nctu.edu.tw/pub/FreeBSD/${DISTNAME}" ;;
- Thailand) FTP_PATH="ftp://ftp.nectec.or.th/pub/FreeBSD/${DISTNAME}" ;;
- UK) FTP_PATH="ftp://ftp.demon.co.uk/pub/BSD/FreeBSD/${DISTNAME}" ;;
- UK-2) FTP_PATH="ftp://src.doc.ic.ac.uk/packages/unix/FreeBSD/${DISTNAME}" ;;
- UK-3) FTP_PATH="ftp://unix.hensa.ac.uk/pub/walnut.creek/FreeBSD/${DISTNAME}" ;;
- USA) FTP_PATH="ftp://ref.tfs.com/pub/FreeBSD/${DISTNAME}" ;;
- USA-2) FTP_PATH="ftp://ftp.dataplex.net/pub/FreeBSD/${DISTNAME}" ;;
- USA-3) FTP_PATH="ftp://kryten.atinc.com/pub/FreeBSD/${DISTNAME}" ;;
- USA-4) FTP_PATH="ftp://ftp.neosoft.com/systems/FreeBSD/${DISTNAME}" ;;
- other)
- TITLE="FTP Installation Information"
- DEFAULT_VALUE="${FTP_PATH}"
- if ! input \
-"Please specify the machine and parent directory location of the
-distribution you wish to load. This should be either a \"URL style\"
-specification (e.g. ftp://ftp.freeBSD.org/pub/FreeBSD/) or simply
-the name of a host to connect to. If only a host name is specified,
-the installation assumes that you will properly connect and \"mget\"
-the files yourself."; then return 1; fi
- FTP_PATH=${ANSWER}
- ;;
- esac
-}
-
-media_extract_dist()
-{
- if [ ! -f do_cksum.sh ]; then
- if [ -f ${MEDIA_DISTRIBUTION}/do_cksum.sh ]; then
- cd ${MEDIA_DISTRIBUTION}
- fi
- fi
- if [ -f do_cksum.sh ]; then
- message "Verifying checksums for distribution. Please wait!"
- if sh ./do_cksum.sh; then
- if [ -f extract.sh ]; then
- message "Extracting ${MEDIA_DISTRIBUTION} distribution. Please wait!"
- if [ -f ./is_interactive ]; then
- sh ./extract.sh
- else
- sh ./extract.sh < /dev/ttyv1 > /dev/ttyv1 2>&1
- fi
- dialog --title "Extraction Complete" --msgbox "Please press return to continue" -1 -1
- else
- error "No installation script found!"
- fi
- else
- error "Checksum error(s) found. Please check media!"
- fi
- else
- error "Improper distribution. No checksum script found!"
- media_reset
- fi
-}
-
-media_install_set()
-{
- # check to see if we already have it
- if [ -f ${TMPDIR}/${MEDIA_DISTRIBUTION}/extract.sh ]; then
- cd ${TMPDIR}/${MEDIA_DISTRIBUTION}
- media_extract_dist
- cd /
- return
- fi
- case ${MEDIA_TYPE} in
- cdrom|nfs|ufs|doshd)
- if ! cd ${MEDIA_DEVICE}/${MEDIA_DISTRIBUTION} > /dev/ttyv1 2>&1; then
- error "Unable to cd to ${MEDIA_DEVICE}/${MEDIA_DISTRIBUTION} directory."
- media_reset
- else
- media_extract_dist
- cd /
- fi
- return
- ;;
-
- tape)
- if ! media_set_tmpdir; then return; fi
- if ! media_cd_tmpdir; then return; fi
- if dialog --title "Please mount tape for ${MEDIA_DEVICE}." \
- --yesno "Please enter the next tape and select\n<Yes> to continue or <No> if finished" -1 -1; then
- message "Loading distribution from ${MEDIA_DEVICE}.\nUse ALT-F2 to see output, ALT-F1 to return."
- if [ "${MEDIA_DEVICE}" = "ftape" ]; then
- progress "${FT_CMD} | ${TAR_CMD} ${TAR_FLAGS} -"
- ${FT_CMD} | ${TAR_CMD} ${TAR_FLAGS} - > /dev/ttyv1 2>&1
- else
- progress "${TAR_CMD} ${TAR_FLAGS} ${MEDIA_DEVICE}"
- ${TAR_CMD} ${TAR_FLAGS} ${MEDIA_DEVICE} > /dev/ttyv1 2>&1
- fi
- fi
- if [ -d ${MEDIA_DISTRIBUTION} ]; then cd ${MEDIA_DISTRIBUTION}; fi
- media_extract_dist
- media_rm_tmpdir
- ;;
-
- dosfd)
- if ! media_set_tmpdir; then return; fi
- if ! media_cd_tmpdir; then return; fi
- COPYING="yes"
- progress "Preparing to extract from DOS floppies"
- while [ "${COPYING}" = "yes" ]; do
- progress "Asking for DOS diskette"
- if dialog --title "Insert distribution diskette" \
- --yesno "Please enter the next diskette and select\n<Yes> to continue or <No> if finished" -1 -1; then
- umount ${MNT} > /dev/null 2>&1
- if ! mount_msdos -o ro ${MEDIA_DEVICE} ${MNT}; then
- error "Unable to mount floppy! Please correct."
- else
- message "Loading distribution from ${MEDIA_DEVICE}.\nUse ALT-F2 to see output, ALT-F1 to return."
- ( ${TAR_CMD} -cf - -C ${MNT} . | ${TAR_CMD} -xvf - ) >/dev/ttyv1 2>&1
- umount ${MNT}
- fi
- else
- COPYING="no"
- fi
- done
- media_extract_dist
- media_rm_tmpdir
- return
- ;;
-
- ftp)
- if ! media_set_tmpdir; then return; fi
- if ! media_cd_tmpdir; then return; fi
- if ! echo ${MEDIA_DEVICE} | grep -q -v 'ftp://'; then
- message "Fetching distribution using ncftp.\nUse ALT-F2 to see output, ALT-F1 to return."
- mkdir -p ${MEDIA_DISTRIBUTION}
- if ! ncftp ${MEDIA_DEVICE}/${MEDIA_DISTRIBUTION}/* < /dev/null > /dev/ttyv1 2>&1; then
- error "Couldn't fetch ${MEDIA_DISTRIBUTION} distribution from\n${MEDIA_DEVICE}!"
- else
- media_extract_dist
- fi
- else
- dialog --clear
- ftp ${MEDIA_DEVICE}
- dialog --clear
- media_extract_dist
- fi
- media_rm_tmpdir
- return
- ;;
- esac
-}
-
-media_select_distribution()
-{
- MEDIA_DISTRIBUTIONS=""
- while [ "${MEDIA_DISTRIBUTIONS}" = "" ]; do
-
- dialog --title "Please specify a distribution to load" \
- --checklist \
-"FreeBSD is separated into a number of distributions for ease of\n\
-installation. With repeated passes through this screen, you'll be\n\
-given the chance to load one or all of them. Mandatory distributions\n\
-MUST be loaded! Please also note that the secrdist is NOT FOR EXPORT\n\
-from the U.S. Please don't endanger U.S. ftp sites by getting it\n\
-illegally, thanks! When finished, select <Cancel>." \
--1 -1 10 \
- "?diskfree" "How much disk space do I have free?" OFF \
- "bindist" "Binary base files (mandatory - ${BINSIZE})" ON \
- "games" "Games and other frivolities (optional - ${GAMESIZE})" OFF \
- "manpages" "Manual pages (optional - ${MANSIZE})" OFF \
- "proflibs" "Profiled libraries (optional - ${PROFSIZE})" OFF \
- "dict" "Spelling checker dictionary files (optional - ${DICTSIZE})" OFF \
- "srcdist" "Sources for everything but DES (optional - ${SRCSIZE})" OFF \
- "secrdist" "DES encryption code (and sources) (optional - ${SECRSIZE})" OFF \
- "compat1xdist" "FreeBSD 1.x binary compatability (optional - ${COMPATSIZE})" OFF \
- "XFree86-3.1" "The XFree86 3.1 distribution (optional - ${X11SIZE})" OFF \
- 2> ${TMP}/menu.tmp.$$
- RETVAL=$?
- MEDIA_DISTRIBUTIONS=`cat ${TMP}/menu.tmp.$$`
- rm -f ${TMP}/menu.tmp.$$
- if ! handle_rval ${RETVAL}; then return 1; fi
- if [ "${MEDIA_DISTRIBUTIONS}" = "?diskfree" ]; then
- if df -k > ${TMP}/df.out; then
- dialog --title "How much free space do I have?" \
- --textbox ${TMP}/df.out 15 76
- else
- error "Couldn't get disk usage information! :-("
- fi
- MEDIA_DISTRIBUTIONS=""
- fi
- done
-}
-
-media_get_possible_subdir()
-{
- if [ -f ${MNT}/${MEDIA_DISTRIBUTION}/extract.sh ]; then return; fi
- DEFAULT_VALUE="${DISTRIB_SUBDIR}"
- TITLE="Distribution Subdirectory"
- if input \
-"If the distributions are in a subdirectory of the mount point,
-please enter it here (no leading slash - it should be relative
-to the mount point). The directory you enter should be the
-*parent* directory of any distribution subdirectories."; then
- if [ "${ANSWER}" != "" ]; then
- MEDIA_DEVICE=${MEDIA_DEVICE}/${ANSWER}
- DISTRIB_SUBDIR=${ANSWER}
- fi
- else
- return 1
- fi
-}
-
-# Get values into $MEDIA_TYPE and $MEDIA_DEVICE. Call network initialization
-# if necessary.
-media_chose()
-{
- while [ "${MEDIA_DEVICE}" = "" ]; do
-
- dialog --title "Installation From" \
---menu \
-"Before installing a distribution, you need to chose and/or configure\n\
-a method of installation. Please pick from one of the following options.\n\
-If none of the listed options works for you, then your best bet may be to\n\
-simply press ESC twice to get a subshell and proceed manually on your own.\n\
-If you are already finished with the installation process, select cancel\n\
-to proceed." -1 -1 7 \
- "?Kern" "Please show me the kernel boot messages again!" \
- "Tape" "Load distribution from SCSI, QIC-02 or floppy tape" \
- "CDROM" "Load distribution from SCSI or Mitsumi CDROM" \
- "DOS" "Load from DOS floppies or a DOS hard disk partition" \
- "FTP" "Load distribution using FTP" \
- "UFS" "Load the distribution from existing UFS partition" \
- "NFS" "Load the distribution over NFS" 2> ${TMP}/menu.tmp.$$
- RETVAL=$?
- CHOICE=`cat ${TMP}/menu.tmp.$$`
- rm -f ${TMP}/menu.tmp.$$
- if ! handle_rval ${RETVAL}; then return 1; fi
-
- case ${CHOICE} in
- ?Kern)
- if dmesg > ${TMP}/dmesg.out; then
- dialog --title "Kernel boot message output" \
- --textbox ${TMP}/dmesg.out 22 76
- else
- error "Couldn't get dmesg information! :-("
- fi
- ;;
-
- Tape)
- dialog --title "Choose Tape Type" --menu \
-"Which type of tape drive do you have attached to your \n\
-system? FreeBSD supports the following types:\n" -1 -1 3 \
- "SCSI" "SCSI tape drive attached to supported SCSI controller" \
- "QIC-02" "QIC-02 tape drive (Colorado Jumbo, etc)" \
- "floppy" "Floppy tape drive (QIC-40/QIC-80)" 2> ${TMP}/menu.tmp.$$
- RETVAL=$?
- CHOICE=`cat ${TMP}/menu.tmp.$$`
- rm -f ${TMP}/menu.tmp.$$
- if ! handle_rval ${RETVAL}; then continue; fi
- MEDIA_TYPE=tape;
- case ${CHOICE} in
- SCSI)
- DEFAULT_VALUE="/dev/rst0"
- TITLE="SCSI Tape Device"
- if input \
-"If you only have one tape drive, simply press return - the
-default value should be correct. Otherwise, enter the
-correct value and press return."; then
- MEDIA_DEVICE=${ANSWER}
- fi
- ;;
-
- QIC-02)
- DEFAULT_VALUE="/dev/rwt0"
- TITLE="QIC-02 Tape Device"
- if input \
-"If you only have one tape drive, simply press return - the
-default value should be correct. Otherwise, enter the
-correct value and press return."; then
- MEDIA_DEVICE=${ANSWER}
- fi
- ;;
-
- floppy)
- MEDIA_DEVICE=ftape
- ;;
- esac
- ;;
-
- CDROM)
- dialog --title "Choose CDROM Type" --menu \
-"Which type of CDROM drive do you have attached to your \n\
-system? FreeBSD supports the following types:\n" -1 -1 2 \
- "SCSI" "SCSI CDROM drive attached to supported SCSI controller" \
- "Mitsumi" "Mitsumi CDROM drive" \
- 2> ${TMP}/menu.tmp.$$
- RETVAL=$?
- CHOICE=`cat ${TMP}/menu.tmp.$$`
- rm -f ${TMP}/menu.tmp.$$
- if ! handle_rval ${RETVAL}; then continue; fi
- MEDIA_TYPE=cdrom;
- case ${CHOICE} in
- SCSI)
- MEDIA_DEVICE=/dev/cd0a
- ;;
-
- Mitsumi)
- MEDIA_DEVICE=/dev/mcd0a
- ;;
- esac
- umount ${MNT} > /dev/null 2>&1
- if ! mount_cd9660 ${MEDIA_DEVICE} ${MNT} > /dev/ttyv1 2>&1; then
- error "Unable to mount ${MEDIA_DEVICE} on ${MNT}"
- MEDIA_DEVICE=""
- else
- MEDIA_DEVICE=${MNT}
- media_get_possible_subdir
- return 0
- fi
- ;;
-
- DOS)
- DEFAULT_VALUE="/dev/fd0"
- if input \
-"Please specify the device pointing at your DOS partition or
-floppy media. For a hard disk, this might be something like
-/dev/wd0h or /dev/sd0h (as identified in the disklabel editor).
-For the "A" floppy drive, it's /dev/fd0, for the "B" floppy
-drive it's /dev/fd1\n"; then
- MEDIA_DEVICE=${ANSWER}
- if echo ${MEDIA_DEVICE} | grep -q -v fd; then
- umount ${MNT} > /dev/null 2>&1
- if ! mount_msdos ${MEDIA_DEVICE} ${MNT} > /dev/ttyv1 2>&1; then
- error "Unable to mount ${MEDIA_DEVICE}"
- MEDIA_DEVICE=""
- else
- MEDIA_TYPE=doshd
- MEDIA_DEVICE=${MNT}
- media_get_possible_subdir
- return 0
- fi
- else
- MEDIA_TYPE=dosfd
- return 0
- fi
- fi
- ;;
-
- FTP)
- if ! network_setup; then continue; fi
- if media_select_ftp_site; then
- MEDIA_TYPE=ftp
- MEDIA_DEVICE=${FTP_PATH}
- return 0
- fi
- ;;
-
- NFS)
- if ! network_setup; then continue; fi
- TITLE="NFS Installation Information"
- DEFAULT_VALUE="${NFS_PATH}"
- if ! input \
-"Please specify a machine and directory mount point for the
-distribution you wish to load. This must be in machine:dir
-format (e.g. zooey:/a/FreeBSD/${DISTNAME}). The remote
-directory *must* be be exported to your machine (or globally)
-for this to work!\n"; then continue; fi
- NFS_PATH=${ANSWER}
-
- DEFAULT_VALUE="${NFS_OPTIONS}"
- if input \
-"Do you wish to specify any options to NFS? If you're installing
-from a Sun 4.1.x system, you may wish to specify \`-o resvport' to send
-NFS requests over a privileged port (use this if you get nasty
-\`\`credential too weak'' errors from the server). When using a slow
-ethernet card or network link, \`-o -r=1024,-w=1024' may also prove helpful.
-Options, if any, should be separated by commas."; then
- if [ "${ANSWER}" != "" ]; then
- NFS_OPTIONS="${ANSWER}"
- fi
- fi
- MEDIA_TYPE=nfs
- umount ${MNT} > /dev/null 2>&1
- if ! mount_nfs ${NFS_OPTIONS} ${NFS_PATH} ${MNT} > /dev/ttyv1 2>&1; then
- error "Unable to mount ${NFS_PATH}"
- else
- message "${NFS_PATH} mounted successfully"
- MEDIA_DEVICE=${MNT}
- media_get_possible_subdir
- return 0
- fi
- ;;
-
- UFS)
- dialog --title "User Intervention Requested" --msgbox "
-Please mount the filesystem you wish to use somewhere convenient and
-exit the shell when you're through. I'll ask you for the location
-of the distribution's parent directory when we come back." -1 -1
- dialog --clear
- /stand/sh
- TITLE="Please enter directory"
- DEFAULT_VALUE="${MNT}"
- if input "Ok, now give me the full pathname of the parent directorys for the distribution(s)."; then
- MEDIA_TYPE=ufs
- MEDIA_DEVICE=${ANSWER}
- return 0
- fi
- ;;
- esac
- done
-}
diff --git a/release/libdisk/change.c b/release/libdisk/change.c
index 57ccbfa..7d7f811 100644
--- a/release/libdisk/change.c
+++ b/release/libdisk/change.c
@@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
- * $Id: change.c,v 1.8.2.1 1995/06/05 02:24:20 jkh Exp $
+ * $Id: change.c,v 1.9.2.1 1995/09/20 10:43:01 jkh Exp $
*
*/
@@ -46,7 +46,7 @@ Set_Bios_Geom(struct disk *disk, u_long cyl, u_long hd, u_long sect)
}
void
-All_FreeBSD(struct disk *d)
+All_FreeBSD(struct disk *d, int force_all)
{
struct chunk *c;
@@ -57,5 +57,6 @@ All_FreeBSD(struct disk *d)
goto again;
}
c=d->chunks;
- Create_Chunk(d,c->offset,c->size,freebsd,0xa5,0);
+ Create_Chunk(d,c->offset,c->size,freebsd,0xa5,
+ force_all? CHUNK_FORCE_ALL: 0);
}
diff --git a/release/libdisk/create_chunk.c b/release/libdisk/create_chunk.c
index ad0c802..6c32a7d 100644
--- a/release/libdisk/create_chunk.c
+++ b/release/libdisk/create_chunk.c
@@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
- * $Id: create_chunk.c,v 1.20.2.1 1995/05/31 23:53:45 jkh Exp $
+ * $Id: create_chunk.c,v 1.21.2.6 1995/11/18 10:02:10 jkh Exp $
*
*/
@@ -15,6 +15,8 @@
#include <unistd.h>
#include <string.h>
#include <ctype.h>
+#include <fcntl.h>
+#include <stdarg.h>
#include <sys/types.h>
#include <sys/disklabel.h>
#include <sys/diskslice.h>
@@ -23,275 +25,335 @@
#include <err.h>
#include "libdisk.h"
-void
-Fixup_FreeBSD_Names(struct disk *d, struct chunk *c)
+/* Clone these two from sysinstall because we need our own copies
+ * due to link order problems with `crunch'. Feh!
+ */
+static int
+isDebug()
{
- struct chunk *c1, *c3;
- int j;
-
- if (!strcmp(c->name, "X")) return;
-
- /* reset all names to "X" */
- for (c1 = c->part; c1 ; c1 = c1->next) {
- c1->oname = c1->name;
- c1->name = malloc(12);
- if(!c1->name) err(1,"Malloc failed");
- strcpy(c1->name,"X");
- }
-
- /* Allocate the first swap-partition we find */
- for (c1 = c->part; c1 ; c1 = c1->next) {
- if (c1->type == unused) continue;
- if (c1->subtype != FS_SWAP) continue;
- sprintf(c1->name,"%s%c",c->name,SWAP_PART+'a');
- break;
- }
-
- /* Allocate the first root-partition we find */
- for (c1 = c->part; c1 ; c1 = c1->next) {
- if (c1->type == unused) continue;
- if (!(c1->flags & CHUNK_IS_ROOT)) continue;
- sprintf(c1->name,"%s%c",c->name,0+'a');
- break;
- }
+ static int debug = 0; /* Allow debugger to tweak it */
- /* Try to give them the same as they had before */
- for (c1 = c->part; c1 ; c1 = c1->next) {
- if (strcmp(c1->name,"X")) continue;
- for(c3 = c->part; c3 ; c3 = c3->next)
- if (c1 != c3 && !strcmp(c3->name, c1->oname)) {
- goto newname;
- }
- strcpy(c1->name,c1->oname);
- newname:
- }
+ return debug;
+}
+/* Write something to the debugging port */
+static void
+msgDebug(char *fmt, ...)
+{
+ va_list args;
+ char *dbg;
+ static int DebugFD = -1;
- /* Allocate the rest sequentially */
- for (c1 = c->part; c1 ; c1 = c1->next) {
- const char order[] = "efghabd";
- if (c1->type == unused) continue;
- if (strcmp("X",c1->name)) continue;
+ if (DebugFD == -1)
+ DebugFD = open("/dev/ttyv1", O_RDWR);
+ dbg = (char *)alloca(FILENAME_MAX);
+ strcpy(dbg, "DEBUG: ");
+ va_start(args, fmt);
+ vsnprintf((char *)(dbg + strlen(dbg)), FILENAME_MAX, fmt, args);
+ va_end(args);
+ write(DebugFD, dbg, strlen(dbg));
+}
- for(j=0;j<strlen(order);j++) {
- sprintf(c1->name,"%s%c",c->name,order[j]);
- for(c3 = c->part; c3 ; c3 = c3->next)
- if (c1 != c3 && !strcmp(c3->name, c1->name))
- goto match;
- break;
- match:
- strcpy(c1->name,"X");
- continue;
- }
- }
- for (c1 = c->part; c1 ; c1 = c1->next) {
- free(c1->oname);
- c1->oname = 0;
+void
+Fixup_FreeBSD_Names(struct disk *d, struct chunk *c)
+{
+ struct chunk *c1, *c3;
+ int j;
+
+ if (!strcmp(c->name, "X")) return;
+
+ /* reset all names to "X" */
+ for (c1 = c->part; c1 ; c1 = c1->next) {
+ c1->oname = c1->name;
+ c1->name = malloc(12);
+ if(!c1->name) err(1,"Malloc failed");
+ strcpy(c1->name,"X");
+ }
+
+ /* Allocate the first swap-partition we find */
+ for (c1 = c->part; c1 ; c1 = c1->next) {
+ if (c1->type == unused) continue;
+ if (c1->subtype != FS_SWAP) continue;
+ sprintf(c1->name,"%s%c",c->name,SWAP_PART+'a');
+ break;
+ }
+
+ /* Allocate the first root-partition we find */
+ for (c1 = c->part; c1 ; c1 = c1->next) {
+ if (c1->type == unused) continue;
+ if (!(c1->flags & CHUNK_IS_ROOT)) continue;
+ sprintf(c1->name,"%s%c",c->name,0+'a');
+ break;
+ }
+
+ /* Try to give them the same as they had before */
+ for (c1 = c->part; c1 ; c1 = c1->next) {
+ if (strcmp(c1->name,"X")) continue;
+ for(c3 = c->part; c3 ; c3 = c3->next)
+ if (c1 != c3 && !strcmp(c3->name, c1->oname)) {
+ goto newname;
+ }
+ strcpy(c1->name,c1->oname);
+ newname:
+ }
+
+
+ /* Allocate the rest sequentially */
+ for (c1 = c->part; c1 ; c1 = c1->next) {
+ const char order[] = "efghabd";
+ if (c1->type == unused) continue;
+ if (strcmp("X",c1->name)) continue;
+
+ for(j=0;j<strlen(order);j++) {
+ sprintf(c1->name,"%s%c",c->name,order[j]);
+ for(c3 = c->part; c3 ; c3 = c3->next)
+ if (c1 != c3 && !strcmp(c3->name, c1->name))
+ goto match;
+ break;
+ match:
+ strcpy(c1->name,"X");
+ continue;
}
+ }
+ for (c1 = c->part; c1 ; c1 = c1->next) {
+ free(c1->oname);
+ c1->oname = 0;
+ }
}
void
Fixup_Extended_Names(struct disk *d, struct chunk *c)
{
- struct chunk *c1;
- int j=5;
-
- for (c1 = c->part; c1 ; c1 = c1->next) {
- if (c1->type == unused) continue;
- free(c1->name);
- c1->name = malloc(12);
- if(!c1->name) err(1,"malloc failed");
- sprintf(c1->name,"%ss%d",d->chunks->name,j++);
- if (c1->type == freebsd)
- Fixup_FreeBSD_Names(d,c1);
- }
+ struct chunk *c1;
+ int j=5;
+
+ for (c1 = c->part; c1 ; c1 = c1->next) {
+ if (c1->type == unused) continue;
+ free(c1->name);
+ c1->name = malloc(12);
+ if(!c1->name) err(1,"malloc failed");
+ sprintf(c1->name,"%ss%d",d->chunks->name,j++);
+ if (c1->type == freebsd)
+ Fixup_FreeBSD_Names(d,c1);
+ }
}
void
Fixup_Names(struct disk *d)
{
- struct chunk *c1, *c2, *c3;
- int i,j;
-
- c1 = d->chunks;
- for(i=1,c2 = c1->part; c2 ; c2 = c2->next) {
- c2->flags &= ~CHUNK_BSD_COMPAT;
- if (c2->type == unused)
- continue;
- if (strcmp(c2->name,"X"))
- continue;
- c2->oname = malloc(12);
- if(!c2->oname) err(1,"malloc failed");
- for(j=1;j<=NDOSPART;j++) {
- sprintf(c2->oname,"%ss%d",c1->name,j);
- for(c3 = c1->part; c3 ; c3 = c3->next)
- if (c3 != c2 && !strcmp(c3->name, c2->oname))
- goto match;
- free(c2->name);
- c2->name = c2->oname;
- c2->oname = 0;
- break;
- match:
- continue;
- }
- if (c2->oname)
- free(c2->oname);
+ struct chunk *c1, *c2, *c3;
+ int i,j;
+
+ c1 = d->chunks;
+ for(i=1,c2 = c1->part; c2 ; c2 = c2->next) {
+ c2->flags &= ~CHUNK_BSD_COMPAT;
+ if (c2->type == unused)
+ continue;
+ if (strcmp(c2->name,"X"))
+ continue;
+ c2->oname = malloc(12);
+ if(!c2->oname) err(1,"malloc failed");
+ for(j=1;j<=NDOSPART;j++) {
+ sprintf(c2->oname,"%ss%d",c1->name,j);
+ for(c3 = c1->part; c3 ; c3 = c3->next)
+ if (c3 != c2 && !strcmp(c3->name, c2->oname))
+ goto match;
+ free(c2->name);
+ c2->name = c2->oname;
+ c2->oname = 0;
+ break;
+ match:
+ continue;
}
- for(c2 = c1->part; c2 ; c2 = c2->next) {
- if (c2->type == freebsd) {
- c2->flags |= CHUNK_BSD_COMPAT;
- break;
- }
- }
- for(c2 = c1->part; c2 ; c2 = c2->next) {
- if (c2->type == freebsd)
- Fixup_FreeBSD_Names(d,c2);
- if (c2->type == extended)
- Fixup_Extended_Names(d,c2);
+ if (c2->oname)
+ free(c2->oname);
+ }
+ for(c2 = c1->part; c2 ; c2 = c2->next) {
+ if (c2->type == freebsd) {
+ c2->flags |= CHUNK_BSD_COMPAT;
+ break;
}
+ }
+ for(c2 = c1->part; c2 ; c2 = c2->next) {
+ if (c2->type == freebsd)
+ Fixup_FreeBSD_Names(d,c2);
+ if (c2->type == extended)
+ Fixup_Extended_Names(d,c2);
+ }
}
int
Create_Chunk(struct disk *d, u_long offset, u_long size, chunk_e type, int subtype, u_long flags)
{
- int i;
- u_long l;
-
+ int i;
+ u_long l;
+
+ if(!(flags & CHUNK_FORCE_ALL))
+ {
/* Never use the first track */
if (!offset) {
- offset += d->bios_sect;
- size -= d->bios_sect;
+ offset += d->bios_sect;
+ size -= d->bios_sect;
}
-
+
/* Always end on cylinder boundary */
l = (offset+size) % (d->bios_sect * d->bios_hd);
size -= l;
-
- i = Add_Chunk(d,offset,size,"X",type,subtype,flags);
- Fixup_Names(d);
- return i;
+ }
+
+ i = Add_Chunk(d,offset,size,"X",type,subtype,flags);
+ Fixup_Names(d);
+ return i;
}
struct chunk *
Create_Chunk_DWIM(struct disk *d, struct chunk *parent , u_long size, chunk_e type, int subtype, u_long flags)
{
- int i;
- struct chunk *c1;
- u_long offset,edge;
-
- if (!parent)
- parent = d->chunks;
- for (c1=parent->part; c1 ; c1 = c1->next) {
- if (c1->type != unused) continue;
- if (c1->size < size) continue;
- offset = c1->offset;
- goto found;
- }
- warn("Not enough unused space");
+ int i;
+ struct chunk *c1;
+ u_long offset,edge;
+
+ if (!parent)
+ parent = d->chunks;
+ for (c1=parent->part; c1 ; c1 = c1->next) {
+ if (c1->type != unused) continue;
+ if (c1->size < size) continue;
+ offset = c1->offset;
+ goto found;
+ }
+ warn("Not enough unused space");
+ return 0;
+ found:
+ if (parent->flags & CHUNK_BAD144) {
+ edge = c1->end - d->bios_sect - 127;
+ if (offset > edge)
+ return 0;
+ if (offset + size > edge)
+ size = edge - offset + 1;
+ }
+ i = Add_Chunk(d,offset,size,"X",type,subtype,flags);
+ if (i) {
+ warn("Didn't cut it");
return 0;
- found:
- if (parent->flags & CHUNK_BAD144) {
- edge = c1->end - d->bios_sect - 127;
- if (offset > edge)
- return 0;
- if (offset + size > edge)
- size = edge - offset + 1;
- }
- i = Add_Chunk(d,offset,size,"X",type,subtype,flags);
- if (i) {
- warn("Didn't cut it");
- return 0;
- }
- Fixup_Names(d);
- for (c1=parent->part; c1 ; c1 = c1->next)
- if (c1->offset == offset)
- return c1;
- err(1,"Serious internal trouble");
+ }
+ Fixup_Names(d);
+ for (c1=parent->part; c1 ; c1 = c1->next)
+ if (c1->offset == offset)
+ return c1;
+ err(1,"Serious internal trouble");
}
int
MakeDev(struct chunk *c1, char *path)
{
- char *p = c1->name;
- u_long cmaj,bmaj,min,unit,part,slice;
- char buf[BUFSIZ],buf2[BUFSIZ];
+ char *p = c1->name;
+ u_long cmaj, bmaj, min, unit, part, slice;
+ char buf[BUFSIZ], buf2[BUFSIZ];
- *buf2 = '\0';
-
- if(!strcmp(p,"X"))
- return 0;
-
- if (p[0] == 'w' && p[1] == 'd') {
- bmaj = 0; cmaj = 3;
- } else if (p[0] == 's' && p[1] == 'd') {
- bmaj = 4; cmaj = 13;
- } else {
- return 0;
- }
- p += 2;
- if (!isdigit(*p))
- return 0;
- unit = *p - '0';
- p++;
- if (isdigit(*p)) {
- unit *= 10;
- unit = *p - '0';
- p++;
- }
- if (!*p) {
- slice = 1;
- part = 2;
- goto done;
- }
- if (*p != 's')
- return 0;
+ *buf2 = '\0';
+ if (isDebug())
+ msgDebug("MakeDev: Called with %s on path %s\n", p, path);
+ if (!strcmp(p, "X"))
+ return 0;
+
+ if (!strncmp(p, "wd", 2))
+ bmaj = 0, cmaj = 3;
+ else if (!strncmp(p, "sd", 2))
+ bmaj = 4, cmaj = 13;
+ else {
+ return 0;
+ }
+ p += 2;
+ if (!isdigit(*p)) {
+ msgDebug("MakeDev: Invalid disk unit passed: %s\n", p);
+ return 0;
+ }
+ unit = *p - '0';
+ p++;
+ if (!*p) {
+ slice = 1;
+ part = 2;
+ goto done;
+ }
+ else if (isdigit(*p)) {
+ unit *= 10;
+ unit += (*p - '0');
p++;
- if (!isdigit(*p))
- return 0;
- slice = *p - '0';
+ }
+ if (*p != 's') {
+ msgDebug("MakeDev: `%s' is not a valid slice delimiter\n", p);
+ return 0;
+ }
+ p++;
+ if (!isdigit(*p)) {
+ msgDebug("MakeDev: `%s' is an invalid slice number\n", p);
+ return 0;
+ }
+ slice = *p - '0';
+ p++;
+ if (isdigit(*p)) {
+ slice *= 10;
+ slice += (*p - '0');
p++;
- if (isdigit(*p)) {
- slice *= 10;
- slice = *p - '0';
- p++;
- }
- slice = slice+1;
- if (!*p) {
- part = 2;
- if(c1->type == freebsd)
- sprintf(buf2,"%sc",c1->name);
- goto done;
- }
- if (*p < 'a' || *p > 'h')
- return 0;
- part = *p - 'a';
- done:
- if (unit > 32)
- return 0;
- if (slice > 32)
- return 0;
- min = unit * 8 + 65536 * slice + part;
- sprintf(buf,"%s/r%s",path,c1->name);
- unlink(buf); mknod(buf,S_IFCHR|0640,makedev(cmaj,min));
- if(*buf2) {
- sprintf(buf,"%s/r%s",path,buf2);
- unlink(buf); mknod(buf,S_IFCHR|0640,makedev(cmaj,min));
+ }
+ slice = slice + 1;
+ if (!*p) {
+ part = 2;
+ if(c1->type == freebsd)
+ sprintf(buf2, "%sc", c1->name);
+ goto done;
+ }
+ if (*p < 'a' || *p > 'h') {
+ msgDebug("MakeDev: `%s' is not a valid partition name.\n", p);
+ return 0;
+ }
+ part = *p - 'a';
+ done:
+ if (isDebug())
+ msgDebug("MakeDev: Unit %d, Slice %d, Part %d\n", unit, slice, part);
+ if (unit > 32)
+ return 0;
+ if (slice > 32)
+ return 0;
+ min = unit * 8 + 65536 * slice + part;
+ sprintf(buf, "%s/r%s", path, c1->name);
+ unlink(buf);
+ if (mknod(buf, S_IFCHR|0640, makedev(cmaj,min)) == -1) {
+ msgDebug("mknod of %s returned failure status!\n", buf);
+ return 0;
+ }
+ if (*buf2) {
+ sprintf(buf, "%s/r%s", path, buf2);
+ unlink(buf);
+ if (mknod(buf, S_IFCHR|0640, makedev(cmaj,min)) == -1) {
+ msgDebug("mknod of %s returned failure status!\n", buf);
+ return 0;
}
- sprintf(buf,"%s/%s",path,c1->name);
- unlink(buf); mknod(buf,S_IFBLK|0640,makedev(bmaj,min));
- return 1;
+ }
+ sprintf(buf, "%s/%s", path, c1->name);
+ unlink(buf);
+ if (mknod(buf, S_IFBLK|0640, makedev(bmaj,min)) == -1) {
+ msgDebug("mknod of %s returned failure status!\n", buf);
+ return 0;
+ }
+ return 1;
}
-void
-MakeDevChunk(struct chunk *c1,char *path)
+int
+MakeDevChunk(struct chunk *c1, char *path)
{
- MakeDev(c1,path);
- if (c1->next) MakeDevChunk(c1->next,path);
- if (c1->part) MakeDevChunk(c1->part,path);
+ int i;
+
+ i = MakeDev(c1, path);
+ if (c1->next)
+ MakeDevChunk(c1->next, path);
+ if (c1->part)
+ MakeDevChunk(c1->part, path);
+ return i;
}
-void
-MakeDevDisk(struct disk *d,char *path)
+int
+MakeDevDisk(struct disk *d, char *path)
{
- MakeDevChunk(d->chunks,path);
+ return MakeDevChunk(d->chunks, path);
}
diff --git a/release/libdisk/libdisk.h b/release/libdisk/libdisk.h
index e7d6bd3..e277f87 100644
--- a/release/libdisk/libdisk.h
+++ b/release/libdisk/libdisk.h
@@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
- * $Id: libdisk.h,v 1.18.2.2 1995/06/05 02:24:32 jkh Exp $
+ * $Id: libdisk.h,v 1.19.2.2 1995/10/13 08:19:12 jkh Exp $
*
*/
@@ -74,6 +74,10 @@ struct chunk {
/* This 'part' is a rootfs, allocate 'a' */
# define CHUNK_ACTIVE 32
/* This is the active slice in the MBR */
+# define CHUNK_FORCE_ALL 64
+ /* Force a dedicated disk for FreeBSD, bypassing
+ * all BIOS geometry considerations
+ */
void (*private_free)(void*);
void *(*private_clone)(void*);
@@ -138,8 +142,10 @@ Create_Chunk(struct disk *disk, u_long offset, u_long size, chunk_e type, int su
*/
void
-All_FreeBSD(struct disk *d);
- /* Make one FreeBSD chunk covering the entire disk
+All_FreeBSD(struct disk *d, int force_all);
+ /* Make one FreeBSD chunk covering the entire disk;
+ * if force_all is set, bypass all BIOS geometry
+ * considerations.
*/
char *
@@ -211,7 +217,10 @@ Create_Chunk_DWIM(struct disk *d, struct chunk *parent , u_long size, chunk_e ty
* enough is used.
*/
-void
+int
+MakeDev(struct chunk *c, char *path);
+
+int
MakeDevDisk(struct disk *d,char *path);
/* Make device nodes for all chunks on this disk */
diff --git a/release/libdisk/tst01.c b/release/libdisk/tst01.c
index 2793778..76e479b 100644
--- a/release/libdisk/tst01.c
+++ b/release/libdisk/tst01.c
@@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
- * $Id: tst01.c,v 1.14.2.1 1995/06/05 02:24:35 jkh Exp $
+ * $Id: tst01.c,v 1.15.2.1 1995/09/20 10:43:04 jkh Exp $
*
*/
@@ -189,7 +189,11 @@ main(int argc, char **argv)
continue;
}
if (!strcasecmp(*cmds,"allfreebsd")) {
- All_FreeBSD(d);
+ All_FreeBSD(d, 0);
+ continue;
+ }
+ if (!strcasecmp(*cmds,"dedicate")) {
+ All_FreeBSD(d, 1);
continue;
}
if (!strcasecmp(*cmds,"bios") && ncmd == 4) {
@@ -280,6 +284,7 @@ main(int argc, char **argv)
printf("\007ERROR\n");
printf("CMDS:\n");
printf("\tallfreebsd\n");
+ printf("\tdedicate\n");
printf("\tbios cyl hd sect\n");
printf("\tboot\n");
printf("\tbteasy17\n");
diff --git a/release/libdisk/write_disk.c b/release/libdisk/write_disk.c
index e745917..00b2946 100644
--- a/release/libdisk/write_disk.c
+++ b/release/libdisk/write_disk.c
@@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
- * $Id: write_disk.c,v 1.14 1995/06/11 19:29:38 rgrimes Exp $
+ * $Id: write_disk.c,v 1.15 1995/08/26 04:57:03 davidg Exp $
*
*/
@@ -79,11 +79,11 @@ Write_FreeBSD(int fd, struct disk *new, struct disk *old, struct chunk *c1)
dl->d_secsize = 512;
dl->d_secperunit = new->chunks->size;
#if 0
- dl->d_secpercyl = new->real_cyl ? new->real_cyl : new->bios_cyl;
+ dl->d_ncylinders = new->real_cyl ? new->real_cyl : new->bios_cyl;
dl->d_ntracks = new->real_hd ? new->real_hd : new->bios_hd;
dl->d_nsectors = new->real_sect ? new->real_sect : new->bios_sect;
#else
- dl->d_secpercyl = new->bios_cyl;
+ dl->d_ncylinders = new->bios_cyl;
dl->d_ntracks = new->bios_hd;
dl->d_nsectors = new->bios_sect;
#endif
diff --git a/release/miscfuncs.sh b/release/miscfuncs.sh
deleted file mode 100644
index c2a36c3..0000000
--- a/release/miscfuncs.sh
+++ /dev/null
@@ -1,140 +0,0 @@
-#!/stand/sh
-#
-# miscfuncs - miscellaneous functions for the other distribution scripts.
-#
-# Written: November 15th, 1994
-# Copyright (C) 1994 by Jordan K. Hubbard
-#
-# Permission to copy or use this software for any purpose is granted
-# provided that this message stay intact, and at this location (e.g. no
-# putting your name on top after doing something trivial like reindenting
-# it, just to make it look like you wrote it!).
-#
-# $Id: miscfuncs.sh,v 1.13 1994/12/23 05:11:18 jkh Exp $
-
-if [ "${_MISCFUNCS_SH_LOADED_}" = "yes" ]; then
- return 0
-else
- _MISCFUNCS_SH_LOADED_=yes
-fi
-
-PATH=/usr/bin:/usr/sbin:/bin:/sbin:/stand
-export PATH
-
-# Keep this current with the distribution!
-DISTNAME="2.0-950112-SNAP"
-
-# Express or Custom install?
-INSTALL_TYPE=""
-
-# Flagrant guesses for now. These need to be hand-edited or, much better yet,
-# automatically done as part of the release process. When that's the case,
-# the hardwired constants will be replaced with tokens that get sed'd for
-# the real sizes.
-#
-BINSIZE="40MB"
-GAMESIZE="8MB"
-MANSIZE="8MB"
-PROFSIZE="4MB"
-DICTSIZE="2MB"
-SRCSIZE="120MB"
-SECRSIZE="4MB"
-COMPATSIZE="3MB"
-X11SIZE="50MB"
-
-# Paths
-ETC="/etc"
-MNT="/mnt"
-HOME=/; export HOME
-TMP=/tmp
-
-# Commands and flags
-FT_CMD="ft"
-TAR_CMD="tar"
-TAR_FLAGS="--unlink -xvf"
-IFCONFIG_CMD="ifconfig"
-ROUTE_CMD="route"
-ROUTE_FLAGS="add default"
-HOSTNAME_CMD="hostname"
-SLATTACH_CMD="slattach"
-SLATTACH_FLAGS="-l -a -s"
-PPPD_CMD="pppd"
-PPPD_FLAGS="crtscts defaultroute -ip -mn netmask $netmask"
-
-interrupt()
-{
- dialog --clear --title "User Interrupt Requested" \
- --msgbox "\n ** Aborting the installation ** \n" -1 -1
- exit 0;
-}
-
-# Handle the return value from a dialog, doing some pre-processing
-# so that each client doesn't have to.
-handle_rval()
-{
- case $1 in
- 0)
- return 0
- ;;
- 255)
- PS1="subshell# " /stand/sh
- ;;
- *)
- return 1
- ;;
- esac
-}
-
-# stick a progress message out on the other vty
-progress()
-{
- echo "Progress <$*>" > /dev/ttyv1
-}
-
-# A simple user-confirmation dialog.
-confirm()
-{
- dialog --title "User Confirmation" --msgbox "$*" -1 -1
-}
-
-# A simple message box dialog.
-message()
-{
- progress $*
- dialog --title "Progress" --infobox "$*" -1 -1
-}
-
-# A simple error dialog.
-error()
-{
- echo "ERROR <$*>" > /dev/ttyv1
- dialog --title "Error!" --msgbox "$*" -1 -1
-}
-
-# Something isn't supported yet! :-(
-not_supported()
-{
- echo "<Feature not supported>" > /dev/ttyv1
- dialog --title "Sorry!" --msgbox \
-"This feature is not supported in the current version of the
-installation tools. Barring some sort of fatal accident, we do
-expect it to be in a later release. Please press RETURN to go on." -1 -1
-}
-
-# Get a string from the user
-input()
-{
- TITLE=${TITLE-"User Input Required"}
- dialog --title "${TITLE}" \
- --inputbox "$*" -1 -1 "${DEFAULT_VALUE}" 2> ${TMP}/inputbox.tmp.$$
- if ! handle_rval $?; then rm -f ${TMP}/inputbox.tmp.$$; return 1; fi
- ANSWER=`cat ${TMP}/inputbox.tmp.$$`
- rm -f ${TMP}/inputbox.tmp.$$
-}
-
-# Ask a networking question
-network_dialog()
-{
- TITLE="Network Configuration"
- if ! input "$*"; then return 1; fi
-}
diff --git a/release/mkchecksums.sh b/release/mkchecksums.sh
deleted file mode 100644
index 38f941f..0000000
--- a/release/mkchecksums.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-#
-# mkchecksums.sh - generate interactive checksum-checking script.
-# Jordan Hubbard
-#
-# This script generates a cksum.sh script from a set of tarballs
-# and should not be run by anyone but the release coordinator (there
-# wouldn't be much point).
-#
-# Jordan
-# $Id: mkchecksums.sh,v 1.1 1994/11/17 15:20:04 jkh Exp $
-#
-
-# Remove any previous attempts.
-rm -rf CKSUMS do_cksum.sh
-
-# First generate the CKSUMS file for the benefit of those who wish to
-# use it in some other way. If we find out that folks aren't even using
-# it, we should consider eliminating it at some point. The interactive
-# stuff makes it somewhat superfluous.
-cksum * > CKSUMS
-
-# Now generate a script for actually verifying the checksums.
-awk 'BEGIN {print "rval=0"} { printf("if [ \"\`cksum %s%s%s\`\" != \"%s %s %s\" ]; then dialog --title Error --infobox \"Checksum error detected on %s!\" -1 -1; rval=1; fi\n", "\047", $3, "\047", $1, $2, $3, $3);} END {print "exit $rval"}' < CKSUMS > do_cksum.sh
-chmod +x do_cksum.sh
diff --git a/release/mkextract.sh b/release/mkextract.sh
deleted file mode 100644
index 1256d5a..0000000
--- a/release/mkextract.sh
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/bin/sh
-#
-# mkextract - generate extract.sh
-# Jordan Hubbard
-#
-# This script generates the extract.sh script from the current tarballs
-# and should not be run by anyone but the release coordinator (there wouldn't
-# be much point).
-#
-# Jordan
-
-BASEDIR=/usr/X11R6
-TARGETS=XFree86-3.1*
-echo -n "Creating extract.sh.."
-cat > extract.sh << DO_THE_FUNKY_CHICKEN
-#!/bin/sh
-#
-# Don't edit me - I'm auto-generated by mkextract.sh!
-#
-if [ ! -f /usr/bin/tar ]; then
- dialog --title "Error!" --msgbox "You must install the bindist before this distribution!" 6 72
- exit 0
-fi
-
-dialog --title "XFree86 3.1 Installation" \
- --msgbox "Welcome to the XFree86 3.1 installation! You'll be asked
-a series of annoying yes/no questions for each component of the
-XFree86 distribution you wish to install. If you're not sure
-whether or not you need some component, simply answer yes and
-delete it later if it turns out you don't need it. This is
-a little rough, yes, but I'm working on it!
-
-Comments on the XFree86 distribution to David Dawes
-<dawes@FreeBSD.org>
-
-Comments on this install to Jordan Hubbard
-<jkh@FreeBSD.org>
-
-Thanks!" 18 72
-dialog --title "Read This First" --textbox README.FreeBSD 22 76
-DO_THE_FUNKY_CHICKEN
-
-for i in $TARGETS; do
- abbrevname=`echo $i | sed -e 's/XFree86-3.1-//' -e 's/.tar.gz//'`
- echo "if dialog --title \"Install Request\" --yesno \"Do you wish to install the ${abbrevname} distribution?\" 6 72; then dialog --title \"Progress\" --infobox \"Installing $i\" 6 72; tar --unlink -xvzf $i -C /usr > /dev/ttyv1 2>&1 ; fi" >> extract.sh
-done
-
-cat >> extract.sh << OH_YEAH_BABY_GET_DOWN
-dialog --title "Finished!" \
- --infobox "
-You're now done with the installation of XFree86 3.1.
-Now would probably be a very good time to look in ${BASEDIR}/lib/X11/doc
-for further information on what to do next. XFree86 3.1 is now
-installed in the ${BASEDIR} directory, unlike
-earlier releases. For backwards compatibility, you might consider
-a symlink to /usr/X386." 10 76
-OH_YEAH_BABY_GET_DOWN
-
-chmod 755 extract.sh
-echo " Done."
diff --git a/release/mkxf86extract.sh b/release/mkxf86extract.sh
deleted file mode 100644
index af3550f..0000000
--- a/release/mkxf86extract.sh
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/bin/sh
-#
-# mkextract - generate extract.sh
-# Jordan Hubbard
-#
-# This script generates the extract.sh script from the current tarballs
-# and should not be run by anyone but the release coordinator (there wouldn't
-# be much point).
-#
-# Jordan
-
-BASEDIR=/usr/X11R6
-TARGETS=XFree86-3.1*
-echo -n "Creating extract.sh.."
-cat > extract.sh << DO_THE_FUNKY_CHICKEN
-#!/bin/sh
-#
-# Don't edit me - I'm auto-generated by mkextract.sh!
-#
-if [ ! -f /usr/bin/tar ]; then
- dialog --title "Error!" --msgbox "You must install the bindist before this distribution!" -1 -1
- exit 0
-fi
-
-dialog --title "XFree86 3.1 Installation" \
- --msgbox "Welcome to the XFree86 3.1 installation! You'll be asked
-a series of annoying yes/no questions for each component of the
-XFree86 distribution you wish to install. If you're not sure
-whether or not you need some component, simply answer yes and
-delete it later if it turns out you don't need it. This is
-a little rough, yes, but I'm working on it!
-
-Comments on the XFree86 distribution to David Dawes
-<dawes@FreeBSD.org>
-
-Comments on this install to Jordan Hubbard
-<jkh@FreeBSD.org>
-
-Thanks!" -1 -1
-dialog --title "Read This First" --textbox README.FreeBSD 22 76
-DO_THE_FUNKY_CHICKEN
-
-for i in $TARGETS; do
- abbrevname=`echo $i | sed -e 's/XFree86-3.1-//' -e 's/.tar.gz//'`
- echo "if [ "${INSTALL_TYPE}" != "Express" ]; then if dialog --title \"Install Request\" --yesno \"Do you wish to install the ${abbrevname} distribution?\" -1 -1; then dialog --title \"Progress\" --infobox \"Installing $i\" -1 -1; tar --unlink -xzf $i -C /usr; fi; fi" >> extract.sh
-done
-
-cat >> extract.sh << OH_YEAH_BABY_GET_DOWN
-dialog --title "Finished!" \
- --infobox "
-You're now done with the installation of XFree86 3.1.
-Now would probably be a very good time to look in ${BASEDIR}/lib/X11/doc
-for further information on what to do next. XFree86 3.1 is now
-installed in the ${BASEDIR} directory, unlike
-earlier releases. For backwards compatibility, you might consider
-a symlink to /usr/X386." -1 -1
-OH_YEAH_BABY_GET_DOWN
-
-chmod 755 extract.sh
-touch -f .is_interactive
-echo " Done."
diff --git a/release/netinst.sh b/release/netinst.sh
deleted file mode 100644
index 41e0c90f..0000000
--- a/release/netinst.sh
+++ /dev/null
@@ -1,208 +0,0 @@
-#!/stand/sh
-#
-# netinst.sh - configure the user's network.
-#
-# Written: November 11th, 1994
-# Copyright (C) 1994 by Jordan K. Hubbard
-#
-# Permission to copy or use this software for any purpose is granted
-# provided that this message stay intact, and at this location (e.g. no
-# putting your name on top after doing something trivial like reindenting
-# it, just to make it look like you wrote it!).
-#
-# $Id: netinst.sh,v 1.16 1994/12/05 00:13:11 ache Exp $
-
-if [ "${_NETINST_SH_LOADED_}" = "yes" ]; then
- return 0
-else
- _NETINST_SH_LOADED_=yes
-fi
-
-# Grab the miscellaneous functions.
-. /stand/miscfuncs.sh
-
-network_set_defaults()
-{
- HOSTNAME=""
- DOMAIN=""
- NETMASK="0xffffff00"
- IPADDR="127.0.0.1"
- IFCONFIG_FLAGS=""
- REMOTE_HOSTIP=""
- REMOTE_IPADDR=""
- INTERFACE=""
- SERIAL_INTERFACE="/dev/cuaa0"
- SERIAL_SPEED="38400"
-}
-
-network_basic_setup()
-{
- HOSTNAME=""
- while [ "${HOSTNAME}" = "" ]; do
- DEFAULT_VALUE=""
- if ! network_dialog "What is the fully qualified name of this host?"; then return 1; fi
- if [ "${ANSWER}" = "" ]; then
- error "You must select a host name!"
- continue
- else
- HOSTNAME=${ANSWER}
- fi
- done
- echo ${HOSTNAME} > ${ETC}/myname
- ${HOSTNAME_CMD} ${HOSTNAME}
-
- DEFAULT_VALUE=`echo ${HOSTNAME} | sed -e 's/[^.]*\.//' | grep \.`
- if network_dialog "What is the domain name of this host (Internet, not YP/NIS)?"; then
- DOMAIN=${ANSWER}
- fi
-
- DEFAULT_VALUE=${IPADDR}
- if ! network_dialog "What is the IP address of this host?"; then return 1; fi
- IPADDR=${ANSWER}
- echo "${IPADDR} ${HOSTNAME} `echo ${HOSTNAME} | sed -e 's/\.${DOMAIN}//'`" >> ${ETC}/hosts
-}
-
-network_setup_ether()
-{
- dialog --title "Ethernet Interface Name" --menu \
- "Please select the type of ethernet interface you have:\n" -1 -1 8 \
- "ed0" "WD80x3, SMC, Novell NE[21]000 or 3C503 generic NIC at 0x280" \
- "ed1" "Same as above, but at address 0x300 and IRQ 5" \
- "ep0" "3COM 3C509 at address 0x300 and IRQ 10" \
- "de0" "DEC PCI ethernet adapter (or compatible)" \
- "ie0" "AT&T StarLan and EN100 family at 0x360 and IRQ 7" \
- "is0" "Isolan 4141-0 or Isolink 4110 at 0x280 and IRQ 7" \
- "le0" "DEC Etherworks ethernet adapter" \
- "ze0" "PCMCIA IBM or National card at 0x300 and IRQ 5" \
- 2> ${TMP}/menu.tmp.$$
-
- RETVAL=$?
- INTERFACE=`cat ${TMP}/menu.tmp.$$`
- rm -f ${TMP}/menu.tmp.$$
- if ! handle_rval ${RETVAL}; then return 1; fi
-}
-
-network_setup_remote()
-{
- DEFAULT_VALUE="${REMOTE_IPADDR}"
- if ! network_dialog "What is the IP number for the remote host?"; then
- return 1
- fi
- REMOTE_IPADDR=${ANSWER}
-}
-
-network_setup_serial()
-{
- network_setup_remote
- INTERFACE=$1
-
- DEFAULT_VALUE=${SERIAL_INTERFACE}
- if ! network_dialog "What serial port do you wish to use?"; then
- return 1
- fi
- SERIAL_INTERFACE=${ANSWER}
-
- DEFAULT_VALUE=${SERIAL_SPEED}
- if ! network_dialog "What speed is the serial connection?"; then
- return 1
- fi
- SERIAL_SPEED=${ANSWER}
-
- if dialog --title "Dial" --yesno \
- "Do you need to dial the phone or otherwise talk to the modem?" \
- -1 -1; then
- mkdir -p /var/log
- touch -f /var/log/aculog > /dev/null 2>&1
- chmod 666 /var/log/aculog > /dev/null 2>&1
- confirm \
-"You may now dialog with your modem and set up the connection.
-Be sure to disable DTR sensitivity (usually with AT&D0) or the
-modem may hang up when you exit 'cu'. Use ~. to exit cu and
-continue."
- dialog --clear
- # Grottyness to deal with a weird crunch bug.
- if [ ! -f /stand/cu ]; then ln /stand/tip /stand/cu; fi
- /stand/cu -l ${SERIAL_INTERFACE} -s ${SERIAL_SPEED}
- dialog --clear
- fi
-}
-
-network_setup_plip()
-{
- network_setup_remote
- INTERFACE=lp0
-}
-
-network_setup()
-{
- DONE=0
- while [ "${INTERFACE}" = "" ]; do
- dialog --title "Set up network interface" --menu \
- "Please select the type of network connection you have:\n" \
- -1 -1 3 \
- "Ether" "A supported ethernet card" \
- "SLIP" "A point-to-point SLIP (Serial Line IP) connection" \
- "PLIP" "A Parallel-Line IP setup (with standard laplink cable)" \
- 2> ${TMP}/menu.tmp.$$
-
- RETVAL=$?
- CHOICE=`cat ${TMP}/menu.tmp.$$`
- rm -f ${TMP}/menu.tmp.$$
- if ! handle_rval ${RETVAL}; then return 1; fi
- case ${CHOICE} in
- Ether) if ! network_setup_ether; then continue; fi ;;
- SLIP) if ! network_setup_serial sl0; then continue; fi ;;
- PLIP) if ! network_setup_plip; then continue; fi ;;
- esac
- if [ "${INTERFACE}" = "" ]; then continue; fi
-
- network_basic_setup
-
- DEFAULT_VALUE="${NETMASK}"
- if network_dialog "Please specify the netmask"; then
- if [ "${ANSWER}" != "" ]; then
- NETMASK=${ANSWER}
- fi
- fi
-
- DEFAULT_VALUE=""
- if network_dialog "Set extra flags to ${IFCONFIG_CMD}?"; then
- IFCONFIG_FLAGS=${ANSWER}
- fi
- echo "Progress <${IFCONFIG_CMD} ${INTERFACE} ${IPADDR} ${REMOTE_IPADDR} netmask ${NETMASK} ${IFCONFIG_FLAGS}>" >/dev/ttyv1
- if ! ${IFCONFIG_CMD} ${INTERFACE} ${IPADDR} ${REMOTE_IPADDR} netmask ${NETMASK} ${IFCONFIG_FLAGS} > /dev/ttyv1 2>&1 ; then
- error "Unable to configure interface ${INTERFACE}"
- IPADDR=""
- INTERFACE=""
- continue
- fi
- if [ "${INTERFACE}" = "sl0" ]; then
- DEFAULT_VALUE=${SLATTACH_FLAGS}
- if network_dialog "Set extra flags to ${SLATTACH_CMD}?"; then
- SLATTACH_FLAGS=${ANSWER}
- fi
- ${SLATTACH_CMD} ${SLATTACH_FLAGS} ${SERIAL_SPEED} ${SERIAL_INTERFACE}
- progress ${SLATTACH_CMD} ${SLATTACH_FLAGS} ${SERIAL_SPEED} ${SERIAL_INTERFACE}
- fi
- echo "${IPADDR} ${REMOTE_IPADDR} netmask ${NETMASK} ${IFCONFIG_FLAGS}" > ${ETC}/hostname.${INTERFACE}
- DEFAULT_VALUE=""
- if network_dialog "If you have a default gateway, enter its IP address"; then
- if [ "${ANSWER}" != "" ]; then
- GATEWAY=${ANSWER}
- ${ROUTE_CMD} ${ROUTE_FLAGS} ${GATEWAY} > /dev/ttyv1 2>&1
- progress ${ROUTE_CMD} ${ROUTE_FLAGS} ${GATEWAY}
- echo ${GATEWAY} > ${ETC}/defaultrouter
- fi
- fi
-
- DEFAULT_VALUE=""
- if network_dialog "If you have a name server, enter its IP address"; then
- if [ "${ANSWER}" != "" ]; then
- NAMESERVER=${ANSWER}
- echo "domain ${DOMAIN}" > ${ETC}/resolv.conf
- echo "nameserver ${NAMESERVER}" >> ${ETC}/resolv.conf
- fi
- fi
- done
- return 0
-}
diff --git a/release/pc98/boot_crunch.conf b/release/pc98/boot_crunch.conf
index e5a7ceb..bb0e7e6 100644
--- a/release/pc98/boot_crunch.conf
+++ b/release/pc98/boot_crunch.conf
@@ -1,10 +1,10 @@
-# $Id: boot_crunch.conf,v 1.19.2.1 1995/06/04 11:52:44 jkh Exp $
+# $Id: boot_crunch.conf,v 1.20.2.3 1995/10/05 08:58:19 jkh Exp $
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
progs sh find
-progs ft ppp
+progs pwd ft ppp
progs sysinstall newfs gzip cpio bad144 fsck ifconfig route slattach
progs mount_nfs
ln gzip gunzip
diff --git a/release/root_crunch.conf b/release/root_crunch.conf
index d1aaa56..15547ef 100644
--- a/release/root_crunch.conf
+++ b/release/root_crunch.conf
@@ -1,4 +1,4 @@
-# $Id: root_crunch.conf,v 1.4.2.2 1995/06/01 05:54:37 jkh Exp $
+# $Id: root_crunch.conf,v 1.5.2.3 1995/10/05 09:31:38 jkh Exp $
# first, we list the source dirs that our programs reside in. These are
# searched in order listed to find the dir containing each program.
@@ -13,8 +13,8 @@ srcdirs /usr/src/usr.sbin
# /bin stuff
-progs ls cat df pwd chmod cksum cp date dd echo ed expr grep hostname kill ln
-progs mkdir mt mv pwd rcp rm rmdir sleep stty sync test ft
+progs ls cat df ee chmod cksum cp date dd echo ed expr grep hostname kill ln
+progs mkdir mt mv rcp rm rmdir sleep stty sync test ft
ln test [
# /sbin stuff
@@ -32,4 +32,4 @@ progs tar ftp rsh sed telnet rlogin
# finally, we specify the libraries to link in with our binary
libs -lcrypt -ltelnet -lutil -ll -ledit
-libs -lgnuregex -lreadline -lcurses -ltermcap -lkvm
+libs -lgnuregex -lreadline -lncurses -lmytinfo -lkvm
diff --git a/release/sysinstall/Makefile b/release/sysinstall/Makefile
index 0f0b8fd..c2c3fee 100644
--- a/release/sysinstall/Makefile
+++ b/release/sysinstall/Makefile
@@ -4,14 +4,14 @@ CLEANFILES= makedevs.c rtermcap
.PATH: ${.CURDIR}/../disklabel ${.CURDIR}/../../usr.bin/cksum
-SRCS= attr.c cdrom.c command.c config.c decode.c devices.c disks.c dist.c \
- dmenu.c dos.c floppy.c ftp.c ftp_strat.c globals.c install.c label.c \
- main.c makedevs.c media.c menus.c misc.c msg.c network.c nfs.c system.c tape.c \
- tcpip.c termcap.c ufs.c variable.c wizard.c
+SRCS= anonFTP.c apache.c attr.c cdrom.c command.c config.c decode.c \
+ devices.c disks.c dist.c dmenu.c doc.c dos.c floppy.c ftp.c \
+ ftp_strat.c globals.c index.c install.c installFinal.c \
+ installPreconfig.c installUpgrade.c label.c lndir.c main.c \
+ makedevs.c media.c menus.c misc.c msg.c network.c nfs.c options.c \
+ package.c system.c tape.c tcpip.c termcap.c ufs.c variable.c wizard.c
-
-CFLAGS+= -Wall -I${.CURDIR}/../libdisk \
- -I${.CURDIR}/../../gnu/lib/libdialog
+CFLAGS+= -Wall -I${.CURDIR}/../libdisk -I${.CURDIR}/../../gnu/lib/libdialog
LDADD= -ldialog -lncurses -lmytinfo -lutil
.if exists(${.CURDIR}/../libdisk/obj)
@@ -55,4 +55,3 @@ testftp: ftp.c
cc -o testftp -I../libdisk -DSTANDALONE_FTP ftp.c
.include <bsd.prog.mk>
-
diff --git a/release/sysinstall/attr.c b/release/sysinstall/attr.c
index 9f3b246..bcf287a 100644
--- a/release/sysinstall/attr.c
+++ b/release/sysinstall/attr.c
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
- * $Id: attr.c,v 1.2.2.4 1995/06/06 00:44:51 jkh Exp $
+ * $Id: attr.c,v 1.3.2.7 1995/10/22 17:38:56 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -45,28 +45,35 @@
#include "sysinstall.h"
#include <ctype.h>
+#include <fcntl.h>
#include <sys/errno.h>
-static int num_attribs;
int
-attr_parse(Attribs **attr, char *file)
+attr_parse_file(Attribs *attr, char *file)
+{
+ int fd;
+
+ if ((fd = open(file, O_RDONLY)) == -1) {
+ dialog_clear();
+ msgConfirm("Cannot open the information file `%s': %s (%d)", file, strerror(errno), errno);
+ return RET_FAIL;
+ }
+ return attr_parse(attr, fd);
+}
+
+int
+attr_parse(Attribs *attr, int fd)
{
char hold_n[MAX_NAME+1];
char hold_v[MAX_VALUE+1];
- int n, v, ch = 0;
+ int n, v;
enum { LOOK, COMMENT, NAME, VALUE, COMMIT } state;
- FILE *fp;
- static int lno;
+ int lno, num_attribs;
+ char ch;
- num_attribs = n = v = lno = 0;
+ n = v = lno = num_attribs = 0;
state = LOOK;
-
- if ((fp = fopen(file, "r")) == NULL) {
- msgConfirm("Cannot open the information file `%s': %s (%d)", file, strerror(errno), errno);
- return 0;
- }
-
- while (state == COMMIT || (ch = fgetc(fp)) != EOF) {
+ while (state == COMMIT || (read(fd, &ch, 1) == 1)) {
/* Count lines */
if (ch == '\n')
++lno;
@@ -79,12 +86,14 @@ attr_parse(Attribs **attr, char *file)
state = COMMENT;
continue;
}
- else if (isalpha(ch)) {
+ else if (isalpha(ch) || ch == '_') {
hold_n[n++] = ch;
state = NAME;
}
- else
- msgFatal("Invalid character '%c' at line %d\n", ch, lno);
+ else {
+ msgDebug("Parse config: Invalid character '%c' at line %d", ch, lno);
+ state = COMMENT; /* Ignore the rest of the line */
+ }
break;
case COMMENT:
@@ -113,14 +122,10 @@ attr_parse(Attribs **attr, char *file)
continue;
else if (ch == '{') {
/* multiline value */
- while ((ch = fgetc(fp)) != '}') {
- if (ch == EOF)
- msgFatal("Unexpected EOF on line %d", lno);
- else {
- if (v == MAX_VALUE)
- msgFatal("Value length overflow at line %d", lno);
- hold_v[v++] = ch;
- }
+ while (read(fd, &ch, 1) == 1 && ch != '}') {
+ if (v == MAX_VALUE)
+ msgFatal("Value length overflow at line %d", lno);
+ hold_v[v++] = ch;
}
hold_v[v] = '\0';
state = COMMIT;
@@ -138,41 +143,45 @@ attr_parse(Attribs **attr, char *file)
break;
case COMMIT:
- (*attr)[num_attribs].name = strdup(hold_n);
- (*attr)[num_attribs++].value = strdup(hold_v);
+ strcpy(attr[num_attribs].name, hold_n);
+ strcpy(attr[num_attribs].value, hold_v);
state = LOOK;
v = n = 0;
+ ++num_attribs;
break;
-
+
default:
- msgFatal("Unknown state at line %d??\n", lno);
+ msgFatal("Unknown state at line %d??", lno);
}
}
- fclose(fp);
- return 1;
+ attr[num_attribs].name[0] = '\0'; /* end marker */
+ attr[num_attribs].value[0] = '\0'; /* end marker */
+ if (isDebug())
+ msgDebug("Finished parsing %d attributes.\n", num_attribs);
+
+ return RET_SUCCESS;
}
-const char *
+char *
attr_match(Attribs *attr, char *name)
{
- int n = 0;
+ int n;
if (isDebug())
msgDebug("Trying to match attribute `%s'\n", name);
- while ((n < num_attribs) && (strcasecmp(attr[n].name, name) != 0)) {
+ for (n = 0; attr[n].name[0] && strcasecmp(attr[n].name, name) != 0; n++) {
if (isDebug())
msgDebug("Skipping attribute %u\n", n);
- n++;
}
if (isDebug())
msgDebug("Stopped on attribute %u\n", n);
- if (n < num_attribs) {
+ if (attr[n].name[0]) {
if (isDebug())
msgDebug("Returning `%s'\n", attr[n].value);
- return((const char *) attr[n].value);
+ return(attr[n].value);
}
return NULL;
diff --git a/release/sysinstall/cdrom.c b/release/sysinstall/cdrom.c
index 03cef9f..843c2e2 100644
--- a/release/sysinstall/cdrom.c
+++ b/release/sysinstall/cdrom.c
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
- * $Id: cdrom.c,v 1.7.2.2 1995/07/21 11:45:32 rgrimes Exp $
+ * $Id: cdrom.c,v 1.8 1995/09/18 16:52:20 peter Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -58,13 +58,16 @@
#include <sys/mount.h>
#undef CD9660
-static Boolean cdromMounted;
+/* This isn't static, like the others, since it's often useful to know whether or not we have a CDROM
+ available in some of the other installation screens. */
+Boolean cdromMounted;
Boolean
mediaInitCDROM(Device *dev)
{
struct iso_args args;
struct stat sb;
+ char specialrel[80];
if (!RunningAsInit || cdromMounted)
return TRUE;
@@ -77,38 +80,51 @@ mediaInitCDROM(Device *dev)
args.flags = 0;
if (mount(MOUNT_CD9660, "/cdrom", MNT_RDONLY, (caddr_t) &args) == -1) {
- msgConfirm("Error mounting %s on /cdrom: %s (%u)\n", dev, strerror(errno), errno);
+ dialog_clear();
+ msgConfirm("Error mounting %s on /cdrom: %s (%u)", dev->devname, strerror(errno), errno);
return FALSE;
}
-
/*
- * Do a very simple check to see if this looks roughly like a 2.0.5 CDROM
+ * Do a very simple check to see if this looks roughly like a FreeBSD CDROM
* Unfortunately FreeBSD won't let us read the ``label'' AFAIK, which is one
* sure way of telling the disc version :-(
*/
- if (stat("/cdrom/dists", &sb)) {
+ snprintf(specialrel, 80, "/cdrom/%s/dists", variable_get(VAR_RELNAME));
+ if (stat("/cdrom/dists", &sb) && stat(specialrel, &sb)) {
if (errno == ENOENT) {
- msgConfirm("Couldn't locate the directory `dists' on the CD.\nIs this a FreeBSD CDROM?\n");
+ dialog_clear();
+ msgConfirm("Couldn't locate the directory `dists' anywhere on the CD.\n"
+ "Is this a FreeBSD CDROM? Is the release version set properly\n"
+ "in the Options editor?");
return FALSE;
}
else {
- msgConfirm("Couldn't stat directory %s: %s", "/cdrom/dists", strerror(errno));
+ dialog_clear();
+ msgConfirm("Error trying to stat the CDROM's dists directory: %s", strerror(errno));
return FALSE;
}
}
cdromMounted = TRUE;
+ msgDebug("Mounted CDROM device %s on /cdrom\n", dev->devname);
return TRUE;
}
int
-mediaGetCDROM(Device *dev, char *file, Attribs *dist_attrs)
+mediaGetCDROM(Device *dev, char *file, Boolean tentative)
{
- char buf[PATH_MAX];
+ char buf[PATH_MAX];
+ msgDebug("Request for %s from CDROM\n", file);
snprintf(buf, PATH_MAX, "/cdrom/%s", file);
- if (!access(buf,R_OK))
+ if (file_readable(buf))
return open(buf, O_RDONLY);
snprintf(buf, PATH_MAX, "/cdrom/dists/%s", file);
+ if (file_readable(buf))
+ return open(buf, O_RDONLY);
+ snprintf(buf, PATH_MAX, "/cdrom/%s/%s", variable_get(VAR_RELNAME), file);
+ if (file_readable(buf))
+ return open(buf, O_RDONLY);
+ snprintf(buf, PATH_MAX, "/cdrom/%s/dists/%s", variable_get(VAR_RELNAME), file);
return open(buf, O_RDONLY);
}
@@ -117,10 +133,12 @@ mediaShutdownCDROM(Device *dev)
{
if (!RunningAsInit || !cdromMounted)
return;
- msgDebug("Unmounting /cdrom\n");
- if (unmount("/cdrom", MNT_FORCE) != 0)
- msgConfirm("Could not unmount the CDROM: %s\n", strerror(errno));
- msgDebug("Unmount returned\n");
+ msgDebug("Unmounting %s from /cdrom\n", dev->devname);
+ if (unmount("/cdrom", MNT_FORCE) != 0) {
+ dialog_clear();
+ msgConfirm("Could not unmount the CDROM from /cdrom: %s", strerror(errno));
+ }
+ msgDebug("Unmount successful\n");
cdromMounted = FALSE;
return;
}
diff --git a/release/sysinstall/command.c b/release/sysinstall/command.c
index 1fad8d2..225d4ec 100644
--- a/release/sysinstall/command.c
+++ b/release/sysinstall/command.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: command.c,v 1.11.4.1 1995/07/21 11:45:35 rgrimes Exp $
+ * $Id: command.c,v 1.12 1995/09/18 16:52:21 peter Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -77,7 +77,7 @@ addit(char *key, int type, void *cmd, void *data)
{
int i;
- /* First, look for the key already present and add a command to it */
+ /* First, look for the key already present and add a command to it if found */
for (i = 0; i < numCommands; i++) {
if (!strcmp(commandStack[i]->key, key)) {
if (commandStack[i]->ncmds == MAX_NUM_COMMANDS)
@@ -98,7 +98,8 @@ addit(char *key, int type, void *cmd, void *data)
commandStack[numCommands]->ncmds = 1;
commandStack[numCommands]->cmds[0].type = type;
commandStack[numCommands]->cmds[0].ptr = cmd;
- commandStack[numCommands++]->cmds[0].data = data;
+ commandStack[numCommands]->cmds[0].data = data;
+ ++numCommands;
}
/* Add a shell command under a given key */
@@ -108,9 +109,9 @@ command_shell_add(char *key, char *fmt, ...)
va_list args;
char *cmd;
- cmd = (char *)safe_malloc(1024);
+ cmd = (char *)safe_malloc(256);
va_start(args, fmt);
- vsnprintf(cmd, 1024, fmt, args);
+ vsnprintf(cmd, 256, fmt, args);
va_end(args);
addit(key, CMD_SHELL, cmd, NULL);
@@ -123,17 +124,36 @@ command_func_add(char *key, commandFunc func, void *data)
addit(key, CMD_FUNCTION, func, data);
}
-/* arg to sort */
static int
-sort_compare(const void *p1, const void *p2)
+sort_compare(Command *p1, Command *p2)
{
- return strcmp(((Command *)p1)->key, ((Command *)p2)->key);
+ if (!p1 && !p2)
+ return 0;
+ else if (!p1 && p2) /* NULL has a "greater" value for commands */
+ return 1;
+ else if (p1 && !p2)
+ return -1;
+ else
+ return strcmp(p1->key, p2->key);
}
void
command_sort(void)
{
- qsort(commandStack, numCommands, sizeof(Command *), sort_compare);
+ int i, j;
+
+ commandStack[numCommands] = NULL;
+ /* Just do a crude bubble sort since the list is small */
+ for (i = 0; i < numCommands; i++) {
+ for (j = 0; j < numCommands; j++) {
+ if (sort_compare(commandStack[j], commandStack[j + 1]) > 0) {
+ Command *tmp = commandStack[j];
+
+ commandStack[j] = commandStack[j + 1];
+ commandStack[j + 1] = tmp;
+ }
+ }
+ }
}
/* Run all accumulated commands in sorted order */
@@ -155,7 +175,8 @@ command_execute(void)
else {
/* It's a function pointer - call it with the key and the data */
func = (commandFunc)commandStack[i]->cmds[j].ptr;
- msgNotify("%x: Execute(%s, %s)", func, commandStack[i]->key, commandStack[i]->cmds[j].data);
+ if (isDebug())
+ msgDebug("%x: Execute(%s, %s)", func, commandStack[i]->key, commandStack[i]->cmds[j].data);
ret = (*func)(commandStack[i]->key, commandStack[i]->cmds[j].data);
if (isDebug())
msgDebug("Function @ %x returns status %d\n", commandStack[i]->cmds[j].ptr, ret);
diff --git a/release/sysinstall/config.c b/release/sysinstall/config.c
index 75f0f9c..e49b574 100644
--- a/release/sysinstall/config.c
+++ b/release/sysinstall/config.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: config.c,v 1.16.2.2 1995/07/21 11:45:36 rgrimes Exp $
+ * $Id: config.c,v 1.17 1995/09/18 16:52:22 peter Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -50,34 +50,53 @@ static int nchunks;
/* arg to sort */
static int
-chunk_compare(const void *p1, const void *p2)
+chunk_compare(Chunk *c1, Chunk *c2)
{
- Chunk *c1, *c2;
-
- c1 = (Chunk *)p1;
- c2 = (Chunk *)p2;
- if (!c1->private && !c2->private)
+ if (!c1 && !c2)
return 0;
- else if (c1->private && !c2->private)
+ else if (!c1 && c2)
+ return 1;
+ else if (c1 && !c2)
return -1;
- else if (!c1->private && c2->private)
+ else if (!c1->private && !c2->private)
+ return 0;
+ else if (c1->private && !c2->private)
return 1;
+ else if (!c1->private && c2->private)
+ return -1;
else
- return strcmp(((PartInfo *)c1->private)->mountpoint, ((PartInfo *)c2->private)->mountpoint);
+ return strcmp(((PartInfo *)(c1->private))->mountpoint, ((PartInfo *)(c2->private))->mountpoint);
+}
+
+static void
+chunk_sort(void)
+{
+ int i, j;
+
+ for (i = 0; i < nchunks; i++) {
+ for (j = 0; j < nchunks; j++) {
+ if (chunk_compare(chunk_list[j], chunk_list[j + 1]) > 0) {
+ Chunk *tmp = chunk_list[j];
+
+ chunk_list[j] = chunk_list[j + 1];
+ chunk_list[j + 1] = tmp;
+ }
+ }
+ }
}
static char *
-nameof(Chunk *c1)
+name_of(Chunk *c1)
{
- static char rootname[64];
+ static char rootname[32];
/* Our boot blocks can't deal with root partitions on slices - need the compatbility name */
if (c1->type == part && c1->flags & CHUNK_IS_ROOT) {
- sprintf(rootname, "%sa", c1->disk->name);
- return rootname;
+ sprintf(rootname, "%sa", c1->disk->name);
+ return rootname;
}
else
- return c1->name;
+ return c1->name;
}
static char *
@@ -126,7 +145,7 @@ seq_num(Chunk *c1)
return 0;
}
-void
+int
configFstab(void)
{
Device **devs;
@@ -137,14 +156,20 @@ configFstab(void)
if (!RunningAsInit) {
if (file_readable("/etc/fstab"))
- return;
- else
- msgConfirm("Attempting to rebuild your /etc/fstab file.\nWarning: If you had any CD devices in use before running\nsysinstall then they may NOT be found in this run!");
+ return RET_SUCCESS;
+ else {
+ dialog_clear();
+ msgConfirm("Attempting to rebuild your /etc/fstab file. Warning: If you had\n"
+ "any CD devices in use before running sysinstall then they may NOT\n"
+ "be found by this run!");
+ }
}
+
devs = deviceFind(NULL, DEVICE_TYPE_DISK);
if (!devs) {
+ dialog_clear();
msgConfirm("No disks found!");
- return;
+ return RET_FAIL;
}
/* Record all the chunks */
@@ -166,20 +191,21 @@ configFstab(void)
chunk_list[nchunks++] = c1;
}
}
-
- /* Sort them puppies! */
- qsort(chunk_list, nchunks, sizeof(Chunk *), chunk_compare);
+ chunk_list[nchunks] = 0;
+ chunk_sort();
fstab = fopen("/etc/fstab", "w");
if (!fstab) {
- msgConfirm("Unable to create a new /etc/fstab file!\nManual intervention will be required.");
- return;
+ dialog_clear();
+ msgConfirm("Unable to create a new /etc/fstab file! Manual intervention\n"
+ "will be required.");
+ return RET_FAIL;
}
/* Go for the burn */
msgDebug("Generating /etc/fstab file\n");
for (i = 0; i < nchunks; i++)
- fprintf(fstab, "/dev/%s\t\t\t%s\t\t%s\t%s %d %d\n", nameof(chunk_list[i]), mount_point(chunk_list[i]),
+ fprintf(fstab, "/dev/%s\t\t\t%s\t\t%s\t%s %d %d\n", name_of(chunk_list[i]), mount_point(chunk_list[i]),
fstype(chunk_list[i]), fstype_short(chunk_list[i]), seq_num(chunk_list[i]), seq_num(chunk_list[i]));
Mkdir("/proc", NULL);
fprintf(fstab, "proc\t\t\t\t/proc\t\tprocfs\trw 0 0\n");
@@ -190,8 +216,12 @@ configFstab(void)
/* Write the first one out as /cdrom */
if (cnt) {
- Mkdir("/cdrom", NULL);
- fprintf(fstab, "/dev/%s\t\t\t/cdrom\t\tcd9660\tro 0 0\n", devs[0]->name);
+ if (Mkdir("/cdrom", NULL)) {
+ dialog_clear();
+ msgConfirm("Unable to make mount point for: /cdrom");
+ }
+ else
+ fprintf(fstab, "/dev/%s\t\t\t/cdrom\t\tcd9660\tro,noauto 0 0\n", devs[0]->name);
}
/* Write the others out as /cdrom<n> */
@@ -199,185 +229,308 @@ configFstab(void)
char cdname[10];
sprintf(cdname, "/cdrom%d", i);
- Mkdir(cdname, NULL);
- fprintf(fstab, "/dev/%s\t\t\t%s\t\tcd9660\tro 0 0\n", devs[i]->name, cdname);
+ if (Mkdir(cdname, NULL)) {
+ dialog_clear();
+ msgConfirm("Unable to make mount point for: %s", cdname);
+ }
+ else
+ fprintf(fstab, "/dev/%s\t\t\t%s\t\tcd9660\tro,noauto 0 0\n", devs[i]->name, cdname);
}
fclose(fstab);
if (isDebug())
msgDebug("Wrote out /etc/fstab file\n");
+ return RET_SUCCESS;
}
/*
* This sucks in /etc/sysconfig, substitutes anything needing substitution, then
* writes it all back out. It's pretty gross and needs re-writing at some point.
*/
+
+#define MAX_LINES 2000 /* Some big number we're not likely to ever reach - I'm being really lazy here, I know */
void
configSysconfig(void)
{
FILE *fp;
- char *lines[5001]; /* Some big number we're not likely to ever reach - I'm being really lazy here, I know */
+ char *lines[MAX_LINES], *cp;
char line[256];
Variable *v;
- int i, nlines = 0;
+ int i, nlines;
fp = fopen("/etc/sysconfig", "r");
if (!fp) {
- msgConfirm("Unable to open /etc/sysconfig file! Things may work\nrather strangely as a result of this.");
+ dialog_clear();
+ msgConfirm("Unable to open /etc/sysconfig file! Things may work\n"
+ "rather strangely as a result of this.");
return;
}
- for (i = 0; i < 5000; i++) {
+ msgNotify("Writing configuration changes to /etc/sysconfig file..");
+
+ nlines = 0;
+ /* Read in the entire file */
+ for (i = 0; i < MAX_LINES; i++) {
if (!fgets(line, 255, fp))
break;
lines[nlines++] = strdup(line);
}
- lines[nlines] = NULL;
- fclose(fp);
+ msgDebug("Read %d lines from sysconfig.\n", nlines);
+ /* Now do variable substitutions */
for (v = VarHead; v; v = v->next) {
for (i = 0; i < nlines; i++) {
- char modify[256], *cp;
+ char tmp[256];
- if (lines[i][0] == '#' || lines[i][0] == ';')
+ /* Skip the comments */
+ if (lines[i][0] == '#')
continue;
- strncpy(modify, lines[i], 255);
- cp = index(modify, '=');
+ strcpy(tmp, lines[i]);
+ cp = index(tmp, '=');
if (!cp)
continue;
*(cp++) = '\0';
- if (!strcmp(modify, v->name)) {
+ if (!strcmp(tmp, v->name)) {
free(lines[i]);
- lines[i] = (char *)malloc(strlen(v->name) + strlen(v->value) + 3);
+ lines[i] = (char *)malloc(strlen(v->name) + strlen(v->value) + 5);
sprintf(lines[i], "%s=\"%s\"\n", v->name, v->value);
+ msgDebug("Variable substitution on: %s\n", lines[i]);
}
-
}
}
+
+ /* Now write it all back out again */
+ fclose(fp);
fp = fopen("/etc/sysconfig", "w");
- if (!fp) {
- msgConfirm("Unable to re-write /etc/sysconfig file! Things may work\nrather strangely as a result of this.");
- return;
- }
for (i = 0; i < nlines; i++) {
- fprintf(fp, lines[i]);
- free(lines[i]);
+ static Boolean firstTime = TRUE;
+ fprintf(fp, lines[i]);
/* Stand by for bogus special case handling - we try to dump the interface specs here */
- if (!strncmp(lines[i], VAR_INTERFACES, strlen(VAR_INTERFACES))) {
+ if (firstTime && !strncmp(lines[i], VAR_INTERFACES, strlen(VAR_INTERFACES))) {
Device **devp;
int j, cnt;
devp = deviceFind(NULL, DEVICE_TYPE_NETWORK);
cnt = deviceCount(devp);
for (j = 0; j < cnt; j++) {
- if (devp[j]->private && strncmp(devp[j]->name, "cuaa", 4)) {
- char iname[64];
+ char iname[255];
- snprintf(iname, 64, "%s%s", VAR_IFCONFIG, devp[j]->name);
- if (getenv(iname))
- fprintf(fp, "%s=\"%s\"\n", iname, getenv(iname));
+ snprintf(iname, 255, "%s%s", VAR_IFCONFIG, devp[j]->name);
+ if ((cp = variable_get(iname))) {
+ fprintf(fp, "%s=\"%s\"\n", iname, cp);
}
}
+ firstTime = FALSE;
}
+ free(lines[i]);
}
fclose(fp);
-
- /* If we're an NFS server, we need an exports file */
- if (getenv("nfs_server") && !file_readable("/etc/exports")) {
- msgConfirm("You have chosen to be an NFS server but have not yet configured\nthe /etc/exports file. The format for an exports entry is:\n <mountpoint> <opts> <host [..host]>\nWhere <mounpoint> is the name of a filesystem as specified\nin the Label editor, <opts> is a list of special options we\nwon't concern ourselves with here (``man exports'' when the\nsystem is fully installed) and <host> is one or more host\nnames who are allowed to mount this file system. Press\n[ENTER] now to invoke the editor on /etc/exports");
- systemExecute("vi /etc/exports");
- }
}
int
configSaverTimeout(char *str)
{
- char *val;
-
- val = msgGetInput("60", "Enter time-out period in seconds for screen saver");
- if (val)
- variable_set2("blanktime", val);
- return 0;
+ return variable_get_value(VAR_BLANKTIME, "Enter time-out period in seconds for screen saver")
+ ? RET_SUCCESS : RET_FAIL;
}
int
configNTP(char *str)
{
- char *val;
-
- val = msgGetInput(NULL, "Enter the name of an NTP server");
- if (val)
- variable_set2("ntpdate", val);
- return 0;
+ return variable_get_value(VAR_NTPDATE, "Enter the name of an NTP server") ? RET_SUCCESS : RET_FAIL;
}
void
configResolv(void)
{
FILE *fp;
- char *cp;
+ char *cp, *dp, *hp;
if (!RunningAsInit && file_readable("/etc/resolv.conf"))
return;
- if (!getenv(VAR_NAMESERVER)) {
- if (mediaDevice && (mediaDevice->type == DEVICE_TYPE_NFS || mediaDevice->type == DEVICE_TYPE_FTP))
- msgConfirm("Warning: Missing name server value - network operations\nmay fail as a result!");
+ if (!variable_get(VAR_NAMESERVER)) {
+ if (mediaDevice && (mediaDevice->type == DEVICE_TYPE_NFS || mediaDevice->type == DEVICE_TYPE_FTP)) {
+ dialog_clear();
+ msgConfirm("Warning: Missing name server value - network operations\n"
+ "may fail as a result!");
+ }
goto skip;
}
- Mkdir("/etc", NULL);
+ if (Mkdir("/etc", NULL)) {
+ dialog_clear();
+ msgConfirm("Unable to create /etc directory. Network configuration\n"
+ "files will therefore not be written!");
+ return;
+ }
fp = fopen("/etc/resolv.conf", "w");
if (!fp) {
+ dialog_clear();
msgConfirm("Unable to open /etc/resolv.conf! You will need to do this manually.");
return;
}
- if (getenv(VAR_DOMAINNAME))
- fprintf(fp, "domain\t%s\n", getenv(VAR_DOMAINNAME));
- fprintf(fp, "nameserver\t%s\n", getenv(VAR_NAMESERVER));
+ if (variable_get(VAR_DOMAINNAME))
+ fprintf(fp, "domain\t%s\n", variable_get(VAR_DOMAINNAME));
+ fprintf(fp, "nameserver\t%s\n", variable_get(VAR_NAMESERVER));
fclose(fp);
if (isDebug())
msgDebug("Wrote out /etc/resolv.conf\n");
skip:
- /* Tack ourselves at the end of /etc/hosts */
- cp = getenv(VAR_IPADDR);
- if (cp && *cp != '0' && getenv(VAR_HOSTNAME)) {
- fp = fopen("/etc/hosts", "a");
- fprintf(fp, "%s\t\t%s\n", cp, getenv(VAR_HOSTNAME));
+ /* Tack ourselves into /etc/hosts */
+ cp = variable_get(VAR_IPADDR);
+ dp = variable_get(VAR_DOMAINNAME);
+ if (cp && *cp != '0' && (hp = variable_get(VAR_HOSTNAME))) {
+ char cp2[255];
+
+ (void)vsystem("hostname %s", hp);
+ fp = fopen("/etc/hosts", "w");
+ if (!index(hp, '.'))
+ cp2[0] = '\0';
+ else {
+ strcpy(cp2, hp);
+ *(index(cp2, '.')) = '\0';
+ }
+ fprintf(fp, "127.0.0.1\t\tlocalhost.%s localhost\n", dp ? dp : "my.domain");
+ fprintf(fp, "%s\t\t%s %s\n", cp, hp, cp2);
fclose(fp);
if (isDebug())
- msgDebug("Appended entry for %s to /etc/hosts\n", cp);
+ msgDebug("Wrote entry for %s to /etc/hosts\n", cp);
}
}
int
configRoutedFlags(char *str)
{
- char *val;
-
- val = msgGetInput("-q", "Specify the flags for routed; -q is the default, -s is\na good choice for gateway machines.");
- if (val)
- variable_set2("routedflags", val);
- return 0;
+ return variable_get_value(VAR_ROUTEDFLAGS,
+ "Specify the flags for routed; -q is the default, -s is\n"
+ "a good choice for gateway machines.") ? RET_SUCCESS : RET_FAIL;
}
int
configPackages(char *str)
{
- Boolean onCD;
-
- /* If we're running as init, we know that a CD in the drive is probably ours */
- onCD = file_readable("/cdrom/packages");
- if (!onCD && RunningAsInit) {
- if (mediaSetCDROM(NULL)) {
- if ((*mediaDevice->init)(mediaDevice))
- onCD = TRUE;
+ PkgNode top, plist;
+ int fd;
+
+ if (!mediaVerify())
+ return RET_FAIL;
+
+ if (!mediaDevice->init(mediaDevice))
+ return RET_FAIL;
+
+ msgNotify("Attempting to fetch packages/INDEX file from selected media.");
+ fd = mediaDevice->get(mediaDevice, "packages/INDEX", TRUE);
+ if (fd < 0) {
+ dialog_clear();
+ msgConfirm("Unable to get packages/INDEX file from selected media.\n"
+ "This may be because the packages collection is not available at\n"
+ "on the distribution media you've chosen (most likely an FTP site\n"
+ "without the packages collection mirrored). Please verify media\n"
+ "(or path to media) and try again. If your local site does not\n"
+ "carry the packages collection, then we recommend either a CD\n"
+ "distribution or the master distribution on ftp.freebsd.org.");
+ return RET_FAIL;
+ }
+ msgNotify("Got INDEX successfully, now building packages menu..");
+ index_init(&top, &plist);
+ if (index_read(fd, &top)) {
+ dialog_clear();
+ msgConfirm("I/O or format error on packages/INDEX file.\n"
+ "Please verify media (or path to media) and try again.");
+ mediaDevice->close(mediaDevice, fd);
+ return RET_FAIL;
+ }
+ mediaDevice->close(mediaDevice, fd);
+ index_sort(&top);
+ while (1) {
+ int ret, pos, scroll;
+
+ /* Bring up the packages menu */
+ pos = scroll = 0;
+ index_menu(&top, &plist, &pos, &scroll);
+
+ if (plist.kids) {
+ /* Now show the packing list menu */
+ pos = scroll = 0;
+ ret = index_menu(&plist, NULL, &pos, &scroll);
+ if (ret == RET_DONE)
+ break;
+ else if (ret != RET_FAIL) {
+ index_extract(mediaDevice, &plist);
+ break;
+ }
+ }
+ else {
+ dialog_clear();
+ msgConfirm("No packages were selected for extraction.");
+ break;
}
}
- /* XXX Construct some sort of menu here using an INDEX file from /cdrom/packages XXX */
- return 0;
+ index_node_free(&top, &plist);
+ mediaDevice->shutdown(mediaDevice);
+ return RET_SUCCESS;
}
int
configPorts(char *str)
{
- return 0;
+ char *cp, *dist = NULL; /* Shut up compiler */
+
+ if (!variable_get(VAR_PORTS_PATH))
+ variable_set2(VAR_PORTS_PATH, dist = "/cdrom/ports");
+ while (!directoryExists(dist)) {
+ dist = variable_get_value(VAR_PORTS_PATH,
+ "Unable to locate a ports tree on CDROM. Please specify the\n"
+ "location of the master ports directory you wish to create the\n"
+ "link tree to.");
+ if (!dist)
+ break;
+ }
+ if (dist) {
+ cp = msgGetInput("/usr/ports",
+ "Where would you like to create the link tree?\n"
+ "(press [ENTER] for default location). The link tree should\n"
+ "reside in a directory with as much free space as possible,\n"
+ "as you'll need space to compile any ports.");
+ if (!cp || !*cp)
+ return RET_FAIL;
+ if (Mkdir(cp, NULL)) {
+ dialog_clear();
+ msgConfirm("Unable to make the %s directory!", cp);
+ return RET_FAIL;
+ }
+ else {
+ if (strcmp(cp, "/usr/ports")) {
+ unlink("/usr/ports");
+ if (symlink(cp, "/usr/ports") == -1) {
+ msgConfirm("Unable to create a symlink from /usr/ports to %s!\n"
+ "I can't continue, sorry!", cp);
+ return RET_FAIL;
+ }
+ else {
+ msgConfirm("NOTE: This directory is also now symlinked to /usr/ports\n"
+ "which, for a variety of reasons, is the directory the ports\n"
+ "framework expects to find its files in. You should refer to\n"
+ "/usr/ports instead of %s directly when you're working in the\n"
+ "ports collection.", cp);
+ }
+ }
+ msgNotify("Making a link tree from %s to %s.", dist, cp);
+ if (lndir(dist, cp) != RET_SUCCESS) {
+ dialog_clear();
+ msgConfirm("The lndir function returned an error status and may not have.\n"
+ "successfully generated the link tree. You may wish to inspect\n"
+ "the /usr/ports directory carefully for any missing link files.");
+ }
+ else {
+ msgConfirm("The /usr/ports directory is now ready to use. When the system comes\n"
+ "up fully, you can cd to this directory and type `make' in any sub-\n"
+ "directory for which you'd like to compile a port. You can also\n"
+ "cd to /usr/ports and type `make print-index' for a complete list of all\n"
+ "ports in the hierarchy.");
+ }
+ }
+ }
+ else
+ return RET_FAIL;
+ return RET_SUCCESS;
}
diff --git a/release/sysinstall/decode.c b/release/sysinstall/decode.c
index 2302796..68f97af 100644
--- a/release/sysinstall/decode.c
+++ b/release/sysinstall/decode.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: decode.c,v 1.5.2.3 1995/06/02 15:30:47 jkh Exp $
+ * $Id: decode.c,v 1.6.2.5 1995/11/03 12:02:26 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -56,15 +56,15 @@ decode(DMenu *menu, char *name)
return tmp;
}
-Boolean
+int
dispatch(DMenuItem *tmp, char *name)
{
- Boolean failed = FALSE;
+ int val = RET_SUCCESS;
switch (tmp->type) {
- /* We want to simply display a file */
+ /* We want to simply display a help file */
case DMENU_DISPLAY_FILE:
- systemDisplayFile((char *)tmp->ptr);
+ systemDisplayHelp((char *)tmp->ptr);
break;
/* It's a sub-menu; recurse on it */
@@ -72,7 +72,7 @@ dispatch(DMenuItem *tmp, char *name)
(void)dmenuOpenSimple((DMenu *)tmp->ptr);
break;
- /* Execute it as a system command */
+ /* Execute it as a direct exec */
case DMENU_SYSTEM_COMMAND:
(void)systemExecute((char *)tmp->ptr);
break;
@@ -86,14 +86,16 @@ dispatch(DMenuItem *tmp, char *name)
break;
case DMENU_CALL:
- failed = (((int (*)())tmp->ptr)(name));
+ val = (((int (*)())tmp->ptr)(name));
break;
case DMENU_CANCEL:
- return TRUE;
+ val = RET_DONE;
+ break;
case DMENU_SET_VARIABLE:
variable_set((char *)tmp->ptr);
+ msgInfo("Set %s", tmp->ptr);
break;
case DMENU_SET_FLAG:
@@ -110,10 +112,10 @@ dispatch(DMenuItem *tmp, char *name)
default:
msgFatal("Don't know how to deal with menu type %d", tmp->type);
}
- return failed;
+ return val;
}
-Boolean
+int
decode_and_dispatch_multiple(DMenu *menu, char *names)
{
DMenuItem *tmp;
@@ -140,7 +142,7 @@ decode_and_dispatch_multiple(DMenu *menu, char *names)
if (!*names)
return FALSE;
if ((tmp = decode(menu, names)) != NULL) {
- if (dispatch(tmp, names))
+ if (dispatch(tmp, names) != RET_SUCCESS)
++errors;
}
else
@@ -148,6 +150,5 @@ decode_and_dispatch_multiple(DMenu *menu, char *names)
names, menu->title);
names = cp;
}
- return errors ? TRUE : FALSE;
+ return errors;
}
-
diff --git a/release/sysinstall/devices.c b/release/sysinstall/devices.c
index b1b91d7..7951422 100644
--- a/release/sysinstall/devices.c
+++ b/release/sysinstall/devices.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: devices.c,v 1.35.2.9 1995/06/05 12:03:46 jkh Exp $
+ * $Id: devices.c,v 1.36.2.11 1995/11/15 06:57:02 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -82,16 +82,20 @@ static struct {
{ DEVICE_TYPE_CDROM, "scd1a", "Sony CDROM drive - CDU31/33A type (2nd unit)" },
{ DEVICE_TYPE_CDROM, "matcd0a", "Matsushita CDROM ('sound blaster' type)" },
{ DEVICE_TYPE_CDROM, "matcd1a", "Matsushita CDROM (2nd unit)" },
+ { DEVICE_TYPE_CDROM, "wcd0c", "ATAPI IDE CDROM" },
+ { DEVICE_TYPE_CDROM, "wcd1c", "ATAPI IDE CDROM (2nd unit)" },
{ DEVICE_TYPE_TAPE, "rst0", "SCSI tape drive" },
{ DEVICE_TYPE_TAPE, "rst1", "SCSI tape drive (2nd unit)" },
- { DEVICE_TYPE_TAPE, "ft0", "Floppy tape drive (QIC-02)" },
- { DEVICE_TYPE_TAPE, "wt0", "Wangtek tape drive" },
+ { DEVICE_TYPE_TAPE, "rft0", "Floppy tape drive (QIC-02)" },
+ { DEVICE_TYPE_TAPE, "rwt0", "Wangtek tape drive" },
{ DEVICE_TYPE_DISK, "sd", "SCSI disk device" },
{ DEVICE_TYPE_DISK, "wd", "IDE/ESDI/MFM/ST506 disk device" },
{ DEVICE_TYPE_FLOPPY, "fd0", "floppy drive unit A" },
{ DEVICE_TYPE_FLOPPY, "fd1", "floppy drive unit B" },
{ DEVICE_TYPE_NETWORK, "cuaa0", "Serial port (COM1) - possible PPP/SLIP device" },
{ DEVICE_TYPE_NETWORK, "cuaa1", "Serial port (COM2) - possible PPP/SLIP device" },
+ { DEVICE_TYPE_NETWORK, "cuaa2", "Serial port (COM3) - possible PPP/SLIP device" },
+ { DEVICE_TYPE_NETWORK, "cuaa3", "Serial port (COM4) - possible PPP/SLIP device" },
{ DEVICE_TYPE_NETWORK, "lp0", "Parallel Port IP (PLIP) using laplink cable" },
{ DEVICE_TYPE_NETWORK, "lo", "Loop-back (local) network interface" },
{ DEVICE_TYPE_NETWORK, "sl", "Serial-line IP (SLIP) interface" },
@@ -126,18 +130,21 @@ new_device(char *name)
Boolean
dummyInit(Device *dev)
{
+ msgDebug("Dummy init called for %s\n", dev->name);
return TRUE;
}
int
-dummyGet(Device *dev, char *dist, Attribs *dist_attrs)
+dummyGet(Device *dev, char *dist, Boolean tentative)
{
+ msgDebug("Dummy get called for %s\n", dev->name);
return -1;
}
Boolean
dummyClose(Device *dev, int fd)
{
+ msgDebug("Dummy [default] close called for %s with fd of %d.\n", dev->name, fd);
if (!close(fd))
return TRUE;
return FALSE;
@@ -146,6 +153,7 @@ dummyClose(Device *dev, int fd)
void
dummyShutdown(Device *dev)
{
+ msgDebug("Dummy shutdown called for %s\n", dev->name);
return;
}
@@ -166,7 +174,7 @@ deviceTry(char *name, char *try)
/* Register a new device in the devices array */
Device *
deviceRegister(char *name, char *desc, char *devname, DeviceType type, Boolean enabled,
- Boolean (*init)(Device *), int (*get)(Device *, char *, Attribs *),
+ Boolean (*init)(Device *), int (*get)(Device *, char *, Boolean),
Boolean (*close)(Device *, int), void (*shutdown)(Device *), void *private)
{
Device *newdev;
@@ -294,10 +302,12 @@ deviceGetAll(void)
s = socket(AF_INET, SOCK_DGRAM, 0);
if (s < 0) {
+ dialog_clear();
msgConfirm("ifconfig: socket");
return;
}
if (ioctl(s, SIOCGIFCONF, (char *) &ifc) < 0) {
+ dialog_clear();
msgConfirm("ifconfig (SIOCGIFCONF)");
return;
}
@@ -316,6 +326,7 @@ deviceGetAll(void)
msgDebug("Found a device of type network named: %s\n", ifptr->ifr_name);
close(s);
if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
+ dialog_clear();
msgConfirm("ifconfig: socket");
continue;
}
diff --git a/release/sysinstall/disks.c b/release/sysinstall/disks.c
index c5ec295..fb29202 100644
--- a/release/sysinstall/disks.c
+++ b/release/sysinstall/disks.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: disks.c,v 1.31.2.2 1995/07/21 11:45:38 rgrimes Exp $
+ * $Id: disks.c,v 1.32 1995/09/18 16:52:23 peter Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -49,7 +49,7 @@
#define CHUNK_START_ROW 5
/* Where we keep track of MBR chunks */
-static struct chunk *chunk_info[10];
+static struct chunk *chunk_info[16];
static int current_chunk;
static void
@@ -60,15 +60,13 @@ record_chunks(Disk *d)
int last_free = 0;
if (!d->chunks)
msgFatal("No chunk list found for %s!", d->name);
- c1 = d->chunks->part;
current_chunk = 0;
- while (c1) {
+ 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;
- c1 = c1->next;
}
chunk_info[i] = NULL;
}
@@ -79,16 +77,32 @@ print_chunks(Disk *d)
int row;
int i;
- if ((!d->bios_cyl || d->bios_cyl > 65536) || (!d->bios_hd || d->bios_hd > 256) || (!d->bios_sect || d->bios_sect >= 64))
- msgConfirm("WARNING: The detected geometry is incorrect! Please adjust it to\nthe correct values manually with the (G)eometry command. If you are\nunsure about the correct geometry (which may be \"translated\"), please\nconsult the Hardware Guide in the Documentation submenu.");
-
+ if ((!d->bios_cyl || d->bios_cyl > 65536) || (!d->bios_hd || d->bios_hd > 256) || (!d->bios_sect || d->bios_sect >= 64)) {
+ int sz;
+
+ dialog_clear();
+ msgConfirm("WARNING: The current geometry for %s is incorrect. Using\n"
+ "a default geometry of 64 heads and 32 sectors. If this geometry\n"
+ "is incorrect or you are unsure as to whether or not it's correct,\n"
+ "please consult the Hardware Guide in the Documentation submenu\n"
+ "or use the (G)eometry command to change it now.", d->name);
+ d->bios_hd = 64;
+ d->bios_sect = 32;
+ sz = 0;
+ for (i = 0; chunk_info[i]; i++)
+ sz += chunk_info[i]->size;
+ if (sz)
+ d->bios_cyl = sz / ONE_MEG;
+ else
+ msgConfirm("Couldn't set geometry! You'll have to do it by hand.");
+ }
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,
- "BIOS Geometry:\t%lu cyls/%lu heads/%lu sectors",
+ "DISK Geometry:\t%lu cyls/%lu heads/%lu sectors",
d->bios_cyl, d->bios_hd, d->bios_sect);
mvprintw(3, 1, "%10s %10s %10s %8s %8s %8s %8s %8s",
"Offset", "Size", "End", "Name", "PType", "Desc",
@@ -111,7 +125,7 @@ print_command_summary()
{
mvprintw(14, 0, "The following commands are supported (in upper or lower case):");
mvprintw(16, 0, "A = Use Entire Disk B = Bad Block Scan C = Create Partition");
- mvprintw(17, 0, "D = Delete Partition G = Set BIOS Geometry S = Set Bootable");
+ mvprintw(17, 0, "D = Delete Partition G = Set Drive Geometry S = Set Bootable");
mvprintw(18, 0, "U = Undo All Changes Q = Finish W = Write Changes");
mvprintw(20, 0, "The currently selected partition is displayed in ");
attrset(A_REVERSE); addstr("reverse"); attrset(A_NORMAL); addstr(" video.");
@@ -119,17 +133,142 @@ print_command_summary()
move(0, 0);
}
-static Disk *
-diskPartition(Disk *d)
+/* Partition a disk based wholly on which variables are set */
+static void
+scriptPartition(Device *dev, Disk *d)
+{
+ char *cp;
+ int i, sz;
+
+ 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_DISKSPACE);
+ 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,
+ (chunk_info[i]->flags & CHUNK_ALIGN));
+ variable_set2(DISK_PARTITIONED, "yes");
+ break;
+ }
+ }
+ if (!chunk_info[i]) {
+ dialog_clear();
+ 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, TRUE);
+ }
+ else if ((sz = strtol(cp, &cp, 0))) {
+ /* Look for sz bytes free */
+ if (*cp && toupper(*cp) == 'M')
+ sz *= ONE_MEG;
+ 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));
+ variable_set2(DISK_PARTITIONED, "yes");
+ break;
+ }
+ }
+ if (!chunk_info[i]) {
+ dialog_clear();
+ 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]) {
+ dialog_clear();
+ msgConfirm("Unable to find any existing FreeBSD partitions on this disk!");
+ return;
+ }
+ }
+ else {
+ dialog_clear();
+ msgConfirm("`%s' is an invalid value for %s - is config file valid?", cp, VAR_DISKSPACE);
+ return;
+ }
+ variable_set2(DISK_PARTITIONED, "yes");
+ }
+}
+
+static u_char *
+getBootMgr(char *dname)
+{
+ extern u_char mbr[], bteasy17[];
+ 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;
+ dialog_clear();
+ i = dmenuOpenSimple(&MenuMBRType);
+ }
+ 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 bteasy17;
+
+ case 1:
+ return mbr;
+
+ case 2:
+ default:
+ break;
+ }
+ }
+ return NULL;
+}
+
+void
+diskPartition(Device *dev, Disk *d)
{
char *p;
int key = 0;
Boolean chunking;
char *msg = NULL;
- char name[40];
+ u_char *mbrContents;
chunking = TRUE;
- strncpy(name, d->name, 40);
keypad(stdscr, TRUE);
clear();
@@ -148,6 +287,7 @@ diskPartition(Disk *d)
case '\014': /* ^L */
clear();
+ print_command_summary();
continue;
case KEY_UP:
@@ -175,23 +315,46 @@ diskPartition(Disk *d)
case KEY_F(1):
case '?':
- systemDisplayFile("slice.hlp");
+ systemDisplayHelp("slice");
break;
- case 'A':
- All_FreeBSD(d);
+ case 'A': {
+ int rv;
+
+ 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)?");
+ if (rv) {
+ rv = !msgYesNo("This is dangerous in that it will make the drive totally\n"
+ "uncooperative with other potential operating systems on the\n"
+ "same disk. It will lead instead to a totally dedicated disk,\n"
+ "starting at the very first sector, bypassing all BIOS geometry\n"
+ "considerations.\n"
+ "You will run into serious trouble with ST-506 and ESDI drives\n"
+ "and possibly some IDE drives (e.g. drives running under the\n"
+ "control of sort of disk manager). SCSI drives are considerably\n"
+ "less at risk.\n\n"
+ "Do you insist on dedicating the entire disk this way?");
+ }
+ All_FreeBSD(d, rv);
+ if (rv)
+ d->bios_hd = d->bios_sect = d->bios_cyl = 1;
+ variable_set2(DISK_PARTITIONED, "yes");
record_chunks(d);
+ }
break;
case 'B':
if (chunk_info[current_chunk]->type != freebsd)
msg = "Can only scan for bad blocks in FreeBSD partition.";
- else if (strncmp(name, "sd", 2) ||
- !msgYesNo("This typically makes sense only for ESDI, IDE or MFM drives.\nAre you sure you want to do this on a SCSI disk?"))
+ else if (strncmp(d->name, "sd", 2) ||
+ !msgYesNo("This typically makes sense only for ESDI, IDE or MFM drives.\n"
+ "Are you sure you want to do this on a SCSI disk?")) {
if (chunk_info[current_chunk]->flags & CHUNK_BAD144)
chunk_info[current_chunk]->flags &= ~CHUNK_BAD144;
else
chunk_info[current_chunk]->flags |= CHUNK_BAD144;
+ }
break;
case 'C':
@@ -202,12 +365,14 @@ diskPartition(Disk *d)
int size;
snprintf(tmp, 20, "%d", chunk_info[current_chunk]->size);
- val = msgGetInput(tmp, "Please specify the size for new FreeBSD partition in blocks, or append\na trailing `M' for megabytes (e.g. 20M).");
+ val = msgGetInput(tmp, "Please specify the size for new FreeBSD partition in blocks, or append\n"
+ "a trailing `M' for megabytes (e.g. 20M).");
if (val && (size = strtol(val, &cp, 0)) > 0) {
if (*cp && toupper(*cp) == 'M')
- size *= 2048;
+ size *= ONE_MEG;
Create_Chunk(d, chunk_info[current_chunk]->offset, size, freebsd, 3,
(chunk_info[current_chunk]->flags & CHUNK_ALIGN));
+ variable_set2(DISK_PARTITIONED, "yes");
record_chunks(d);
}
}
@@ -218,6 +383,7 @@ diskPartition(Disk *d)
msg = "Partition is already unused!";
else {
Delete_Chunk(d, chunk_info[current_chunk]);
+ variable_set2(DISK_PARTITIONED, "yes");
record_chunks(d);
}
break;
@@ -226,40 +392,74 @@ diskPartition(Disk *d)
char *val, geometry[80];
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.\nDon't forget to use the two slash (/) separator characters!\nIt's not possible to parse the field without them.");
+ 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) {
d->bios_cyl = strtol(val, &val, 0);
d->bios_hd = strtol(val + 1, &val, 0);
d->bios_sect = strtol(val + 1, 0, 0);
}
}
- break;
-
- case 'S':
- /* Set Bootable */
- chunk_info[current_chunk]->flags |= CHUNK_ACTIVE;
- break;
-
- case 'U':
- Free_Disk(d);
- d = Open_Disk(name);
- if (!d)
- msgFatal("Can't reopen disk %s!", name);
+ break;
+
+ case 'S':
+ /* Set Bootable */
+ chunk_info[current_chunk]->flags |= CHUNK_ACTIVE;
+ break;
+
+ case 'U':
+ clear();
+ if (msgYesNo("Are you SURE you want to Undo everything?"))
+ break;
+ d = Open_Disk(d->name);
+ if (!d) {
+ dialog_clear();
+ msgConfirm("Can't reopen disk %s! Internal state is probably corrupted", d->name);
+ return;
+ }
+ Free_Disk(dev->private);
+ dev->private = d;
+ variable_unset(DISK_PARTITIONED);
record_chunks(d);
break;
case 'W':
- if (!msgYesNo("Are you sure you want to write this now? You do also\nhave the option of not modifying the disk until *all*\nconfiguration information has been entered, at which\npoint you can do it all at once. If you're unsure, then\nchoose No at this dialog."))
- diskPartitionWrite(NULL);
+ if (!msgYesNo("Are you SURE you want to write this now? You do also\n"
+ "have the option of not modifying the disk until *all*\n"
+ "configuration information has been entered, at which\n"
+ "point you can do it all at once. If you're unsure, then\n"
+ "PLEASE CHOOSE NO at this dialog! This option is DANGEROUS\n"
+ "if you do not know EXACTLY what you are doing!")) {
+ variable_set2(DISK_PARTITIONED, "yes");
+ clear();
+
+ /* 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 ((d->chunks->part->flags & CHUNK_FORCE_ALL) != CHUNK_FORCE_ALL
+ && (mbrContents = getBootMgr(d->name)) != NULL)
+ Set_Boot_Mgr(d, mbrContents);
+
+ if (diskPartitionWrite(NULL) != RET_SUCCESS) {
+ dialog_clear();
+ msgConfirm("Disk partition write returned an error status!");
+ }
+ else {
+ msgConfirm("Wrote FDISK partition information out successfully.");
+ }
+ }
break;
case '|':
- if (!msgYesNo("Are you sure you want to go into Wizard mode?\nNo seat belts whatsoever are provided!")) {
+ if (!msgYesNo("Are you SURE you want to go into Wizard mode?\n"
+ "No seat belts whatsoever are provided!")) {
dialog_clear();
end_dialog();
DialogActive = FALSE;
slice_wizard(d);
+ variable_set2(DISK_PARTITIONED, "yes");
dialog_clear();
DialogActive = TRUE;
record_chunks(d);
@@ -270,6 +470,14 @@ diskPartition(Disk *d)
case 'Q':
chunking = FALSE;
+ clear();
+ /* 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 ((d->chunks->part->flags & CHUNK_FORCE_ALL) != CHUNK_FORCE_ALL
+ && (mbrContents = getBootMgr(d->name)) != NULL)
+ Set_Boot_Mgr(d, mbrContents);
break;
default:
@@ -280,12 +488,11 @@ diskPartition(Disk *d)
}
p = CheckRules(d);
if (p) {
+ dialog_clear();
msgConfirm(p);
free(p);
}
dialog_clear();
- variable_set2(DISK_PARTITIONED, "yes");
- return d;
}
static int
@@ -309,13 +516,16 @@ partitionHook(char *str)
}
devs = deviceFind(str, DEVICE_TYPE_DISK);
if (!devs) {
+ dialog_clear();
msgConfirm("Unable to find disk %s!", str);
return 0;
}
- else if (devs[1])
+ else if (devs[1]) {
+ dialog_clear();
msgConfirm("Bizarre multiple match for %s!", str);
- devs[0]->private = diskPartition((Disk *)devs[0]->private);
+ }
devs[0]->enabled = TRUE;
+ diskPartition(devs[0], (Disk *)devs[0]->private);
str = cp;
}
return devs ? 1 : 0;
@@ -326,65 +536,73 @@ diskPartitionEditor(char *str)
{
DMenu *menu;
Device **devs;
- int cnt;
+ int i, cnt;
+ char *cp;
- devs = deviceFind(NULL, DEVICE_TYPE_DISK);
+ cp = variable_get(VAR_DISK);
+ devs = deviceFind(cp, DEVICE_TYPE_DISK);
cnt = deviceCount(devs);
if (!cnt) {
- msgConfirm("No disks found! Please verify that your disk controller is being\nproperly probed at boot time. See the Hardware Guide on the Documentation menu\nfor clues on diagnosing this type of problem.");
- return 0;
+ dialog_clear();
+ 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.");
+ i = RET_FAIL;
}
else if (cnt == 1) {
- devs[0]->private = diskPartition((Disk *)devs[0]->private);
devs[0]->enabled = TRUE;
+ if (str && !strcmp(str, "script"))
+ scriptPartition(devs[0], (Disk *)devs[0]->private);
+ else
+ diskPartition(devs[0], (Disk *)devs[0]->private);
+ i = RET_SUCCESS;
+ variable_set2(DISK_SELECTED, "yes");
}
else {
menu = deviceCreateMenu(&MenuDiskDevices, DEVICE_TYPE_DISK, partitionHook);
- if (!menu)
- msgConfirm("No devices suitable for installation found!\n\nPlease verify that your disk controller (and attached drives) were detected properly. This can be done by selecting the ``Bootmsg'' option on the main menu and reviewing the boot messages carefully.");
+ if (!menu) {
+ dialog_clear();
+ 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.");
+ i = RET_FAIL;
+ }
else {
- dmenuOpenSimple(menu);
+ if (!dmenuOpenSimple(menu))
+ i = RET_FAIL;
+ else {
+ i = RET_SUCCESS;
+ variable_set2(DISK_SELECTED, "yes");
+ }
free(menu);
}
}
- return 0;
-}
-
-static u_char *
-getBootMgr(void)
-{
- extern u_char mbr[], bteasy17[];
-
- /* Figure out what kind of MBR the user wants */
- if (dmenuOpenSimple(&MenuMBRType)) {
- switch (BootMgr) {
- case 0:
- return bteasy17;
-
- case 1:
- return mbr;
-
- case 2:
- default:
- break;
- }
- }
- return NULL;
+ return i;
}
int
diskPartitionWrite(char *str)
{
extern u_char boot1[], boot2[];
- u_char *mbrContents;
Device **devs;
+ char *cp;
int i;
- mbrContents = getBootMgr();
+ if ((cp = variable_get(DISK_PARTITIONED)) && strcmp(cp, "yes"))
+ return RET_SUCCESS;
+ else if (!cp) {
+ dialog_clear();
+ msgConfirm("You must partition the disk(s) before this option can be used.");
+ return RET_FAIL;
+ }
+
devs = deviceFind(NULL, DEVICE_TYPE_DISK);
if (!devs) {
+ dialog_clear();
msgConfirm("Unable to find any disks to write to??");
- return 0;
+ return RET_FAIL;
}
for (i = 0; devs[i]; i++) {
@@ -394,16 +612,13 @@ diskPartitionWrite(char *str)
if (!devs[i]->enabled)
continue;
- /* Do it once so that it only goes on the first drive */
- if (mbrContents) {
- Set_Boot_Mgr(d, mbrContents);
- mbrContents = NULL;
- }
-
Set_Boot_Blocks(d, boot1, boot2);
msgNotify("Writing partition information to drive %s", d->name);
- Write_Disk(d);
-
+ if (Write_Disk(d)) {
+ dialog_clear();
+ msgConfirm("ERROR: Unable to write data to disk %s!", d->name);
+ return RET_FAIL;
+ }
/* Now scan for bad blocks, if necessary */
for (c1 = d->chunks->part; c1; c1 = c1->next) {
if (c1->flags & CHUNK_BAD144) {
@@ -411,13 +626,19 @@ diskPartitionWrite(char *str)
msgNotify("Running bad block scan on partition %s", c1->name);
ret = vsystem("bad144 -v /dev/r%s 1234", c1->name);
- if (ret)
+ if (ret) {
+ dialog_clear();
msgConfirm("Bad144 init on %s returned status of %d!", c1->name, ret);
+ }
ret = vsystem("bad144 -v -s /dev/r%s", c1->name);
- if (ret)
+ if (ret) {
+ dialog_clear();
msgConfirm("Bad144 scan on %s returned status of %d!", c1->name, ret);
+ }
}
}
}
- return 0;
+ /* Now it's not "yes", but "written" */
+ variable_set2(DISK_PARTITIONED, "written");
+ return RET_SUCCESS;
}
diff --git a/release/sysinstall/dist.c b/release/sysinstall/dist.c
index 539fc61..d01c84f 100644
--- a/release/sysinstall/dist.c
+++ b/release/sysinstall/dist.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: dist.c,v 1.36.2.1 1995/07/21 10:53:48 rgrimes Exp $
+ * $Id: dist.c,v 1.37 1995/09/18 16:52:24 peter Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -80,7 +80,7 @@ static Distribution DistTable[] = {
{ "compat20", "/", &Dists, DIST_COMPAT20, NULL },
{ "commerce", "/usr/local", &Dists, DIST_COMMERCIAL, NULL },
{ "xperimnt", "/usr/local", &Dists, DIST_EXPERIMENTAL, NULL },
-{ "XF86311", "/usr", &Dists, DIST_XF86, XF86DistTable },
+{ "XF86312", "/usr", &Dists, DIST_XF86, XF86DistTable },
{ NULL },
};
@@ -110,23 +110,27 @@ static Distribution SrcDistTable[] = {
{ "ssys", "/usr/src", &SrcDists, DIST_SRC_SYS, NULL },
{ "subin", "/usr/src", &SrcDists, DIST_SRC_UBIN, NULL },
{ "susbin", "/usr/src", &SrcDists, DIST_SRC_USBIN, NULL },
+{ "ssmailcf", "/usr/src", &SrcDists, DIST_SRC_SMAILCF, NULL },
{ NULL },
};
/* The XFree86 distribution */
static Distribution XF86DistTable[] = {
-{ "X311bin", "/usr", &XF86Dists, DIST_XF86_BIN, NULL },
-{ "X311lib", "/usr", &XF86Dists, DIST_XF86_LIB, NULL },
-{ "X311doc", "/usr", &XF86Dists, DIST_XF86_DOC, NULL },
-{ "XF86311", "/usr", &XF86Dists, DIST_XF86_FONTS, XF86FontDistTable },
-{ "X311man", "/usr", &XF86Dists, DIST_XF86_MAN, NULL },
-{ "X311prog", "/usr", &XF86Dists, DIST_XF86_PROG, NULL },
-{ "X311link", "/usr", &XF86Dists, DIST_XF86_LINK, NULL },
-{ "X311pex", "/usr", &XF86Dists, DIST_XF86_PEX, NULL },
-{ "X311lbx", "/usr", &XF86Dists, DIST_XF86_LBX, NULL },
-{ "X311xicf", "/usr", &XF86Dists, DIST_XF86_XINIT, NULL },
-{ "X311xdcf", "/usr", &XF86Dists, DIST_XF86_XDMCF, NULL },
-{ "XF86311", "/usr", &XF86Dists, DIST_XF86_SERVER, XF86ServerDistTable },
+{ "X312bin", "/usr", &XF86Dists, DIST_XF86_BIN, NULL },
+{ "X312lib", "/usr", &XF86Dists, DIST_XF86_LIB, NULL },
+{ "X312doc", "/usr", &XF86Dists, DIST_XF86_DOC, NULL },
+{ "X312etc", "/usr", &XF86Dists, DIST_XF86_ETC, NULL },
+{ "XF86312", "/usr", &XF86Dists, DIST_XF86_FONTS, XF86FontDistTable },
+{ "X312man", "/usr", &XF86Dists, DIST_XF86_MAN, NULL },
+{ "X312ctrb", "/usr", &XF86Dists, DIST_XF86_CTRB, NULL },
+{ "X312prog", "/usr", &XF86Dists, DIST_XF86_PROG, NULL },
+{ "X312link", "/usr", &XF86Dists, DIST_XF86_LINK, NULL },
+{ "X312pex", "/usr", &XF86Dists, DIST_XF86_PEX, NULL },
+{ "X312lbx", "/usr", &XF86Dists, DIST_XF86_LBX, NULL },
+{ "X312ubin", "/usr", &XF86Dists, DIST_XF86_UBIN, NULL },
+{ "X312xicf", "/usr", &XF86Dists, DIST_XF86_XINIT, NULL },
+{ "X312xdcf", "/usr", &XF86Dists, DIST_XF86_XDMCF, NULL },
+{ "XF86312", "/usr", &XF86Dists, DIST_XF86_SERVER, XF86ServerDistTable },
{ "XF86-xc", "/usr/X11R6/src", &XF86Dists, DIST_XF86_SRC, NULL },
{ "XF86-co", "/usr/X11R6/src", &XF86Dists, DIST_XF86_SRC, NULL },
{ NULL },
@@ -134,28 +138,29 @@ static Distribution XF86DistTable[] = {
/* The XFree86 server distribution */
static Distribution XF86ServerDistTable[] = {
-{ "X3118514", "/usr", &XF86ServerDists, DIST_XF86_SERVER_8514, NULL },
-{ "X311AGX", "/usr", &XF86ServerDists, DIST_XF86_SERVER_AGX, NULL },
-{ "X311Ma8", "/usr", &XF86ServerDists, DIST_XF86_SERVER_MACH8, NULL },
-{ "X311Ma32", "/usr", &XF86ServerDists, DIST_XF86_SERVER_MACH32,NULL },
-{ "X311Ma64", "/usr", &XF86ServerDists, DIST_XF86_SERVER_MACH64,NULL },
-{ "X311Mono", "/usr", &XF86ServerDists, DIST_XF86_SERVER_MONO, NULL },
-{ "X311P9K", "/usr", &XF86ServerDists, DIST_XF86_SERVER_P9000, NULL },
-{ "X311S3", "/usr", &XF86ServerDists, DIST_XF86_SERVER_S3, NULL },
-{ "X311SVGA", "/usr", &XF86ServerDists, DIST_XF86_SERVER_SVGA, NULL },
-{ "X311VG16", "/usr", &XF86ServerDists, DIST_XF86_SERVER_VGA16, NULL },
-{ "X311W32", "/usr", &XF86ServerDists, DIST_XF86_SERVER_W32, NULL },
-{ "X311nest", "/usr", &XF86ServerDists, DIST_XF86_SERVER_NEST, NULL },
+{ "X3128514", "/usr", &XF86ServerDists, DIST_XF86_SERVER_8514, NULL },
+{ "X312AGX", "/usr", &XF86ServerDists, DIST_XF86_SERVER_AGX, NULL },
+{ "X312Ma8", "/usr", &XF86ServerDists, DIST_XF86_SERVER_MACH8, NULL },
+{ "X312Ma32", "/usr", &XF86ServerDists, DIST_XF86_SERVER_MACH32,NULL },
+{ "X312Ma64", "/usr", &XF86ServerDists, DIST_XF86_SERVER_MACH64,NULL },
+{ "X312Mono", "/usr", &XF86ServerDists, DIST_XF86_SERVER_MONO, NULL },
+{ "X312P9K", "/usr", &XF86ServerDists, DIST_XF86_SERVER_P9000, NULL },
+{ "X312S3", "/usr", &XF86ServerDists, DIST_XF86_SERVER_S3, NULL },
+{ "X312SVGA", "/usr", &XF86ServerDists, DIST_XF86_SERVER_SVGA, NULL },
+{ "X312VG16", "/usr", &XF86ServerDists, DIST_XF86_SERVER_VGA16, NULL },
+{ "X312W32", "/usr", &XF86ServerDists, DIST_XF86_SERVER_W32, NULL },
+{ "X312nest", "/usr", &XF86ServerDists, DIST_XF86_SERVER_NEST, NULL },
{ NULL },
};
/* The XFree86 font distribution */
static Distribution XF86FontDistTable[] = {
-{ "X311fnts", "/usr", &XF86FontDists, DIST_XF86_FONTS_MISC, NULL },
-{ "X311f100", "/usr", &XF86FontDists, DIST_XF86_FONTS_100, NULL },
-{ "X311fscl", "/usr", &XF86FontDists, DIST_XF86_FONTS_SCALE, NULL },
-{ "X311fnon", "/usr", &XF86FontDists, DIST_XF86_FONTS_NON, NULL },
-{ "X311fsrv", "/usr", &XF86FontDists, DIST_XF86_FONTS_SERVER, NULL },
+{ "X312fnts", "/usr", &XF86FontDists, DIST_XF86_FONTS_MISC, NULL },
+{ "X312f100", "/usr", &XF86FontDists, DIST_XF86_FONTS_100, NULL },
+{ "X312fcyr", "/usr", &XF86FontDists, DIST_XF86_FONTS_CYR, NULL },
+{ "X312fscl", "/usr", &XF86FontDists, DIST_XF86_FONTS_SCALE, NULL },
+{ "X312fnon", "/usr", &XF86FontDists, DIST_XF86_FONTS_NON, NULL },
+{ "X312fsrv", "/usr", &XF86FontDists, DIST_XF86_FONTS_SERVER, NULL },
{ NULL },
};
@@ -167,7 +172,7 @@ distReset(char *str)
XF86Dists = 0;
XF86ServerDists = 0;
XF86FontDists = 0;
- return 0;
+ return RET_SUCCESS;
}
int
@@ -176,7 +181,7 @@ distSetDeveloper(char *str)
distReset(NULL);
Dists = _DIST_DEVELOPER;
SrcDists = DIST_SRC_ALL;
- return 0;
+ return RET_SUCCESS;
}
int
@@ -189,7 +194,7 @@ distSetXDeveloper(char *str)
XF86ServerDists = DIST_XF86_SERVER_SVGA;
XF86FontDists = DIST_XF86_FONTS_MISC;
distSetXF86(NULL);
- return 0;
+ return RET_SUCCESS;
}
int
@@ -198,7 +203,7 @@ distSetKernDeveloper(char *str)
distReset(NULL);
Dists = _DIST_DEVELOPER;
SrcDists = DIST_SRC_SYS;
- return 0;
+ return RET_SUCCESS;
}
int
@@ -206,7 +211,7 @@ distSetUser(char *str)
{
distReset(NULL);
Dists = _DIST_USER;
- return 0;
+ return RET_SUCCESS;
}
int
@@ -218,7 +223,7 @@ distSetXUser(char *str)
XF86ServerDists = DIST_XF86_SERVER_SVGA;
XF86FontDists = DIST_XF86_FONTS_MISC;
distSetXF86(NULL);
- return 0;
+ return RET_SUCCESS;
}
int
@@ -226,7 +231,7 @@ distSetMinimum(char *str)
{
distReset(NULL);
Dists = DIST_BIN;
- return 0;
+ return RET_SUCCESS;
}
int
@@ -237,16 +242,33 @@ distSetEverything(char *str)
XF86Dists = DIST_XF86_ALL;
XF86ServerDists = DIST_XF86_SERVER_ALL;
XF86FontDists = DIST_XF86_FONTS_ALL;
- return 0;
+ return RET_SUCCESS;
+}
+
+int
+distSetCustom(char *str)
+{
+ /* These *ALL* have to be set at once. It's for power users only! :) */
+ if (sscanf(str, "%d %d %d %d %d %d",
+ &Dists, &DESDists, &SrcDists, &XF86Dists, &XF86ServerDists, &XF86FontDists) != 6) {
+ dialog_clear();
+ msgConfirm("Warning: A `%s' set was configured which did not set all\n"
+ "distributions explicitly. Some distributions will default to\n"
+ "unselected as a result.", str);
+ }
+ return RET_SUCCESS;
}
int
distSetDES(char *str)
{
dmenuOpenSimple(&MenuDESDistributions);
- if (DESDists)
+ if (DESDists) {
+ if (DESDists & DIST_DES_KERBEROS)
+ DESDists |= DIST_DES_DES;
Dists |= DIST_DES;
- return 0;
+ }
+ return RET_SUCCESS;
}
int
@@ -255,7 +277,7 @@ distSetSrc(char *str)
dmenuOpenSimple(&MenuSrcDistributions);
if (SrcDists)
Dists |= DIST_SRC;
- return 0;
+ return RET_SUCCESS;
}
int
@@ -271,7 +293,7 @@ distSetXF86(char *str)
if (isDebug())
msgDebug("SetXF86 Masks: Server: %0x, Fonts: %0x, XDists: %0x, Dists: %0x\n",
XF86ServerDists, XF86FontDists, XF86Dists, Dists);
- return 0;
+ return RET_SUCCESS;
}
static Boolean
@@ -312,43 +334,46 @@ distExtract(char *parent, Distribution *me)
snprintf(buf, 512, "%s/%s.tgz", path, dist);
if (isDebug())
msgDebug("Trying to get large piece: %s\n", buf);
- /* Set it as an "exploratory get" so that we don't loop unnecessarily on it */
- mediaDevice->flags |= OPT_EXPLORATORY_GET;
- fd = (*mediaDevice->get)(mediaDevice, buf, NULL);
- mediaDevice->flags &= ~OPT_EXPLORATORY_GET;
+ fd = mediaDevice->get(mediaDevice, buf, TRUE);
if (fd >= 0) {
msgNotify("Extracting %s into %s directory...", me[i].my_name, me[i].my_dir);
status = mediaExtractDist(me[i].my_dir, fd);
- (*mediaDevice->close)(mediaDevice, fd);
+ mediaDevice->close(mediaDevice, fd);
goto done;
}
- else if (fd == -2) /* Hard error, can't continue */
- return FALSE;
+ else if (fd == -2) { /* Hard error, can't continue */
+ mediaDevice->shutdown(mediaDevice);
+ status = FALSE;
+ goto done;
+ }
+
+ /*
+ * If we couldn't get it as one file then we need to get multiple pieces; locate and parse an
+ * info file telling us how many we need for this distribution.
+ */
+ dist_attr = NULL;
+ numchunks = 0;
- /* If we couldn't get it as one file then we need to get multiple pieces; get info file telling us how many */
snprintf(buf, sizeof buf, "/stand/info/%s/%s.inf", path, dist);
- if (!access(buf, R_OK)) {
+ if (file_readable(buf)) {
if (isDebug())
- msgDebug("Parsing attributes file for %s\n", dist);
+ msgDebug("Parsing attributes file for distribution %s\n", dist);
dist_attr = safe_malloc(sizeof(Attribs) * MAX_ATTRIBS);
- if (attr_parse(&dist_attr, buf) == 0) {
- msgConfirm("Cannot load information file for %s distribution!\nPlease verify that your media is valid and try again.", dist);
- return FALSE;
+ if (attr_parse_file(dist_attr, buf) == RET_FAIL) {
+ dialog_clear();
+ msgConfirm("Cannot load information file for %s distribution!\n"
+ "Please verify that your media is valid and try again.", dist);
}
-
- if (isDebug())
- msgDebug("Looking for attribute `pieces'\n");
- tmp = attr_match(dist_attr, "pieces");
- if (tmp)
- numchunks = strtol(tmp, 0, 0);
- else
- numchunks = 0;
- }
- else {
- if (isDebug())
- msgDebug("Couldn't open attributes file: %s\n", buf);
- numchunks = 0;
+ else {
+ if (isDebug())
+ msgDebug("Looking for attribute `pieces'\n");
+ tmp = attr_match(dist_attr, "pieces");
+ if (tmp)
+ numchunks = strtol(tmp, 0, 0);
+ }
+ safe_free(dist_attr);
}
+
if (!numchunks)
continue;
@@ -364,8 +389,8 @@ distExtract(char *parent, Distribution *me)
snprintf(buf, 512, "%s/%s.%c%c", path, dist, (chunk / 26) + 'a', (chunk % 26) + 'a');
if (isDebug())
- msgDebug("trying for piece %d of %d: %s\n", chunk, numchunks, buf);
- fd = (*mediaDevice->get)(mediaDevice, buf, dist_attr);
+ msgDebug("trying for piece %d of %d: %s\n", chunk + 1, numchunks, buf);
+ fd = mediaDevice->get(mediaDevice, buf, FALSE);
if (fd < 0) {
dialog_clear();
msgConfirm("failed to retreive piece file %s!\nAborting the transfer", buf);
@@ -373,18 +398,17 @@ distExtract(char *parent, Distribution *me)
}
snprintf(prompt, 80, "Extracting %s into %s directory...", me[i].my_name, me[i].my_dir);
dialog_gauge("Progress", prompt, 8, 15, 6, 50, (int)((float)(chunk + 1) / numchunks * 100));
+ move(0, 0); /* Get cursor out of the way - it makes gauges look strange */
while ((n = read(fd, buf, sizeof buf)) > 0) {
retval = write(fd2, buf, n);
if (retval != n) {
- if (mediaDevice->close)
- (*mediaDevice->close)(mediaDevice, fd);
- else
- close(fd);
+ mediaDevice->close(mediaDevice, fd);
+ dialog_clear();
msgConfirm("Write failure on transfer! (wrote %d bytes of %d bytes)", retval, n);
goto punt;
}
}
- (*mediaDevice->close)(mediaDevice, fd);
+ mediaDevice->close(mediaDevice, fd);
}
close(fd2);
status = mediaExtractDistEnd(zpid, cpid);
@@ -397,15 +421,23 @@ distExtract(char *parent, Distribution *me)
done:
if (!status) {
- if (OptFlags & OPT_NO_CONFIRM)
+ if (variable_get(VAR_NO_CONFIRM))
status = TRUE;
else {
if (me[i].my_dist) {
- msgConfirm("Unable to transfer all components of the %s distribution.\nIf this is a CDROM install, it may be because export restrictions prohibit\nDES code from being shipped from the U.S. Try to get this code from a\nlocal FTP site instead!");
+ dialog_clear();
+ msgConfirm("Unable to transfer all components of the %s distribution.\n"
+ "If this is a CDROM install, it may be because export restrictions prohibit\n"
+ "DES code from being shipped from the U.S. Try to get this code from a\n"
+ "local FTP site instead!", me[i].my_name);
status = TRUE;
}
- else
- status = msgYesNo("Unable to transfer the %s distribution from %s.\nDo you want to try to retrieve it again?", me[i].my_name, mediaDevice->name);
+ else {
+ dialog_clear();
+ status = msgYesNo("Unable to transfer the %s distribution from %s.\n"
+ "Do you want to try to retrieve it again?",
+ me[i].my_name, mediaDevice->name);
+ }
}
}
/* Extract was successful, remove ourselves from further consideration */
@@ -415,24 +447,58 @@ distExtract(char *parent, Distribution *me)
return status;
}
+static void
+printSelected(char *buf, int selected, Distribution *me)
+{
+ int i;
+ static int col = 0;
+
+ /* Loop through to see if we're in our parent's plans */
+ for (i = 0; me[i].my_name; i++) {
+
+ /* If our bit isn't set, go to the next */
+ if (!(me[i].my_bit & selected))
+ continue;
+
+ /* This is shorthand for "dist currently disabled" */
+ if (!me[i].my_dir)
+ continue;
+
+ col += strlen(me[i].my_name);
+ if (col > 50) {
+ col = 0;
+ strcat(buf, "\n");
+ }
+ sprintf(&buf[strlen(buf)], " %s", me[i].my_name);
+ /* Recurse if have a sub-distribution */
+ if (me[i].my_dist)
+ printSelected(buf, *(me[i].my_mask), me[i].my_dist);
+ }
+}
+
int
-distExtractAll(char *unused)
+distExtractAll(char *ptr)
{
int retries = 0;
+ char buf[512];
/* First try to initialize the state of things */
- if (!(*mediaDevice->init)(mediaDevice))
- return 0;
-
+ if (!mediaDevice->init(mediaDevice))
+ return RET_FAIL;
+ if (!Dists && ptr) {
+ msgConfirm("You haven't selected any distributions to extract.");
+ return RET_FAIL;
+ }
/* Try for 3 times around the loop, then give up. */
while (Dists && ++retries < 3)
distExtract(NULL, DistTable);
- /* Anything left? */
- if (Dists)
- msgConfirm("Couldn't extract all of the distributions. This may\nbe because the specified distributions are not available from the\ninstallation media you've chosen (residue: %0x)", Dists);
-
- /* Close up shop and go home */
- (*mediaDevice->shutdown)(mediaDevice);
- return 0;
+ if (Dists) {
+ printSelected(buf, Dists, DistTable);
+ dialog_clear();
+ msgConfirm("Couldn't extract all of the distributions. This may\n"
+ "be because the following distributions are not available on the\n"
+ "installation media you've chosen:\n\n\t%s", buf);
+ }
+ return RET_SUCCESS;
}
diff --git a/release/sysinstall/dist.h b/release/sysinstall/dist.h
index eaab90b..b923d87 100644
--- a/release/sysinstall/dist.h
+++ b/release/sysinstall/dist.h
@@ -47,21 +47,25 @@
#define DIST_SRC_UBIN 0x1000
#define DIST_SRC_USBIN 0x2000
#define DIST_SRC_BIN 0x4000
-#define DIST_SRC_ALL 0xFFFF
+#define DIST_SRC_SMAILCF 0x8000
+#define DIST_SRC_ALL 0x7FFF /* no SMAILCF, it's part of USBIN */
/* Subtypes for XFree86 distribution */
#define DIST_XF86_BIN 0x0001
#define DIST_XF86_LIB 0x0002
#define DIST_XF86_DOC 0x0004
-#define DIST_XF86_MAN 0x0008
-#define DIST_XF86_PROG 0x0010
-#define DIST_XF86_LINK 0x0020
-#define DIST_XF86_PEX 0x0040
-#define DIST_XF86_LBX 0x0080
-#define DIST_XF86_XINIT 0x0100
-#define DIST_XF86_XDMCF 0x0200
-#define DIST_XF86_SRC 0x0400
-#define DIST_XF86_SERVER 0x0800
+#define DIST_XF86_ETC 0x0008
+#define DIST_XF86_MAN 0x0010
+#define DIST_XF86_CTRB 0x0020
+#define DIST_XF86_PROG 0x0040
+#define DIST_XF86_LINK 0x0080
+#define DIST_XF86_UBIN 0x0100
+#define DIST_XF86_PEX 0x0200
+#define DIST_XF86_LBX 0x0400
+#define DIST_XF86_XINIT 0x0800
+#define DIST_XF86_XDMCF 0x1000
+#define DIST_XF86_SRC 0x2000
+#define DIST_XF86_SERVER 0x4000
#define DIST_XF86_SERVER_8514 0x0001
#define DIST_XF86_SERVER_AGX 0x0002
#define DIST_XF86_SERVER_MACH8 0x0004
@@ -75,13 +79,14 @@
#define DIST_XF86_SERVER_W32 0x0400
#define DIST_XF86_SERVER_NEST 0x0800
#define DIST_XF86_SERVER_ALL 0x0FFF
-#define DIST_XF86_FONTS 0x1000
+#define DIST_XF86_FONTS 0x8000
#define DIST_XF86_FONTS_MISC 0x0001
#define DIST_XF86_FONTS_100 0x0002
-#define DIST_XF86_FONTS_SCALE 0x0004
-#define DIST_XF86_FONTS_NON 0x0008
-#define DIST_XF86_FONTS_SERVER 0x0010
-#define DIST_XF86_FONTS_ALL 0x00FF
+#define DIST_XF86_FONTS_CYR 0x0004
+#define DIST_XF86_FONTS_SCALE 0x0008
+#define DIST_XF86_FONTS_NON 0x0010
+#define DIST_XF86_FONTS_SERVER 0x0020
+#define DIST_XF86_FONTS_ALL 0x003F
#define DIST_XF86_ALL 0xFFFF
#endif
diff --git a/release/sysinstall/dmenu.c b/release/sysinstall/dmenu.c
index ff059c7..333f9b5 100644
--- a/release/sysinstall/dmenu.c
+++ b/release/sysinstall/dmenu.c
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated for what's essentially a complete rewrite.
*
- * $Id: dmenu.c,v 1.11.2.11 1995/06/10 19:44:54 jkh Exp $
+ * $Id: dmenu.c,v 1.12.2.5 1995/10/19 15:55:00 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -44,7 +44,7 @@
#include "sysinstall.h"
#include <sys/types.h>
-#define MAX_MENU 8
+#define MAX_MENU 15
/* Traverse menu but give user no control over positioning */
Boolean
@@ -68,19 +68,24 @@ dmenuFlagCheck(DMenuItem *item)
char *
dmenuVarCheck(DMenuItem *item)
{
- char *cp, *cp2, tmp[256];
+ char *w, *cp, *cp2, tmp[256];
- strncpy(tmp, (char *)item->ptr, 256);
+ w = (char *)item->parm;
+ if (!w)
+ w = (char *)item->ptr;
+ if (!w)
+ return "OFF";
+ strncpy(tmp, w, 256);
if ((cp = index(tmp, '=')) != NULL) {
- *(cp++) = '\0';
- cp2 = getenv(tmp);
- if (cp2)
- return !strcmp(cp, cp2) ? "ON" : "OFF";
- else
- return "OFF";
+ *(cp++) = '\0';
+ cp2 = getenv(tmp);
+ if (cp2)
+ return !strcmp(cp, cp2) ? "ON" : "OFF";
+ else
+ return "OFF";
}
else
- return getenv(tmp) ? "ON" : "OFF";
+ return getenv(tmp) ? "ON" : "OFF";
}
char *
@@ -100,6 +105,19 @@ checkHookVal(DMenuItem *item)
return (*item->check)(item);
}
+static int
+menu_height(DMenu *menu, int n)
+{
+ int max;
+ char *t;
+
+ for (t = menu->title, max = MAX_MENU; *t; t++) {
+ if (*t == '\n')
+ --max;
+ }
+ return n > max ? max : n;
+}
+
/* Traverse over an internal menu */
Boolean
dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max)
@@ -128,18 +146,17 @@ dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max)
use_helpfile(systemHelpFile(menu->helpfile, buf));
/* Pop up that dialog! */
- if (menu->options & DMENU_NORMAL_TYPE) {
+ if (menu->options & DMENU_NORMAL_TYPE)
rval = dialog_menu((u_char *)menu->title, (u_char *)menu->prompt, -1, -1,
- n > MAX_MENU ? MAX_MENU : n, n, (u_char **)nitems, (u_char *)result, choice, scroll);
- }
- else if (menu->options & DMENU_RADIO_TYPE) {
+ menu_height(menu, n), n, (u_char **)nitems, (u_char *)result, choice, scroll);
+
+ else if (menu->options & DMENU_RADIO_TYPE)
rval = dialog_radiolist((u_char *)menu->title, (u_char *)menu->prompt, -1, -1,
- n > MAX_MENU ? MAX_MENU : n, n, (u_char **)nitems, (u_char *)result);
- }
- else if (menu->options & DMENU_MULTIPLE_TYPE) {
+ menu_height(menu, n), n, (u_char **)nitems, (u_char *)result);
+
+ else if (menu->options & DMENU_MULTIPLE_TYPE)
rval = dialog_checklist((u_char *)menu->title, (u_char *)menu->prompt, -1, -1,
- n > MAX_MENU ? MAX_MENU : n, n, (u_char **)nitems, (u_char *)result);
- }
+ menu_height(menu, n), n, (u_char **)nitems, (u_char *)result);
/* This seems to be the only technique that works for getting the display to look right */
dialog_clear();
@@ -149,8 +166,7 @@ dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max)
if (menu->options & DMENU_CALL_FIRST)
tmp = &(menu->items[0]);
else {
- if (decode_and_dispatch_multiple(menu, result) ||
- menu->options & DMENU_SELECTION_RETURNS) {
+ if (decode_and_dispatch_multiple(menu, result) || menu->options & DMENU_SELECTION_RETURNS) {
items_free(nitems, curr, max);
return TRUE;
}
@@ -160,7 +176,7 @@ dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max)
if ((tmp = decode(menu, result)) == NULL)
return FALSE;
}
- if (dispatch(tmp, result) || (menu->options & DMENU_SELECTION_RETURNS)) {
+ if (dispatch(tmp, result) == RET_DONE || (menu->options & DMENU_SELECTION_RETURNS)) {
items_free(nitems, curr, max);
return TRUE;
}
diff --git a/release/sysinstall/dos.c b/release/sysinstall/dos.c
index d4a19a4..6e5f65d 100644
--- a/release/sysinstall/dos.c
+++ b/release/sysinstall/dos.c
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
- * $Id: dos.c,v 1.6.2.1 1995/07/21 10:53:52 rgrimes Exp $
+ * $Id: dos.c,v 1.7 1995/09/18 16:52:26 peter Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -66,7 +66,7 @@ mediaInitDOS(Device *dev)
if (!RunningAsInit || DOSMounted)
return TRUE;
- if (Mkdir("/dos", NULL))
+ if (Mkdir("/dos", NULL) != RET_SUCCESS)
return FALSE;
memset(&args, 0, sizeof(args));
@@ -75,22 +75,32 @@ mediaInitDOS(Device *dev)
args.mask = 0777;
if (mount(MOUNT_MSDOS, "/dos", MNT_RDONLY, (caddr_t)&args) == -1) {
- msgConfirm("Error mounting %s on /dos: %s (%u)\n", args.fspec, strerror(errno), errno);
+ dialog_clear();
+ msgConfirm("Error mounting %s on /dos: %s (%u)", args.fspec, strerror(errno), errno);
return FALSE;
}
+ else
+ msgDebug("Mounted DOS device (%s) on /dos.\n", args.fspec);
DOSMounted = TRUE;
return TRUE;
}
int
-mediaGetDOS(Device *dev, char *file, Attribs *dist_attrs)
+mediaGetDOS(Device *dev, char *file, Boolean tentative)
{
char buf[PATH_MAX];
+ msgDebug("Request for %s from DOS\n", file);
snprintf(buf, PATH_MAX, "/dos/freebsd/%s", file);
- if (!access(buf, R_OK))
+ if (file_readable(buf))
return open(buf, O_RDONLY);
snprintf(buf, PATH_MAX, "/dos/freebsd/dists/%s", file);
+ if (file_readable(buf))
+ return open(buf, O_RDONLY);
+ snprintf(buf, PATH_MAX, "/dos/%s", file);
+ if (file_readable(buf))
+ return open(buf, O_RDONLY);
+ snprintf(buf, PATH_MAX, "/dos/dists/%s", file);
return open(buf, O_RDONLY);
}
@@ -99,11 +109,13 @@ mediaShutdownDOS(Device *dev)
{
if (!RunningAsInit || !DOSMounted)
return;
- msgDebug("Unmounting /dos\n");
- if (unmount("/dos", MNT_FORCE) != 0)
- msgConfirm("Could not unmount the DOS partition: %s\n", strerror(errno));
+ msgDebug("Unmounting %s from /dos\n", dev->name);
+ if (unmount("/dos", MNT_FORCE) != 0) {
+ dialog_clear();
+ msgConfirm("Could not unmount the DOS partition: %s", strerror(errno));
+ }
if (isDebug())
- msgDebug("Unmount returned\n");
+ msgDebug("Unmount successful\n");
DOSMounted = FALSE;
return;
}
diff --git a/release/sysinstall/floppy.c b/release/sysinstall/floppy.c
index cf847de..f4512a2 100644
--- a/release/sysinstall/floppy.c
+++ b/release/sysinstall/floppy.c
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
- * $Id: floppy.c,v 1.6.2.17 1995/06/10 09:14:51 jkh Exp $
+ * $Id: floppy.c,v 1.7.2.8 1995/10/22 17:39:07 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -73,11 +73,11 @@ floppyChoiceHook(char *str)
string_prune(str);
str = string_skipwhite(str);
if (!*str)
- return 0;
+ return RET_FAIL;
devs = deviceFind(str, DEVICE_TYPE_FLOPPY);
if (devs)
floppyDev = devs[0];
- return devs ? 1 : 0;
+ return devs ? RET_DONE : RET_FAIL;
}
/* Our last-ditch routine for getting ROOT from a floppy */
@@ -93,11 +93,13 @@ getRootFloppy(void)
devs = deviceFind(NULL, DEVICE_TYPE_FLOPPY);
cnt = deviceCount(devs);
if (!cnt) {
+ dialog_clear();
msgConfirm("No floppy devices found! Something is seriously wrong!");
return -1;
}
else if (cnt == 1) {
floppyDev = devs[0];
+ dialog_clear();
msgConfirm("Please insert the ROOT floppy in %s and press [ENTER]", floppyDev->description);
}
else {
@@ -121,96 +123,75 @@ Boolean
mediaInitFloppy(Device *dev)
{
struct msdosfs_args dosargs;
+ struct ufs_args u_args;
if (floppyMounted)
return TRUE;
- if (Mkdir("/mnt", NULL)) {
+ if (Mkdir("/dist", NULL)) {
+ dialog_clear();
msgConfirm("Unable to make directory mountpoint for %s!", dev->devname);
return FALSE;
}
- if (!distWanted)
+ msgDebug("Init floppy called for %s distribution.\n", distWanted ? distWanted : "some");
+ if (!distWanted) {
+ dialog_clear();
msgConfirm("Please insert next floppy into %s", dev->description);
+ }
else {
+ dialog_clear();
msgConfirm("Please insert floppy containing %s into %s", distWanted, dev->description);
- distWanted = NULL;
}
+
memset(&dosargs, 0, sizeof dosargs);
dosargs.fspec = dev->devname;
dosargs.uid = dosargs.gid = 0;
dosargs.mask = 0777;
- if (mount(MOUNT_MSDOS, "/mnt", 0, (caddr_t)&dosargs) == -1) {
- msgConfirm("Error mounting floppy %s (%s) on /mnt : %s", dev->name, dev->devname, strerror(errno));
- return FALSE;
+
+ memset(&u_args, 0, sizeof(u_args));
+ u_args.fspec = dev->devname;
+
+ if (mount(MOUNT_MSDOS, "/dist", MNT_RDONLY, (caddr_t)&dosargs) == -1) {
+ if (mount(MOUNT_UFS, "/dist", MNT_RDONLY, (caddr_t)&u_args) == -1) {
+ dialog_clear();
+ msgConfirm("Error mounting floppy %s (%s) on /dist : %s", dev->name, dev->devname, strerror(errno));
+ return FALSE;
+ }
}
- if (isDebug())
- msgDebug("initFloppy: mounted floppy %s successfully on /mnt\n", dev->devname);
+ msgDebug("initFloppy: mounted floppy %s successfully on /dist\n", dev->devname);
floppyMounted = TRUE;
+ distWanted = NULL;
return TRUE;
}
int
-mediaGetFloppy(Device *dev, char *file, Attribs *dist_attrs)
+mediaGetFloppy(Device *dev, char *file, Boolean tentative)
{
char buf[PATH_MAX];
-#ifdef DO_CRC_CHECK
- char *extn, *var;
- const char *val;
- char attrib[10];
- u_long cval1, clen1, cval2, clen2;
-#endif
int fd;
int nretries = 5;
- snprintf(buf, PATH_MAX, "/mnt/%s", file);
+ snprintf(buf, PATH_MAX, "/dist/%s", file);
- if (access(buf, R_OK)) {
- if (dev->flags & OPT_EXPLORATORY_GET)
+ msgDebug("Request for %s from floppy on /dist, tentative is %d.\n", buf, tentative);
+ if (!file_readable(buf)) {
+ if (tentative)
return -1;
else {
- while (access(buf, R_OK) != 0) {
+ while (!file_readable(buf)) {
if (!--nretries) {
- msgConfirm("GetFloppy: Failed to get %s after retries;\ngiving up.", file);
+ dialog_clear();
+ msgConfirm("GetFloppy: Failed to get %s after retries;\ngiving up.", buf);
return -1;
}
distWanted = buf;
- (*dev->shutdown)(dev);
- if (!(dev->init)(dev))
+ mediaShutdownFloppy(dev);
+ if (!mediaInitFloppy(dev))
return -1;
}
}
}
-
fd = open(buf, O_RDONLY);
-#ifdef DO_CRC_CHECK
- if (dist_attrs != NULL && fd != -1) {
- extn = rindex(buf, '.');
- snprintf(attrib, 10, "cksum%s", extn);
- val = attr_match(dist_attrs, attrib);
- if (val != NULL) {
- if (isDebug())
- msgDebug("attr_match(%s,%s) returned `%s'\n", dist_attrs, attrib, val);
- var = strdup(val);
-
- cval1 = strtol(var, &extn, 10);
- clen1 = strtol(extn, NULL, 10);
-
- if (crc(fd, &cval2, &clen2) != 0) {
- msgConfirm("crc() of file `%s' failed!", file);
- close(fd);
- return -1;
- }
- if ((cval1 != cval2) || (clen1 != clen2)) {
- msgConfirm("Invalid file `%s' (checksum `%u %u' should be %s)", file, cval2, clen2, var);
- close(fd);
- return -1;
- }
- lseek(fd, 0, 0);
- }
- else
- msgNotify("No checksum information for file %s..", file);
- }
-#endif
return fd;
}
@@ -218,10 +199,12 @@ void
mediaShutdownFloppy(Device *dev)
{
if (floppyMounted) {
- if (unmount("/mnt", MNT_FORCE) != 0)
- msgDebug("Umount of floppy on /mnt failed: %s (%d)\n", strerror(errno), errno);
+ if (unmount("/dist", MNT_FORCE) != 0)
+ msgDebug("Umount of floppy on /dist failed: %s (%d)\n", strerror(errno), errno);
else {
floppyMounted = FALSE;
+ msgDebug("Floppy unmounted successfully.\n");
+ dialog_clear();
msgConfirm("You may remove the floppy from %s", dev->description);
}
}
diff --git a/release/sysinstall/ftp.c b/release/sysinstall/ftp.c
index 59ffb6f..e4b2c3e 100644
--- a/release/sysinstall/ftp.c
+++ b/release/sysinstall/ftp.c
@@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
- * $Id: ftp.c,v 1.13.2.9 1995/06/05 18:34:15 jkh Exp $
+ * $Id: ftp.c,v 1.14.2.1 1995/10/21 14:06:35 jkh Exp $
*
* Return values have been sanitized:
* -1 error, but you (still) have a session.
@@ -34,6 +34,9 @@
/* Handy global for us to stick the port # */
int FtpPort;
+/* How to see by a given code whether or not the connection has timed out */
+#define FTP_TIMEOUT(code) (code == 421)
+
#ifndef STANDALONE_FTP
#include "sysinstall.h"
#endif /*STANDALONE_FTP*/
@@ -288,7 +291,7 @@ FtpGet(FTP_t ftp, char *file)
return botch(ftp,"FtpGet","open");
if(ftp->binary) {
i = cmd(ftp,"TYPE I");
- if (i < 0)
+ if (i < 0 || FTP_TIMEOUT(i))
return zap(ftp);
if (i > 299)
return -1;
@@ -331,7 +334,7 @@ FtpGet(FTP_t ftp, char *file)
}
ftp->fd_xfer = s;
i = cmd(ftp,"RETR %s",file);
- if (i < 0) {
+ if (i < 0 || FTP_TIMEOUT(i)) {
close(s);
return zap(ftp);
}
@@ -374,11 +377,14 @@ FtpGet(FTP_t ftp, char *file)
close(s);
return zap(ftp);
}
- else if (i > 299) {
+ else if (i > 299 || FTP_TIMEOUT(i)) {
if (isDebug())
msgDebug("FTP: No such file %s, moving on.\n", file);
close(s);
- return -1;
+ if (FTP_TIMEOUT(i))
+ return zap(ftp);
+ else
+ return -1;
}
ftp->fd_xfer = accept(s, 0, 0);
if (ftp->fd_xfer < 0) {
diff --git a/release/sysinstall/ftp_strat.c b/release/sysinstall/ftp_strat.c
index fe017fe..513e0e8 100644
--- a/release/sysinstall/ftp_strat.c
+++ b/release/sysinstall/ftp_strat.c
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
- * $Id: ftp_strat.c,v 1.6.2.25 1995/06/07 09:53:14 jkh Exp $
+ * $Id: ftp_strat.c,v 1.7.2.40 1995/11/08 07:09:21 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -52,53 +52,69 @@
#include <netdb.h>
#include "ftp.h"
-Boolean ftpInitted;
+Boolean ftpInitted = FALSE;
static FTP_t ftp;
extern int FtpPort;
-int
-mediaSetFtpUserPass(char *str)
-{
- char *user, *pass;
-
- dialog_clear();
- if ((user = msgGetInput(getenv(FTP_USER), "Please enter the username you wish to login as")) != NULL)
- variable_set2(FTP_USER, user);
- if ((pass = msgGetInput(getenv(FTP_PASS), "Please enter the password for this user.\nWARNING: This password will echo on the screen!")) != NULL)
- variable_set2(FTP_PASS, pass);
- dialog_clear();
- return 0;
-}
+static char *lastRequest;
static Boolean
-get_new_host(Device *dev)
+get_new_host(Device *dev, Boolean tentative)
{
Boolean i;
+ int j;
char *oldTitle = MenuMediaFTP.title;
- Device *netDev = dev->private;
-
- MenuMediaFTP.title = "Connection timed out - please select another site";
- i = mediaSetFTP(NULL);
- MenuMediaFTP.title = oldTitle;
- if (i) {
- char *cp = getenv(FTP_USER);
+ char *cp = variable_get(VAR_FTP_ONERROR);
- if (cp && *cp)
- (void)mediaSetFtpUserPass(NULL);
- netDev->flags |= OPT_LEAVE_NETWORK_UP;
- (*dev->shutdown)(dev);
- i = (*dev->init)(dev);
- netDev->flags &= ~OPT_LEAVE_NETWORK_UP;
+ if (tentative || (cp && strcmp(cp, "reselect")))
+ i = TRUE;
+ else {
+ i = FALSE;
+ dialog_clear();
+ msgConfirm("The %s file failed to load from the FTP site you\n"
+ "selected. Please select another one from the FTP menu.", lastRequest ? lastRequest : "requested");
+ MenuMediaFTP.title = "Request failed - please select another site";
+ j = mediaSetFTP(NULL);
+ MenuMediaFTP.title = oldTitle;
+ if (j == RET_SUCCESS) {
+ /* Bounce the link if necessary */
+ if (ftpInitted) {
+ msgDebug("Bouncing FTP connection before reselecting new host.\n");
+ dev->shutdown(dev);
+ i = dev->init(dev);
+ }
+ }
+ else {
+ msgDebug("User elected not to reselect, shutting down open connection.\n");
+ dev->shutdown(dev);
+ }
}
return i;
}
-static Boolean HasDistsDir;
+/* Should we throw in the towel? */
+static Boolean
+ftpShouldAbort(Device *dev, int retries)
+{
+ char *cp, *cp2;
+ int maxretries, rval = FALSE;
+
+ cp = variable_get(VAR_FTP_ONERROR);
+ cp2 = variable_get(VAR_FTP_RETRIES);
+ maxretries = atoi(cp2);
+ if (retries > maxretries || (cp && !strcmp(cp, "abort"))) {
+ rval = TRUE;
+ if (isDebug())
+ msgDebug("Aborting FTP connection.\n");
+ dev->shutdown(dev);
+ }
+ return rval;
+}
Boolean
mediaInitFTP(Device *dev)
{
- int i, retries, max_retries = MAX_FTP_RETRIES;
+ int i, retries;
char *cp, *hostname, *dir;
char *user, *login_name, password[80], url[BUFSIZ];
Device *netDevice = (Device *)dev->private;
@@ -106,25 +122,29 @@ mediaInitFTP(Device *dev)
if (ftpInitted)
return TRUE;
- if (!(*netDevice->init)(netDevice))
+ if (isDebug())
+ msgDebug("Init routine for FTP called. Net device is %x\n", netDevice);
+ if (!netDevice->init(netDevice))
return FALSE;
- if ((ftp = FtpInit()) == NULL) {
+ if (!ftp && (ftp = FtpInit()) == NULL) {
+ dialog_clear();
msgConfirm("FTP initialisation failed!");
- goto punt;
+ return FALSE;
+ }
+ cp = variable_get(VAR_FTP_PATH);
+ if (!cp) {
+ dialog_clear();
+ msgConfirm("%s is not set!", VAR_FTP_PATH);
+ return FALSE;
}
if (isDebug())
- msgDebug("Initialized FTP library.\n");
-
- cp = getenv("ftp");
- if (!cp)
- goto punt;
- if (isDebug())
- msgDebug("Attempting to open connection for: %s\n", cp);
- hostname = getenv(VAR_HOSTNAME);
+ msgDebug("Attempting to open connection for URL: %s\n", cp);
+ hostname = variable_get(VAR_HOSTNAME);
if (strncmp("ftp://", cp, 6) != NULL) {
+ dialog_clear();
msgConfirm("Invalid URL: %s\n(A URL must start with `ftp://' here)", cp);
- goto punt;
+ return FALSE;
}
strncpy(url, cp, BUFSIZ);
if (isDebug())
@@ -145,118 +165,145 @@ mediaInitFTP(Device *dev)
}
msgNotify("Looking up host %s..", hostname);
if ((gethostbyname(hostname) == NULL) && (inet_addr(hostname) == INADDR_NONE)) {
- msgConfirm("Cannot resolve hostname `%s'! Are you sure that your\nname server, gateway and network interface are configured?", hostname);
- goto punt;
+ dialog_clear();
+ msgConfirm("Cannot resolve hostname `%s'! Are you sure that your\n"
+ "name server, gateway and network interface are configured?", hostname);
+ netDevice->shutdown(netDevice);
+ return FALSE;
}
- user = getenv(FTP_USER);
+ user = variable_get(VAR_FTP_USER);
if (!user || !*user) {
- snprintf(password, BUFSIZ, "installer@%s", hostname);
+ snprintf(password, BUFSIZ, "installer@%s", variable_get(VAR_HOSTNAME));
login_name = "anonymous";
}
else {
login_name = user;
- strcpy(password, getenv(FTP_PASS) ? getenv(FTP_PASS) : login_name);
+ strcpy(password, variable_get(VAR_FTP_PASS) ? variable_get(VAR_FTP_PASS) : login_name);
}
- retries = i = 0;
- if (OptFlags & (OPT_FTP_RESELECT + OPT_FTP_ABORT))
- max_retries = 0;
+ retries = 0;
+
retry:
- if (i && ++retries > max_retries) {
- if ((OptFlags & OPT_FTP_ABORT) || !get_new_host(dev))
- return FALSE;
- retries = 0;
- }
msgNotify("Logging in as %s..", login_name);
- if ((i = FtpOpen(ftp, hostname, login_name, password)) != 0) {
- if (OptFlags & OPT_NO_CONFIRM)
- msgNotify("Couldn't open FTP connection to %s\n", hostname);
- else
- msgConfirm("Couldn't open FTP connection to %s\n", hostname);
+ if (FtpOpen(ftp, hostname, login_name, password) != 0) {
+ if (variable_get(VAR_NO_CONFIRM))
+ msgNotify("Couldn't open FTP connection to %s", hostname);
+ else {
+ dialog_clear();
+ msgConfirm("Couldn't open FTP connection to %s", hostname);
+ }
+ if (ftpShouldAbort(dev, ++retries) || !get_new_host(dev, FALSE))
+ return FALSE;
goto retry;
}
- FtpPassive(ftp, (OptFlags & OPT_FTP_PASSIVE) ? 1 : 0);
+ FtpPassive(ftp, !strcmp(variable_get(VAR_FTP_STATE), "passive"));
FtpBinary(ftp, 1);
if (dir && *dir != '\0') {
- msgNotify("CD to distribution in ~ftp/%s", dir);
- if ((i = FtpChdir(ftp, dir)) == -2)
+ msgNotify("Attempt to chdir to distribution in %s..", dir);
+ if ((i = FtpChdir(ftp, dir)) != 0) {
+ if (i == -2 || ftpShouldAbort(dev, ++retries))
+ goto punt;
+ else if (get_new_host(dev, FALSE))
+ retries = 0;
goto retry;
+ }
}
- if (!FtpChdir(ftp, "dists")) {
- HasDistsDir = TRUE;
- FtpChdir(ftp, ".."); /* Hope this works! :-( */
- }
- else
- HasDistsDir = FALSE;
+
+ /* Give it a shot - can't hurt to try and zoom in if we can, unless we get a hard error back that is! */
+ if (FtpChdir(ftp, getenv(VAR_RELNAME)) == -2)
+ goto punt;
+
if (isDebug())
- msgDebug("leaving mediaInitFTP!\n");
+ msgDebug("mediaInitFTP was successful (logged in and chdir'd)\n");
ftpInitted = TRUE;
return TRUE;
punt:
- FtpClose(ftp);
- ftp = NULL;
- (*netDevice->shutdown)(netDevice);
+ if (ftp != NULL) {
+ FtpClose(ftp);
+ ftp = NULL;
+ }
return FALSE;
}
int
-mediaGetFTP(Device *dev, char *file, Attribs *dist_attrs)
+mediaGetFTP(Device *dev, char *file, Boolean tentative)
{
int fd;
- int nretries = 0, max_retries = MAX_FTP_RETRIES;
- Boolean inDists = FALSE;
+ int nretries;
+ char *fp;
+ char buf[PATH_MAX];
- if (OptFlags & (OPT_FTP_RESELECT + OPT_FTP_ABORT) || dev->flags & OPT_EXPLORATORY_GET)
- max_retries = 1;
+ fp = file;
+ nretries = 0;
- while ((fd = FtpGet(ftp, file)) < 0) {
+ lastRequest = file;
+ while ((fd = FtpGet(ftp, fp)) < 0) {
/* If a hard fail, try to "bounce" the ftp server to clear it */
- if (fd == -2 || ++nretries > max_retries) {
- if ((OptFlags & OPT_FTP_ABORT) || (dev->flags & OPT_EXPLORATORY_GET))
- return -1;
- else if (!get_new_host(dev))
+ if (fd == -2 && ++nretries < atoi(variable_get(VAR_FTP_RETRIES))) {
+ dev->shutdown(dev);
+ /* If we can't re-initialize, just forget it */
+ if (!dev->init(dev))
return -2;
- nretries = 0;
- continue;
}
- if (HasDistsDir) {
- if (!inDists) {
- FtpChdir(ftp, "dists");
- inDists = TRUE;
- }
- else {
- FtpChdir(ftp, "..");
- inDists = FALSE;
+ else if (tentative || ftpShouldAbort(dev, ++nretries))
+ return -1;
+ else {
+ /* Try some alternatives */
+ switch (nretries) {
+ case 1:
+ sprintf(buf, "dists/%s", file);
+ fp = buf;
+ break;
+
+ case 2:
+ sprintf(buf, "%s/%s", variable_get(VAR_RELNAME), file);
+ fp = buf;
+ break;
+
+ case 3:
+ sprintf(buf, "%s/dists/%s", variable_get(VAR_RELNAME), file);
+ fp = buf;
+ break;
+
+ case 4:
+ fp = file;
+ if (get_new_host(dev, tentative)) {
+ nretries = 0;
+ continue;
+ }
+ else
+ break;
}
}
}
- if (inDists)
- FtpChdir(ftp, "..");
return fd;
}
Boolean
mediaCloseFTP(Device *dev, int fd)
{
- FtpEOF(ftp);
- if (!close(fd))
- return (TRUE);
+ if (isDebug())
+ msgDebug("FTP Close called\n");
+ if (ftp)
+ FtpEOF(ftp);
return FALSE;
}
void
mediaShutdownFTP(Device *dev)
{
- Device *netdev = (Device *)dev->private;
+ /* Device *netdev = (Device *)dev->private; */
if (!ftpInitted)
return;
+ if (isDebug())
+ msgDebug("FTP shutdown called. FTP = %x\n", ftp);
if (ftp != NULL) {
FtpClose(ftp);
ftp = NULL;
}
- (*netdev->shutdown)(netdev);
+ /* (*netdev->shutdown)(netdev); */
ftpInitted = FALSE;
}
diff --git a/release/sysinstall/globals.c b/release/sysinstall/globals.c
index 2041024..bc303e5 100644
--- a/release/sysinstall/globals.c
+++ b/release/sysinstall/globals.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: globals.c,v 1.9.2.2 1995/06/05 03:15:38 jkh Exp $
+ * $Id: globals.c,v 1.10.2.1 1995/10/21 14:06:41 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -55,9 +55,7 @@ Boolean ColorDisplay;
Boolean OnVTY;
Variable *VarHead; /* The head of the variable chain */
Device *mediaDevice; /* Where we're installing from */
-unsigned int OptFlags; /* Option flags */
int BootMgr;
-char *InstallPrefix; /* Always install under here */
/*
* Yes, I know some of these are already automatically initialized as
@@ -73,6 +71,4 @@ globalsInit(void)
VarHead = NULL;
mediaDevice = NULL;
RunningAsInit = FALSE;
- OptFlags = 0;
- InstallPrefix = NULL;
}
diff --git a/release/sysinstall/help/XF86.hlp b/release/sysinstall/help/XF86.hlp
index c789eaa..edbc8d8 100644
--- a/release/sysinstall/help/XF86.hlp
+++ b/release/sysinstall/help/XF86.hlp
@@ -1,6 +1,8 @@
-README for XFree86 3.1.1u1 on FreeBSD 2.0.5
+README for XFree86 3.1.2 on FreeBSD 2.1
Rich Murphey, David Dawes
20 January 1995
+[Last Updated: 14 October 1995]
+
1. What and Where is XFree86?
------------------------------
@@ -14,7 +16,7 @@ well as binary distributions for many architectures.
See the Copyright Notice (COPYRIGHT.html).
-The sources for XFree86 are available as part of the FreeBSD 2.0.5
+The sources for XFree86 are available as part of the FreeBSD 2.1
distribution, or by anonymous ftp from:
ftp.XFree86.org:/pub/XFree86/current
@@ -22,7 +24,7 @@ ftp.XFree86.org:/pub/XFree86/current
Binaries for XFree86 on FreeBSD are also available as part of
-2.0.5 or from:
+2.1 or from:
ftp.XFree86.org:/pub/XFree86/current/binaries/FreeBSD-2.0
(ftp://ftp.XFree86.org/pub/XFree86/current/binaries/FreeBSD-2.0)
@@ -37,7 +39,7 @@ comments or suggestions about this file and we'll revise it.
2. Installing the Binaries
---------------------------
-In the FreeBSD 2.0.5 distribution, XFree86 comes in 3 major sections:
+In the FreeBSD 2.1 distribution, XFree86 comes in 3 major sections:
"basic" distributions, fonts and servers. At the minimum, you will
need the binaries and libraries from the basic distribution, the
"misc" fonts collection and at least one server. The smallest usable
@@ -47,102 +49,108 @@ If you can't decide what to pick and you have 52Mb of disk
space, it's safe to unpack everything.
What follows is a description of the various distribution files
-comprising XFree86. If you are installing this as part of FreeBSD
-2.0.5 then there's no need to use these files directly: You may
-simply check the desired components off the installation menus
-provided for that purpose. If you're installing this manually,
-then the following information should prove useful:
+comprising XFree86. If you are installing this as part of FreeBSD 2.1
+then there's no need to use these files directly: You may simply check
+the desired components off the installation menus provided for that
+purpose. If you're installing this manually, then the following
+information should prove useful:
Required (6.7Mb):
- X311bin.tgz
+ X312bin.tgz
all the executable X client applications and shared libs
- X311fnts.tgz
+ X312fnts.tgz
the misc and 75 dpi fonts
- X311lib.tgz
+ X312lib.tgz
data files needed at runtime
Required unless you have already customized your configuration
files:
- X311xicf.tgz
+ X312xicf.tgz
customizable xinit runtime configuration file
- X311xdcf.tgz
+ X312xdcf.tgz
customizable xdm runtime configuration file
Choose at least one server ( 2.3Mb):
- X3118514.tgz
+ X3128514.tgz
8-bit color for IBM 8514 and true compatibles.
- X311AGX.tgz
+ X312AGX.tgz
8-bit color for AGX boards.
- X311Mch3.tgz
+ X312Mch3.tgz
8 and 16-bit color for ATI Mach32 boards.
- X311Mch8.tgz
+ X312Mch8.tgz
8-bit color for ATI Mach8 boards.
- X311Mono.tgz
+ X312Mono.tgz
1-bit monochrome for VGA, Super-VGA, Hercules, and others.
- X311P9K.tgz
+ X312P9K.tgz
8, 16, and 24-bit color for Weitek P9000 boards (Diamond
Viper).
- X311S3.tgz
+ X312S3.tgz
8, 16 and 24-bit color for S3 boards (#9 GXE, Actix GE32,
SPEA Mercury, STB Pegasus)
- X311SVGA.tgz
+ X312SVGA.tgz
8-bit color for Super-VGA cards.
- X311VG16.tgz
+ X312VG16.tgz
4-bit color for VGA and Super-VGA cards
- X311W32.tgz
+ X312W32.tgz
8-bit Color for ET4000/W32, /W32i and /W32p cards.
- X311nest.tgz
+ X312nest.tgz
A nested server running as a client window on another
display.
Optional:
- X311doc.tgz
+ X312doc.tgz
(.5Mb) READMEs and XFree86 specific man pages
- X311man.tgz
+ X312man.tgz
(1.7Mb) man pages except XFree86 specific ones in etc archive
- X311f100.tgz
+ X312ctrb.tgz
+ (1.0Mb) Contributed clients like ico, xeyes, etc.
+
+ X312f100.tgz
(1.8Mb) 100dpi fonts
- X311fscl.tgz
+ X312fcyr.tgz
+ (1.8Mb) Cyrillic fonts
+
+ X312fscl.tgz
(1.6Mb) Speedo and Type1 fonts
- X311fnon.tgz
+ X312fnon.tgz
(3.3Mb) Japanese, Chinese and other non-English fonts
- X311fsrv.tgz
+ X312fsrv.tgz
(.3Mb) the font server and it's man page
- X311prog.tgz
+ X312prog.tgz
(3.9Mb) config, lib*.a and *.h files needed only for
compiling
- X311link.tgz
+ X312link.tgz
(7.8Mb) X server reconfiguration kit
- X311pex.tgz
+ X312pex.tgz
(.5Mb) PEX fonts and shared libs needed by PEX applications.
- X311lbx.tgz
+ X312lbx.tgz
(.2Mb) low bandwidth X proxy server and libraries.
Note that there is no longer a separate xdm archive. FreeBSD 2.0
@@ -154,8 +162,8 @@ us to provide separate tar balls.
2.1. Full Install:
-------------------
-[ Note: Unless you're installing XFree86 3.1.1u1 manually, that is
- to say not as part of the FreeBSD 2.0.5 installation, you may skip
+[ Note: Unless you're installing XFree86 3.1.2 manually, that is
+ to say not as part of the FreeBSD 2.1 installation, you may skip
to section 2.3 ]
1. You must be logged in as root to unpack the archives because
@@ -181,14 +189,14 @@ us to provide separate tar balls.
If you are using sh (as root usually does):
- # for i in X311*.tgz; do
+ # for i in X312*.tgz; do
# tar -xzf $i
# done
Else, if you are using csh:
- % foreach i (X311*.tgz)
+ % foreach i (X312*.tgz)
% tar -xzf $i
% end
@@ -207,7 +215,7 @@ us to provide separate tar balls.
First do numbers 1 and 2 above. Then unpack the required archives:
# for i in bin fnts lib xicf; do
- # tar -xzf X311$i.tgz
+ # tar -xzf X312$i.tgz
# done
@@ -216,7 +224,7 @@ server man pages, X11R6/man/man1/XF86_*, list the vga chip sets
supported by each server. For example, if you have an ET4000 based
card you will use the XF86_SVGA server:
- # tar -xzf X311SVGA.tgz
+ # tar -xzf X312SVGA.tgz
# cd /usr/X11R6/bin; rm X; ln -s XF86_SVGA X
@@ -256,7 +264,6 @@ applications.
abort with the message ``could not open default font
'fixed'''.
-
3. Installing The Display Manager (xdm)
----------------------------------------
@@ -286,6 +293,11 @@ The XF86Config file tells the X server what kind of monitor, video
card and mouse you have. You must create it to tell the server what
specific hardware you have.
+If you are installing XFree86 as part of FreeBSD 2.1, you may invoke
+XF86Config automatically from the FreeBSD configuration menu. You
+should still read this document first, however, as it contains
+valuable information on mouse and VGA card selection below.
+
XFree86 3.1 uses a new configuration file format. Consult the
XF86Config man page and the general INSTALL (INSTALL.html) file for
instructions.
@@ -311,25 +323,61 @@ You'll need info on your hardware:
o Your monitor's sync frequencies.
-The easiest way to find which device your mouse is plugged into is to
+Bus Mice:
+
+In FreeBSD, the bus mouse is generally found on /dev/mse0. Specify
+/dev/mse0 when asked, and in case of failure ensure that your Bus
+mouse was indeed "probed" when the system was booted. To make
+sure of this, type:
+
+ % dmesg | grep mse
+
+If you do not see something like this:
+ mse0 at 0x23c irq 5 on isa
+
+then it means that your bus mouse was not detected properly and you
+should reboot with the `-c' flag and verify that the device entry for
+mse0 matches your bus mouse settings.
+
+If the mouse is probed properly but still fails to function then you
+might double check that the /dev entry for the bus mouse exists. Use
+the script /dev/MAKEDEV to create the entry if it doesn't already
+exist, e.g:
+
+ % cd /dev
+ % sh MAKEDEV mse0
+
+
+Serial Mice:
+
+The easiest way to find which port your mouse is plugged into is to
use ``cat'' or ``kermit'' to look at the output of the mouse. Connect
to it and just make sure that it generates output when the mouse is
-moved or clicked:
+moved or clicked. If your mouse is plugged into the first serial port
+(COM1), for example, you could do this:
% cat < /dev/cuaa0
-If you can't find the right mouse device then use ``dmesg|grep sio''
-to get a list of devices that were detected upon booting:
+Where /dev/cuaa0 represents the first serial port, /dev/cuaa1 the
+second, /dev/cuaa2 the third and so on.
+
+If you can't find the right mouse port then use ``dmesg | grep sio''
+to get a list of serial devices that were detected at boot time:
% dmesg|grep sio
sio0 at 0x3f8-0x3ff irq 4 on isa
-Then double check the /dev entries corresponding to these devices.
-Use the script /dev/MAKEDEV to create entries if they don't already
-exist:
+The presence of sio0 will indicate that COM1 was found. If you see
+sio1, sio2 or sio3 then it means that a serial port was found at one
+of the other com addresses and you should use the appropriate
+/dev/cuaa<n> device entry to talk to it.
+
+If things still aren't working then double check that the /dev entries
+corresponding to these devices exist. Use the script /dev/MAKEDEV to
+create entries if they don't already exist, e.g:
% cd /dev
- % sh MAKEDEV cuaa0
+ % sh MAKEDEV cuaa0 [cuaa1, cuaa2, etc..]
If you plan to fine tune the screen size or position on your monitor
you'll need the specs for sync frequencies from your monitor's manual.
@@ -358,7 +406,7 @@ your home directory as described in the xinit and startx man pages.
6. Rebuilding Kernels for X
----------------------------
-The GENERIC FreeBSD 2.0 kernel supports XFree86 without any
+The GENERIC FreeBSD 2.x kernel supports XFree86 without any
modifications required. You do not need to make any changes to the
GENERIC kernel or any kernel configuration which is a superset.
@@ -368,6 +416,9 @@ smm.02.config.ps.Z
a ready-to-print postscript copy of the kernel configuration chapter
from the system maintainers manual.
+Alternatively, you can read the kernel configuration section of the
+FreeBSD handbook (http://www.freebsd.org/handbook).
+
If you do decide to reduce your kernel configuration file, do not
remove the two lines below (in /sys/arch/i386/conf). They are both
required for X support:
@@ -375,8 +426,8 @@ required for X support:
options XSERVER #Xserver
options UCONSOLE #X Console support
-The generic FreeBSD 2.0 kernel is configured by default with the
-syscons driver. To configure your kernel similarly it should have a
+The generic FreeBSD 2.x kernel is configured by default with the
+syscons driver. To configure your kernel similarly, it should have a
line like this in /usr/src/sys/i386/conf/GENERIC:
device sc0 at isa? port "IO_KBD" tty irq 1 vector scintr
diff --git a/release/sysinstall/help/configure.hlp b/release/sysinstall/help/configure.hlp
index 49980d4..d7473e6 100644
--- a/release/sysinstall/help/configure.hlp
+++ b/release/sysinstall/help/configure.hlp
@@ -3,12 +3,8 @@ process is complete. At the minimum, you should probably set the
system manager's password and the system time zone.
For extra goodies like bash, emacs, pascal, etc., you should look at
-the Packages item in this menu. Currently, the Packages option is
-only useful if you have a CDROM or an existing packages collection
-somewhere in the file system hierarchy where the package management
-tool can locate it. The automatic transfer of packages via FTP is not
-yet supported!
+the Packages item in this menu.
For setting the timezone after the system is installed, type
-``tzsetup''. For more information on the general system
+``tzsetup''. For more information on the overall general system
configuration, see the ``/etc/sysconfig'' file.
diff --git a/release/sysinstall/help/distributions.hlp b/release/sysinstall/help/distributions.hlp
index b81efbf..b614937 100644
--- a/release/sysinstall/help/distributions.hlp
+++ b/release/sysinstall/help/distributions.hlp
@@ -1,5 +1,5 @@
An ``X-'' prefixed before a distribution set means that the XFree86
-3.1.1u1 base distribution, libraries, manual pages, SVGA server and a
+3.1.2-S base distribution, libraries, manual pages, SVGA server and a
set of default fonts will be selected in addition to the set itself.
If you select such a set, you will also be presented with a set of
@@ -9,37 +9,32 @@ setup.
N.B. All references in this document to `complete source' mean the
complete source tree minus any legally encumbered cryptography code.
-The current "canned" installations are as follows:
+The current "canned" installations are provided:
Developer: Base ("bin") distribution, man pages, dictionary
files, profiling libraries and the complete source tree.
-
Kern-Developer: As above, but with only kernel sources instead of
the complete source tree.
-
User: The base distribution, man pages, dictionary files and
the FreeBSD 1.x and 2.0 compatibility sets.
-
Minimal: Only the base distribution.
-
Everything: The base distribution, man pages, dictionary files,
profiling libraries, the FreeBSD 1.x and the FreeBSD 2.0
compatibility libraries, the complete source tree,
games and your choice of XFree86 distribution components.
- N.B. Still no cryptocraphy source code!
-
+ Note that the cryptocraphy source code is NOT included
+ in this collection. You will need to select that by
+ hand if you're inside the United States.
Custom: Allows you to modify or create your distribution set on
a piece-by-piece basis.
-
Reset: Clear all currently selected distributions.
-
---
When using Custom, most of the sub-distribution choices are fairly
@@ -51,15 +46,6 @@ obvious, though two possible exceptions may be the "commerce" and
under special arrangement, limited functionality demos, shareware
products (you like it, you buy it), etc.
- At the time of this writing, there are unfortunately not enough
- commercial offerings to justify a fully split distribution set,
- so each product is available both as a subdirectory and as part
- of one large archive file. If you select "commerce" from the
- distributions submenus then you'll get the big file containing
- the entire collection copied to your hard disk. Don't do this
- unless you've got at least 10MB to devote to it!
-
-
* The "xperimnt" directory contains, not surprisingly, experimental
offerings. Unfinished (or work-in-progress) features, special
purpose drivers and packages, strange proof-of-concept stuff,
@@ -74,15 +60,18 @@ obvious, though two possible exceptions may be the "commerce" and
You may also notice that certain distributions, like "des" and "krb",
-are marked "NOT FOR EXPORT!" This is because it's illegal to
-export them from the United States (or any other country which
-considers encryption technology to be on its restricted export
-list). Since breaking this law only gets the _originating_ site
-(US!) in trouble, please do not load these distributions from U.S.
-servers!
+are marked "NOT FOR EXPORT!" This is because it's illegal to export
+them from the United States (or any other country which considers
+encryption technology to be on its restricted export list). Since
+breaking this law only gets the _originating_ site (US!) in trouble,
+please do not load these distributions from U.S. servers! We don't
+like these restrictions any more than you do, but can't do much about
+it (write your U.S. congressperson!).
A number of "foreign" servers do exist for the benefit of
-non-U.S. sites, one of which is "skeleton.mikom.csir.co.za".
+non-U.S. sites, the official site being:
+
+ ftp://ftp.internat.freebsd.org/pub/FreeBSD
Please get all such export restricted software from there
if you are outside the U.S., thanks!
diff --git a/release/sysinstall/help/drives.hlp b/release/sysinstall/help/drives.hlp
index ef1c4fe..27e2e75 100644
--- a/release/sysinstall/help/drives.hlp
+++ b/release/sysinstall/help/drives.hlp
@@ -1,7 +1,7 @@
If you are going to actually install some portion of FreeBSD on a
drive then PLEASE BE VERY CERTAIN that the Geometry reported in the
-Partition Editor (see Installation Menu) is the correct one for your
-drive and controller combination!
+Partition Editor is the correct one for your drive and controller
+combination!
IDE drives often have a certain geometry set during the PC BIOS setup,
or (in the case of larger IDE drives) have their geometry "remapped"
diff --git a/release/sysinstall/help/hardware.hlp b/release/sysinstall/help/hardware.hlp
index 6bcfb0b..7741c0d 100644
--- a/release/sysinstall/help/hardware.hlp
+++ b/release/sysinstall/help/hardware.hlp
@@ -1,11 +1,11 @@
-Hardware Documentation Guide: $Id: hardware.hlp,v 1.12.2.1 1995/08/14 10:49:29 rgrimes Exp $
+Hardware Documentation Guide: $Id: hardware.hlp,v 1.1.2.10 1995/11/04 08:48:00 jkh Exp $
Table of Contents
-----------------
0. Document Conventions
-1. Using UserConfig to change FreeBSD kernel settings
-2. Default Configuration (GENERIC kernel)
+1. Default Configuration (GENERIC kernel)
+2. Using UserConfig to change FreeBSD kernel settings
3. LINT - other possible configurations.
4. Known Hardware Problems.
@@ -14,11 +14,114 @@ Table of Contents
0. Document Conventions
-- --------------------
-We have `underlined' text which represents user input with `-'
-symbols throughout this document to differentiate it from
-the machine output.
+We have `underlined' text which represents user input with `-' symbols
+throughout this document to differentiate it from the machine output.
-1. Using UserConfig to change FreeBSD kernel settings
+1. Default (GENERIC) Configuration
+-- -------------------------------
+
+The following table contains a list of all of the devices that are
+present in the GENERIC kernel, that being the kernel (the operating
+system) that was placed in your root partition during the FreeBSD
+installation process. A compressed version of the GENERIC kernel is
+also used on the installation floppy diskette and DOS boot image.
+
+The table describes the various parameters used by the driver to
+communicate with the hardware in your system. There are four
+parameters in the table, though not all are used by each and every
+device.
+
+Detail:
+
+ Port The starting I/O port used by the device, shown in hexadecimal.
+
+ IOMem The lowest (or starting) memory address used by the device,
+ also shown in hexadecimal.
+
+ IRQ The interrupt the device uses to alert the driver to an event,
+ given in decimal.
+
+ DRQ The DMA (direct memory access) channel the device uses to move
+ data to and from main memory, also given in decimal.
+
+If an entry in the table has `n/a' for a value then it means that the
+parameter in question does not apply to that device. A value of `dyn'
+means that the correct value should be determined automatically by the
+kernel when the system boots.
+
+
+FreeBSD GENERIC kernel:
+
+ Port IRQ DRQ IOMem Description
+ ---- --- --- ----- ---------------------------------
+fdc0 3f0 6 2 n/a Floppy disk controller
+wdc0 1f0 14 n/a n/a IDE/MFM/RLL disk controller
+wdc1 170 15 n/a n/a IDE/MFM/RLL disk controller
+
+ncr0 n/a n/a n/a n/a NCR PCI SCSI controller
+ahc0 n/a n/a n/a n/a Adaptec 294x PCI SCSI controller
+bt0 330 dyn dyn dyn Buslogic SCSI controller
+uha0 330 dyn 6 dyn Ultrastore 14f
+ahc1 dyn dyn dyn dyn Adaptec 274x/284x SCSI controller
+ahb0 dyn dyn dyn dyn Adaptec 174x SCSI controller
+aha0 330 dyn 5 dyn Adaptec 154x SCSI controller
+aic0 340 11 dyn dyn Adaptec 152x/AIC-6360 SCSI
+ controller
+nca0 1f88 10 dyn dyn ProAudioSpectrum cards
+nca1 350 5 dyn dyn ProAudioSpectrum cards
+sea0 dyn 5 dyn c8000 Seagate ST01/02 8 bit controller
+
+wt0 300 5 1 dyn Wangtek and Archive QIC-02/QIC-36
+
+mcd0 300 10 n/a n/a Mitsumi CD-ROM
+mcd1 340 11 n/a n/a Mitsumi CD-ROM
+
+matcd0 230 n/a n/a n/a Matsushita/Panasonic CD-ROM
+
+scd0 230 n/a n/a n/a Sony CD-ROM
+
+sio0 3f8 4 n/a n/a Serial Port 0 (COM1)
+sio1 2f8 3 n/a n/a Serial Port 1 (COM2)
+sio2 3e8 5 n/a n/a Serial Port 2 (COM3)
+sio3 2e8 9 n/a n/a Serial Port 3 (COM4)
+
+lpt0 dyn 7 n/a n/a Printer Port 0
+lpt1 dyn dyn n/a n/a Printer Port 1
+lpt2 dyn dyn n/a n/a Printer Port 2
+
+de0 n/a n/a n/a n/a DEC DC21x40 PCI based cards
+ (including 21140 100bT cards)
+ed0 280 5 dyn d8000 WD & SMC 80xx; Novell NE1000 &
+ NE2000; 3Com 3C503
+ed1 300 5 dyn d8000 Same as ed0
+eg0 310 5 dyn dyn 3Com 3C505
+ep0 300 10 dyn dyn 3Com 3C509
+ie0 360 7 dyn d0000 AT&T StarLAN 10 and EN100;
+ 3Com 3C507; NI5210
+ix0 300 10 dyn d0000 Intel EtherExpress cards
+le0 300 5 dyn d0000 Digital Equipment EtherWorks
+ 2 and EtherWorks 3
+lnc0 280 10 n/a dyn Lance/PCnet cards
+ (Isolan, Novell NE2100, NE32-VL)
+lnc1 300 10 n/a dyn See lnc0
+ze0 300 5 dyn d8000 IBM/National Semiconductor
+ PCMCIA Ethernet Controller
+zp0 300 10 dyn d8000 3Com PCMCIA Etherlink III
+ Ethernet Controller
+--- End of table ---
+
+
+If the hardware in your computer is not set to the same settings as
+those shown in the table and the item in conflict is not marked 'dyn',
+you will have to either reconfigure your hardware or use UserConfig
+('-c' boot option) to reconfigure the kernel to match the way your
+hardware is currently set (see the next section).
+
+If the settings do not match, the kernel may be unable to locate
+or reliably access the devices in your system.
+
+
+2. Using UserConfig to change FreeBSD kernel settings
-- --------------------------------------------------
The UserConfig utility allows you to override various settings of
@@ -69,6 +172,7 @@ flags <devname> <mask> Set device flags
enable <devname> Enable device
probe <devname> Return results of device probe
disable <devname> Disable device (will not be probed)
+visual Go to visual mode
quit Exit this configuration utility
help This message
@@ -76,13 +180,24 @@ help This message
You may alter nearly all of the default settings present in the FreeBSD
generic kernel. This includes reassigning IRQs, disabling troublesome
devices (or drivers that conflict with the hardware your system has),
-setting special device flags, etc.
+setting special device flags, etc.
+
+Since people's tastes in user interface design vary widely, we have
+provided two different interfaces to the UserConfig utility. If you
+type `visual' you will be placed in the "GUI" oriented device
+attributes editor. If you're someone who's more at home with
+command-line flavored interfaces then simply don't type `visual' at
+any point! :)
+
+Since the visual interface pretty much describes itself, we'll use the
+more verbose command line interface while describing UserConfig in the
+following examples.
The most common use of UserConfig is to adjust or disable a driver
which is causing trouble. The "ls" command displays the current
-settings for all the drivers present in the booted kernel, and
-once you have located an entry of interest you may use the displayed
-device name to change its settings or even disable the driver completely.
+settings for all the drivers present in the booted kernel, and once
+you have located an entry of interest you may use the displayed device
+name to change its settings or even disable the driver completely.
For example, to change the memory address of network adapter 'ed0' to
the address 0xd4000, you would type
@@ -134,109 +249,6 @@ sufficient free disk space to store and compile the kernel sources,
this is the option we most highly recommend.
-
-2. Default (GENERIC) Configuration
--- -------------------------------
-
-The following table contains a list of all of the devices that are present
-in the GENERIC kernel, which is the kernel (the operating system) that was
-placed on your computer during the FreeBSD installation process.
-(A compressed version of the GENERIC kernel is also used on the
-installation floppy diskettes.)
-
-The table describes the various parameters used by the driver to communicate
-with the hardware in your system. There are four parameters in the
-table, but not all are used by each device. They are:
-
- Port the starting I/O port used by the device, shown in hexadecimal.
-
- IOMem the lowest (or starting) memory address used by the device,
- also shown in hexadecimal.
-
- IRQ the interrupt the device uses to alert the driver to an event,
- given in decimal.
-
- DRQ the DMA (direct memory access) channel the device uses to move
- data to and from main memory, also given in decimal.
-
-If an entry in the table has `n/a' for the value, it means that the
-parameter does not apply to that device. A value of `dyn' means that the
-correct value should be determined automatically by the kernel when the
-system boots.
-
-
-FreeBSD GENERIC kernel:
-
- Port IRQ DRQ IOMem Description
- ---- --- --- ----- ---------------------------------
-fdc0 3f0 6 2 n/a Floppy disk controller
-wdc0 1f0 14 n/a n/a IDE/MFM/RLL disk controller
-wdc1 170 15 n/a n/a IDE/MFM/RLL disk controller
-
-ncr0 n/a n/a n/a n/a NCR PCI SCSI controller
-ahc0 n/a n/a n/a n/a Adaptec 294x PCI SCSI controller
-bt0 330 dyn dyn dyn Buslogic SCSI controller
-uha0 330 dyn 6 dyn Ultrastore 14f
-ahc1 dyn dyn dyn dyn Adaptec 274x/284x SCSI controller
-ahb0 dyn dyn dyn dyn Adaptec 174x SCSI controller
-aha0 330 dyn 5 dyn Adaptec 154x SCSI controller
-aic0 340 11 dyn dyn Adaptec 152x/AIC-6360 SCSI
- controller
-nca0 1f88 10 dyn dyn ProAudioSpectrum cards
-nca1 350 5 dyn dyn ProAudioSpectrum cards
-sea0 dyn 5 dyn c8000 Seagate ST01/02 8 bit controller
-
-wt0 300 5 1 dyn Wangtek and Archive QIC-02/QIC-36
-
-mcd0 300 10 n/a n/a Mitsumi CD-ROM
-mcd1 340 11 n/a n/a Mitsumi CD-ROM
-
-matcd0 dyn n/a n/a n/a Matsushita/Panasonic CD-ROM
-
-scd0 230 n/a n/a n/a Sony CD-ROM
-
-sio0 3f8 4 n/a n/a Serial Port 0 (COM1)
-sio1 2f8 3 n/a n/a Serial Port 1 (COM2)
-sio2 3e8 5 n/a n/a Serial Port 2 (COM3)
-sio3 2e8 9 n/a n/a Serial Port 3 (COM4)
-
-lpt0 dyn 7 n/a n/a Printer Port 0
-lpt1 dyn dyn n/a n/a Printer Port 1
-lpt2 dyn dyn n/a n/a Printer Port 2
-
-de0 DEC DC21x40 PCI based cards
- (including 21140 100bT cards)
-ed0 280 5 dyn d8000 WD & SMC 80xx; Novell NE1000 &
- NE2000; 3Com 3C503
-ed1 300 5 dyn d8000 Same as ed0
-eg0 310 5 dyn dyn 3Com 3C505
-ep0 300 10 dyn dyn 3Com 3C509
-ie0 360 7 dyn d0000 AT&T StarLAN 10 and EN100;
- 3Com 3C507; NI5210
-ix0 300 10 dyn d0000 Intel EtherExpress cards
-le0 300 5 dyn d0000 Digital Equipment EtherWorks
- 2 and EtherWorks 3
-lnc0 280 10 n/a dyn Lance/PCnet cards
- (Isolan, Novell NE2100, NE32-VL)
-lnc1 300 10 n/a dyn See lnc0
-ze0 300 5 dyn d8000 IBM/National Semiconductor
- PCMCIA Ethernet Controller
-zp0 300 10 dyn d8000 3Com PCMCIA Etherlink III
- Ethernet Controller
---- End of table ---
-
-
-If the hardware in your computer is not set to the same settings as
-those shown in this table and the item is not marked 'dyn', you will
-have to either reconfigure your hardware, or use UserConfig ('-c' boot
-option) to reconfigure the kernel to match the way your hardware is
-currently set (see section 1.0).
-
-If the settings do not match, the kernel may be unable to locate
-or reliably access the devices in your system.
-
-
-
3. LINT - other possible configurations
-- ------------------------------------
@@ -265,7 +277,6 @@ fpa: DEC DEFPA PCI FDDI adapter
gp: National Instruments AT-GPIB and AT-GPIB/TNT board
gsc: Genius GS-4500 hand scanner
gus: Gravis Ultrasound - Ultrasound, Ultrasound 16, Ultrasound MAX
-gusmax: Gravis Ultrasound MAX (currently broken)
gusxvi: Gravis Ultrasound 16-bit PCM
joy: Joystick
labpc: National Instrument's Lab-PC and Lab-PC+
@@ -281,7 +292,7 @@ rc: RISCom/8 multiport card
sb: SoundBlaster PCM - SoundBlaster, SB Pro, SB16, ProAudioSpectrum
sbmidi: SoundBlaster 16 MIDI interface
sbxvi: SoundBlaster 16
-spigot: Create Labs Video Spigot video-acquisition board
+spigot: Creative Labs Video Spigot video-acquisition board
uart: Stand-alone 6850 UART for MIDI
wds: Western Digital WD7000 IDE
@@ -303,13 +314,10 @@ Q: The system finds my ed network card, but I keep getting device
timeout errors.
A: Your card is probably on a different IRQ from what is specified in the
- kernel configuration. The ed driver will no longer use the `soft'
- configuration by default (values entered using EZSETUP in DOS), but it
- will use the software configuration if you specify `?' in the IRQ field
- of your kernel config file. The reason for the change is because the
- ed driver used to read and try to use the soft configuration information
- even when the card was jumpered to use a hard configuration, and this
- caused problems.
+ kernel configuration. The ed driver does not use the `soft' configuration
+ by default (values entered using EZSETUP in DOS), but it will use the
+ software configuration if you specify `?' in the IRQ field of your kernel
+ config file.
Either move the jumper on the card to a hard configuration setting
(altering the kernel settings if necessary), or specify the IRQ as
@@ -318,7 +326,7 @@ A: Your card is probably on a different IRQ from what is specified in the
Another possibility is that your card is at IRQ 9, which is shared
by IRQ 2 and frequently a cause of problems (especially when you
- have a VGA card using 2! :). You should not use IRQ 2 or 9 if at
+ have a VGA card using IRQ 2! :). You should not use IRQ 2 or 9 if at
all possible.
@@ -337,17 +345,47 @@ A: The hard disk geometry was set incorrectly in the Partition editor when
program will see the DOS partition and try to infer the correct
geometry from it, which usually works.
-
-Q: I have a Matsushita/Panasonic CD-ROM drive but it isn't recognized
- by the system, even if I use UserConfig to change the Port address to
- 630, which is what my card uses.
-
-A: Not all of the companies that sell the Matsushita/Panasonic CR-562
- and CR-563 drives use the same I/O ports and interface that the
- matcd driver in FreeBSD expects. The only adapters that are supported
- at this time are those that are 100% compatible with the Creative
- Labs (SoundBlaster) host interface. See matcd.4 documentation for a
- list of host adapters that are known to work.
+ If you are setting up a truly dedicated FreeBSD server or work-
+ station where you don't care for (future) compatibility with DOS,
+ Linux or another operating system, you've also got the option to use
+ the entire disk (`A' in the partition editor), selecting the
+ non-standard option where FreeBSD occupies the entire disk from
+ the very first to the very last sector. This will leave all geometry
+ considerations aside, but is somewhat limiting unless you're never
+ going to run anything other than FreeBSD on a disk.
+
+Q: I have a Matsushita/Panasonic drive but it isn't recognized by the
+ system.
+
+A: Make certain that the I/O port that the matcd driver is set to is
+ correct for the host interface card you have. (Some SoundBlaster DOS
+ drivers report a hardware I/O port address for the CD-ROM interface
+ that is 0x10 lower than it really is.)
+
+ If you are unable to determine the settings for the card by examining
+ the board or documentation, you can use UserConfig to change the 'port'
+ address (I/O port) to -1 and start the system. This setting causes the
+ driver to look at a number of I/O ports that various manufacturers
+ use for their Matsushita/Panasonic/Creative CD-ROM interfaces.
+ Once the driver locates the address, you should run UserConfig again
+ and specify the correct address. Leaving the 'port' parameter set to -1
+ increases the amount of time that it takes the system to boot, and
+ this could interfere with other devices.
+
+ The double-speed Matsushita CR-562 and CR-563 are the only drives
+ that are supported.
+
+
+Q: I have a Matsushita/Panasonic CR-522, a Matsushita/Panasonic CR-523 or
+ a TEAC CD55a drive, but it is not recognized even when the correct I/O
+ port is set.
+
+A: These CD-ROM drives are currently not supported by FreeBSD. The command
+ sets for these drives are not compatible with the double-speed CR-562
+ and CR-563 drives.
+
+ The single-speed CR-522 and CR-523 drives can be identified by their
+ use of a CD-caddy.
Q: I'm trying to install from a tape drive but all I get is something like:
@@ -381,10 +419,11 @@ A: This is not actually a hang, simply a very LONG "wdc0" probe that
To eliminate the problem, boot with the -c flag and eliminate the wdc0
device, or compile a custom kernel.
-Q: My sytem can not find an Intel EtherExpress 16 card.
+Q: My system can not find my Intel EtherExpress 16 card.
A: You must set your Intel EtherExpress 16 card to be memory mapped at
address 0xD0000, and set the amount of mapped memory to 32K using
the Intel supplied softset.exe program.
[ Please add more hardware tips to this Q&A section! ]
+
diff --git a/release/sysinstall/help/install.hlp b/release/sysinstall/help/install.hlp
index 95d060c..b569f06 100644
--- a/release/sysinstall/help/install.hlp
+++ b/release/sysinstall/help/install.hlp
@@ -1,4 +1,4 @@
- INSTALLATION GUIDE FOR FreeBSD 2.0.5
+ QUICK INSTALLATION GUIDE FOR FREEBSD 2.1
This manual documents the process of installing FreeBSD on your
machine. Please also see the Hardware Guide for hardware-specific
@@ -26,6 +26,9 @@ Table of Contents:
3.0 Installing FreeBSD.
+3.1 Repairing an existing FreeBSD installation.
+
+3.2 Upgrading from FreeBSD 2.0.5
1.0 DOS user's Question and Answer section
@@ -43,9 +46,15 @@ preserving the original partition and allowing you to install onto the
second free piece. You first "defrag" your DOS partition, using the
DOS 6.xx "DEFRAG" utility or the Norton Disk tools, then run FIPS. It
will prompt you for the rest of the information it needs. Afterwards,
-you can reboot and install FreeBSD on the new free slice. See the
-Distributions menu for an estimation of how much free space you'll
-need for the kind of installation you want.
+you can reboot and install FreeBSD on the new partition. Also note
+that FIPS will create the second partition as a "clone" of the first,
+so you'll actually see that you now have two DOS Primary partitions
+where you formerly had one. Don't be alarmed! You can simply delete
+the extra DOS Primary parititon (making sure it's the right one by
+examining its size! :)
+
+See the Distributions menu for an estimation of how much free space
+you'll need for the kind of installation you want.
1.2 Can I use compressed DOS filesystems from FreeBSD?
@@ -54,17 +63,17 @@ No. If you are using a utility such as Stacker(tm) or DoubleSpace(tm),
FreeBSD will only be able to use whatever portion of the filesystem
you leave uncompressed. The rest of the filesystem will show up as
one large file (the stacked/dblspaced file!). DO NOT REMOVE THAT
-FILE! You will probably regret it greatly!
+FILE as you will probably regret it greatly!
It is probably better to create another uncompressed DOS primary
-partition and use this for communications between DOS and FreeBSD.
+partition and use this for communications between DOS and FreeBSD if
+such is your desire.
1.3 Can I mount my DOS extended partitions?
-This feature isn't in FreeBSD 2.0.5 but should be in 2.1. We've laid
-all the groundwork for making this happen, now we just need to do the
-last 1% of the work involved.
+Unfortunately, this remains unsupported. All the framework is in place
+for doing so, but it didn't get done in time for the 2.1 installation.
1.4 Can I run DOS binaries under FreeBSD?
@@ -75,10 +84,10 @@ DOSEMU utility may bring this much closer to being a reality sometime
soon. Send mail to hackers@freebsd.org if you're interested in
joining this effort!
-However, there is a neat utility called "pcemu" in the ports collection
-which emulates an 8088 and enough BIOS services to run DOS text mode
-applications. It requires the X Window System (provided as
-XFree86 3.1.1u1).
+There is, however, a neat utility called "pcemu" in the ports
+collection which emulates an 8088 and enough BIOS services to run DOS
+text mode applications. It requires the X Window System (provided as
+XFree86 3.1.2) to operate.
@@ -87,64 +96,53 @@ XFree86 3.1.1u1).
2.1 Before installing from CDROM:
-If your CDROM is of an unsupported type, such as an IDE CDROM, then
-please skip to section 2.3: Before installing from a DOS partition.
+If your CDROM is of an unsupported type, then please skip to section
+2.3 which describes how to install from a DOS partition.
There is not a lot of preparatory work that needs to be done to
successfully install from one of Walnut Creek's FreeBSD CDROMs (other
-CDROM distributions may work as well, we simply cannot say as we
-have no hand or say in their creation). You can either boot into the
-CD installation directly from DOS using Walnut Creek's supplied
-``install.bat'' batch file or you can make a boot floppy with
-the ``makeflp.bat'' command.
+CDROM distributions may work as well, though we cannot say for certain
+as we have no hand or say in how they're created). You can either
+boot into the CD installation directly from DOS using Walnut Creek's
+supplied ``install.bat'' batch file or you can make a boot floppy with
+the ``makeflp.bat'' command [NOTE: If you're using an IDE CDROM, use
+the inst_ide.bat or atapiflp.bat batch files instead].
-For the easiest interface of all (from DOS), type "go". This
-will bring up a DOS menu utility that leads you through all
-the available options.
+For the easiest interface of all (from DOS), type "view". This will
+bring up a DOS menu utility that leads you through all the available
+options.
If you're creating the boot floppy from a UNIX machine, you may find
that ``dd if=floppies/boot.flp of=/dev/rfd0'' or
``dd if=floppies/boot.flp of=/dev/floppy'' works well, depending on
your hardware and operating system environment.
-Once you've booted from DOS or floppy, you should then be able to select
-CDROM as the media type in the Media menu and load the entire
+Once you've booted from DOS or floppy, you should then be able to
+select CDROM as the media type in the Media menu and load the entire
distribution from CDROM. No other types of installation media should
be required.
After your system is fully installed and you have rebooted from the
-hard disk, you should find the CD mounted on the directory /cdrom. A
-utility called `lndir' comes with the XFree86 distribution which you
-may also find useful: It allows you to create "link tree" directories
-to things on Read-Only media like CDROM. One example might be
-something like this:
-
- mkdir /usr/ports
- lndir /cdrom/ports /usr/ports
-
-Which would allow you to then "cd /usr/ports; make" and get all the
-sources from the CD, but yet create all the intermediate files in
-/usr/ports, which is presumably on a more writable media! :-)
-
-SPECIAL NOTE: Before invoking the installation, be sure that the
-CDROM is in the drive so that the "probe" can find it!
-This is also true if you wish the CDROM to be added to the default
-system configuration automatically during the install (whether or
-not you actually use it as the installation media). This will be
-fixed for 2.1, but for now this simple work-around will ensure that
-your CDROM is detected properly.
-
-Finally, if you would like people to be able to FTP install
-FreeBSD directly from the CDROM in your machine, you'll find
-it quite easy. After the machine is fully installed, you simply
-need to add the following line to the password file (using
-the vipw command):
+hard disk, you can mount the cdrom at any time by typing: ``mount /cdrom''
+Before removing the CD again, also note that it's necessary to first
+type ``umount /cdrom''. Don't just remove it from the drive!
+
+SPECIAL NOTE: Before invoking the installation, be sure that the CDROM
+is in the drive so that the "probe" can find it! This is also true if
+you wish the CDROM to be added to the default system configuration
+automatically during the install (whether or not you actually use it
+as the installation media).
+
+Finally, if you would like people to be able to FTP install FreeBSD
+directly from the CDROM in your machine, you'll find it quite easy.
+After the machine is fully installed, you simply need to add the
+following line to the password file (using the vipw command):
ftp:*:99:99::0:0:FTP:/cdrom:/nonexistent
-No further work is necessary. The other installers will now be able
-to chose a Media type of FTP and type in: ftp://<your machine>
-after picking "Other" in the ftp sites menu!
+Anyone else at your site will now be able to chose a Media type of FTP
+and type in: ftp://<your machine> after picking "Other" in the ftp
+sites menu to install from the CD in your machine!
2.2 Before installing from Floppy:
@@ -153,41 +151,52 @@ If you must install from floppy disks, either due to unsupported
hardware or just because you enjoy doing things the hard way, you must
first prepare some floppies for the install.
-The first floppy you'll need is ``floppies/root.flp'', which is
-somewhat special in that it's not a DOS filesystem floppy at all, but
-rather an "image" floppy (it's actually a gzip'd cpio file). You can
-use the rawrite.exe program to do this under DOS, or ``dd'' to do it
-on a UNIX Workstation (see notes in section 2.1 concerning the
-``floppies/boot.flp'' image). Once this floppy is made, go on
-to make the distribution set floppies:
-
-You will need, at minimum, as many 1.44MB or 1.2MB floppies as it takes
-to hold all files in the bin (binary distribution) directory. THESE
-floppies *must* be formatted using MS-DOS, using the FORMAT command in
-MS-DOS or the File Manager format command in Microsoft Windows(tm).
-Don't trust Factory Preformatted floppies! Format them again yourself,
-just to make sure!
-
-Many problems reported by our users in the past have resulted from the
-use of improperly formatted media, so we simply take special care to
-mention it here!
-
-After you've DOS formatted the floppies, you'll need to copy the files
-onto them. The distribution files are split into chunks conveniently
-sized so that 5 of them will fit on a conventional 1.44MB floppy. Go
-through all your floppies, packing as many files as will fit on each
-one, until you've got all the distributions you want packed up in this
-fashion. Each distribution should go into a subdirectory on the
-floppy, e.g.: a:\bin\bin.aa, a:\bin\bin.ab, ...
-
-Once you come to the Media screen of the install, select
-"Floppy" and you'll be prompted for the rest.
+The first floppy you'll need in addition to the boot.flp image is
+``floppies/root.flp'', which is somewhat special in that it's not a
+DOS filesystem floppy at all, but rather a floppy "image" (it's
+actually a gzip'd cpio file). You can create this floppy in the same
+way that you created the boot floppy (see notes in section 2.1). Once
+this floppy is made, you can go on to make the distribution set
+floppies using ordinary DOS or UFS (if you're preparing the floppies
+on another FreeBSD machine) formatted diskettes.
+
+You will need, at minimum, as many 1.44MB or 1.2MB floppies as it
+takes to hold all files in the bin (binary distribution) directory.
+If you're preparing these floppies under DOS, then THESE floppies
+*must* be formatted using the MS-DOS FORMAT command. If you're using
+Windows, use the Windows File Manager format command.
+
+Don't trust Factory Preformatted floppies! Format them again
+yourself, just to make sure! Many problems reported by our users in
+the past have resulted from the use of improperly formatted media,
+which is why I'm taking such special care to mention it here!
+
+If you're creating the floppies from another FreeBSD machine, a format
+is still not a bad idea though you don't need to put a DOS filesystem
+on each floppy. You can use the `disklabel' and `newfs' commands to
+put a UFS filesystem on them instead, like so:
+
+ disklabel -w -r fd0 floppy3 (use floppy5 for 1.2MB disks)
+ newfs /dev/rfd0
+
+Then you can mount and write to them like any other file system.
+
+After you've formatted the floppies for DOS or UFS, you'll need to
+copy the files onto them. The distribution files are split into
+chunks conveniently sized so that 5 of them will fit on a conventional
+1.44MB floppy. Go through all your floppies, packing as many files as
+will fit on each one, until you've got all the distributions you want
+packed up in this fashion. Each distribution should go into its own
+subdirectory on the floppy, e.g.: a:\bin\bin.aa, a:\bin\bin.ab, ...
+
+Once you come to the Media screen of the install, select "Floppy" and
+you'll be prompted for the rest.
2.3 Before installing from a DOS partition:
-To prepare for installation from an MS-DOS partition you should
-simply copy the files from the distribution into a directory called
+To prepare for installation from an MS-DOS partition you should simply
+copy the files from the distribution into a directory called
"FREEBSD". For example, to do a minimal installation of FreeBSD from
DOS using files copied from the CDROM, you might do something like
this:
@@ -209,17 +218,17 @@ BIN dist is only the minimal requirement.
2.4 Before installing from QIC/SCSI Tape:
Installing from tape is probably the easiest method, short of an
-on-line install using FTP or a CDROM install. The installation program
+on-line install using FTP or a CDROM. The installation program
expects the files to be simply tar'ed onto the tape, so after getting
-all of the files for distribution you're interested in, simply tar
-them onto the tape with a command like:
+all of the files for the distributions you're interested in, simply
+tar them onto the tape with a command like:
- cd /freebsd/distdir
- tar cvf /dev/rwt0 (or /dev/rst0) dist1 .. dist2
+ cd /where/you/have/your/dists
+ tar cvf /dev/rwt0 (or /dev/rst0) floppies dist1 .. dist2
-Make sure that the `floppies/' directory is one of the "dists" given
-above, since the installation will look for `floppies/root.flp' on
-the tape.
+It's important to make sure that the `floppies/' directory is
+specified along with the dists because the installation will look for
+`floppies/root.flp' on the tape.
When you go to do the installation, you should also make sure that you
leave enough room in some temporary directory (which you'll be allowed
@@ -236,57 +245,61 @@ the drive *before* booting from the boot floppy. The installation
2.5 Before installing over a network:
-You can do network installations over 3 types of communications links:
+You can do network installations over 3 types of connections:
Serial port: SLIP / PPP
- Parallel port: PLIP (laplink cable)
+ Parallel port: PLIP (using ``laplink'' style cable)
Ethernet: A standard ethernet controller (includes some PCMCIA).
-SLIP support is rather primitive, and limited primarily to hard-wired
-links, such as a serial cable running between a laptop computer and
-another computer. The link should be hard-wired as the SLIP
-installation doesn't currently offer a dialing capability; that
-facility is provided with the PPP utility, which should be used in
-preference to SLIP whenever possible.
-
-If you're using a modem, then PPP is almost certainly your only
-choice. Make sure that you have your service provider's information
-handy as you'll need to know it fairly soon in the installation
-process. You will need to know, at the minimum, your service
-provider's IP address and possibly your own (though you can also leave
-it blank and allow PPP to negotiate it with your ISP). You also need
-to know how to use the various "AT commands" to dial the ISP with your
-particular modem as the PPP dialer provides only a very simple
-terminal emulator.
+SLIP support is rather primitive, and is limited primarily to
+hard-wired links, such as a serial cable running between two
+computers. The link must be hard-wired because the SLIP installation
+doesn't currently offer a dialing capability. If you need to dial out
+with a modem or otherwise dialog with the link before connecting to
+it, then I recommend that the PPP utility be used instead.
+
+If you're using PPP, make sure that you have your Internet Service
+Provider's IP address and DNS information handy as you'll need to know
+it fairly early in the installation process. You may also need to
+know your own IP address, though PPP supports dynamic address
+negotiation and may be able to pick up this information directly from
+your ISP if they support it.
+
+You will also need to know how to use the various "AT commands" for
+dialing out with your particular brand of modem as the PPP dialer
+provides only a very simple terminal emulator.
If a hard-wired connection to another FreeBSD (2.0R or later) machine
is available, you might also consider installing over a "laplink"
-parallel port cable. The data rate over the parallel port is much
-higher than what is typically possible over a serial line (up to
+style parallel port cable. The data rate over the parallel port is
+much higher than what is typically possible over a serial line (up to
50k/sec), thus resulting in a quicker installation.
Finally, for the fastest possible network installation, an ethernet
adaptor is always a good choice! FreeBSD supports most common PC
ethernet cards, a table of supported cards (and their required
-settings) is provided as part of the FreeBSD Hardware Guide - see the
-Documentation menu on the boot floppy. If you are using one of the
-supported PCMCIA ethernet cards, also be sure that it's plugged in
-_before_ the laptop is powered on! FreeBSD does not, unfortunately,
-currently support "hot insertion" of PCMCIA cards.
+settings) being provided as part of the FreeBSD Hardware Guide (see
+the Documentation menu on the boot floppy or the top level directory
+of the CDROM). If you are using one of the supported PCMCIA ethernet
+cards, also be sure that it's plugged in _before_ the laptop is
+powered on! FreeBSD does not, unfortunately, currently support "hot
+insertion" of PCMCIA cards.
You will also need to know your IP address on the network, the
-"netmask" value for your address class, and the name of your machine.
-Your system administrator can tell you which values to use for your
-particular network setup. If you will be referring to other hosts by
-name rather than IP address, you'll also need a name server and
-possibly the address of a gateway (if you're using PPP, it's your
-provider's IP address) to use in talking to it. If you do not know
-the answers to all or most of these questions, then you should
+"netmask" value for your address class and the name of your machine.
+Your system administrator can tell you which values are appropriate to
+your particular network setup. If you will be referring to other
+hosts by name rather than IP address, you'll also need a name server
+and possibly the address of a gateway (if you're using PPP, it's your
+provider's IP address) to use in talking to it.
+
+If you do not know the answers to these questions then you should
really probably talk to your system administrator _first_ before
-trying this type of installation!
+trying this type of installation! Using a randomly chosen IP address
+or netmask on a live network will almost certainly get you shot.
-Once you have a network link of some sort working, the installation
-can continue over NFS or FTP.
+Once you have a network connection of some sort working, the
+installation can continue over NFS or FTP.
2.5.1 Preparing for NFS installation:
@@ -295,152 +308,271 @@ can continue over NFS or FTP.
and then point the NFS media selection at it.
If this server supports only "privileged port" access (as is
- generally the default for Sun workstations), you will need to set
- this option in the Options menu before installation can proceed.
+ generally the default for Sun and Linux workstations), you
+ will need to set this option in the Options menu before
+ installation can proceed.
If you have a poor quality ethernet card which suffers from very
slow transfer rates, you may also wish to toggle the appropriate
Options flag.
- In order for NFS installation to work, the server must support
- "subdir mounts"; e.g., if your FreeBSD 2.0.5 distribution directory
+ In order for NFS installation to work, the server must also support
+ "subdir mounts", e.g. if your FreeBSD 2.1 distribution directory
lives on: ziggy:/usr/archive/stuff/FreeBSD
Then ziggy will have to allow the direct mounting of
/usr/archive/stuff/FreeBSD, not just /usr or /usr/archive/stuff.
- In FreeBSD's /etc/exports file, this is controlled by the
+ In FreeBSD's /etc/exports file this is controlled by the
``-alldirs'' option. Other NFS servers may have different
conventions. If you are getting `Permission Denied' messages
from the server then it's likely that you don't have this
- enabled properly!
+ properly enabled!
2.5.2 Preparing for FTP Installation
FTP installation may be done from any mirror site containing a
- reasonably up-to-date version of FreeBSD 2.0.5. A full menu of
- reasonable choices from almost anywhere in the world is provided
- by the FTP site menu.
+ reasonably up-to-date version of FreeBSD 2.1. A full menu of
+ reasonable choices for almost any location in the world is
+ provided in the FTP site menu.
+
+ If you are installing from some other FTP site not listed in
+ this menu, or you are having troubles getting your name server
+ configured properly, you can also specify your own URL by
+ selecting the ``Other'' choice in that menu. A URL can
+ contain a hostname or an IP address, so the following would
+ work in the absence of a name server:
+
+ ftp://192.216.191.11/pub/FreeBSD/2.1.0-RELEASE
+
+ There are two FTP installation modes you can use:
- If you are installing from some other FTP site not listed in this
- menu, or you are having troubles getting your name server configured
- properly, you can also specify your own URL by selecting the ``Other''
- choice in that menu. A URL can also be a direct IP address, so
- the following would work in the absence of a name server:
+ o FTP:
- ftp://192.216.222.4/pub/FreeBSD/2.0.5-RELEASE
-
- [Substitute "ALPHA" for "RELEASE" during the ALPHA test period!]
+ For all FTP transfers, use the standard "Active" mode for
+ transfers. This will not work through most firewalls but
+ will often work best with older ftp servers that do not
+ support passive mode. If your connection hangs with
+ passive mode, try this one!
+
+ o FTP Passive:
+
+ For all FTP transfers, use "Passive" mode. This allows
+ the user to pass through firewalls that do not allow
+ incoming connections on random port addresses.
+
+ NOTE: ACTIVE AND PASSIVE MODES ARE NOT THE SAME AS A `PROXY'
+ CONNECTIONS, WHERE A PROXY FTP SERVER IS LISTENING ON A
+ DIFFERENT PORT!
- If you are installing through a firewall then you should probably
- select ``Passive mode'' ftp, which is the default. If you are
- talking to a server which does not support passive mode for some
- reason, see the Options menu to select Active mode transfers.
+ In such instances, you should specify the URL as something like:
+ ftp://foo.bar.com:1234/pub/FreeBSD
-3. Installing FreeBSD
--- ------------------
+ Where "1234" is the port number of the proxy ftp server.
+
+
+
+3.0 Installing FreeBSD
+--- ------------------
Once you've taken note of the appropriate preinstallation steps, you
should be able to install FreeBSD without any further trouble.
-Should this not be true, then you may wish to go back and re-read the
-relevant preparation section (section 2.x) for the installation media
-type you're trying to use - perhaps there's a helpful hint there that
-you missed the first time? If you're having hardware trouble, or
-FreeBSD refuses to boot at all, read the Hardware Guide provided on
-the boot floppy for a list of possible solutions.
+Should the installation fail at some stage, then you may wish to go
+back and re-read the relevant preparation section (section 2.x) for
+the installation media type you're trying to use. Perhaps there's a
+helpful hint there that you missed the first time? If you're having
+hardware trouble or FreeBSD refuses to boot at all, then read the
+Hardware Guide again for a list of possible solutions.
The FreeBSD boot floppy contains all the on-line documentation you
-should need to be able to navigate through an installation and if it
-doesn't then I'd like to know what you found most confusing! It is
-the objective of the FreeBSD installation program (sysinstall) to be
-self-documenting enough that painful "step-by-step" guides are no
-longer necessary. It may take us a little while to reach that
-objective, but that's the objective!
+should need to be able to navigate through an installation, and if it
+doesn't then I'd like to know what you found most confusing so that I
+can fix it in future releases! It is the objective of the FreeBSD
+installation program (sysinstall) to be self-documenting enough that
+painful "step-by-step" guides are no longer necessary.
-Meanwhile, you may also find the following "typical installation sequence"
-to be helpful:
+You may also find the following "typical installation sequence" to be
+useful reading:
o Boot the boot floppy. After a boot sequence which can take
- anywhere from from 30 seconds to 3 minutes, depending on your
- hardware, you should be presented with a menu of initial
- choices. If the floppy doesn't boot at all, or the boot
+ anywhere from from 30 seconds to 3 minutes, depending on the
+ speed of your hardware, you should be presented with a menu of
+ initial choices. If the floppy doesn't boot at all, or the boot
hangs at some stage, go read the Q&A section of the Hardware
- Guide for possible causes.
+ Guide for some possible causes.
o Press F1. You should see some basic usage instructions on
- the menu system and general navigation. If you haven't used this
- menu system before then PLEASE read this thoroughly!
+ the menu system and general navigation within it. If you haven't
+ used this installation system before then PLEASE read this
+ thoroughly!
-o If English is not your native language, you may wish to proceed
- directly to the Language option and set your preferred language.
- This will bring up some of the documentation in that language
- instead of english.
+o Select the Novice installation and follow the instructions. Even
+ if you're moderately familiar with UNIX, chose the Novice install!
+ "Novice" in this context means new to the FreeBSD installer, not
+ computers in general! The other installation types (Custom and
+ Express) assume that you've installed FreeBSD using *this* version
+ of the installation utility and know *exactly* what you are doing!
-o Select the Options item and set any special preferences you
- may have.
+ Novice users and 25 year veterans of UNIX alike can benefit from the
+ tips provided by the Novice install, so don't be proud - be a novice! :)
-o Select Proceed, bringing you to the Installation Menu.
-Installation Menu:
+Installation type overview:
-o You can do anything you like in this menu without altering
- your system _except_ for "Commit", which will perform any
- requests to alter your system you may have made.
+o Custom installation:
- If you're confused at any point, the F1 key usually pulls
- up the right information for the screen you're in.
+You can do anything you like in this menu without altering your system
+_except_ for "Commit", which will perform any pending actions you may
+have selected. Some of the menu options will also have direct `Write'
+commands available for commiting an operation immediately, but they
+should only be used if you're *absolutely sure* it's necessary. It's
+generally safer to stack up your changes and then commit them all at
+once so that you're left with the option of changing your mind up to
+the very last moment. In particular, the (W)rite options in the fdisk
+and label screens WILL NOT WORK for a new installation! They're meant
+for tweaking *existing* installations, not doing new ones. Use the
+final commit option as there is no advantage whatsoever to be gained
+in writing the information out stage by stage in a new installation.
- o The first step is generally `Partition', which allows
- you to chose how your drives will be used for FreeBSD.
+If you're confused at any point, the F1 key will pull up what is
+hopefully some helpful information for the screen you're in.
+
+
+o Express installation:
+
+This installation will invoke all the appropriate steps in order as if
+you'd selected them one by one from the custom installation menu. It
+assumes that you *know what you are doing* and have run the
+installation at least once before. If this is not the case, the
+Novice installation method is recommended.
+
+
+o Novice installation:
- o Next, with the `Label' editor, you can specify how the space
- in any allocated FreeBSD partitions should be used by FreeBSD,
- or where to mount a non-FreeBSD partition (such as DOS).
+As previously mentioned, the Novice installation leads you through the
+required stages in the proper order and presents you with various
+helpful prompts in between. Once the system is installed, it will
+also present you with the opportunity to perform a variety of "post
+install" actions.
- o Next, the `Distributions' menu allows you to specify which
- parts of FreeBSD you wish to load. A good choice is
- "User" for a small system or "Developer" for someone
- wanting a bit more out of FreeBSD. If none of the existing
- collections sound applicable, select Custom.
+A quick synopsis of the stages involved in a novice installation
+follows:
+
+ o The first step is the `Partition Editor', which allows
+ you to chose how your drives will be used for FreeBSD.
+ If you're dedicating an entire drive to FreeBSD, the
+ `A' command is probably all you need to type here, otherwise
+ move to a partition marked `Unused' (or delete an existing one)
+ and use the `C' command to create a FreeBSD partition in its
+ place.
+
+ o Next, with the `Label Editor', you can specify how the space
+ in any FreeBSD partitions should be used by FreeBSD. You
+ can also mount any non-FreeBSD partitions (such as DOS) in this
+ screen. If you want the standard layout, simply type `A' for
+ the defaults.
+
+ o Next, the `Distributions' menu allows you to specify how much
+ of FreeBSD you'd like to load. A good choice is the "User"
+ distribution for a small system or the "Developer" distribution
+ for someone wanting a more programmer-oriented configuration.
+ If none of the existing collections seem applicable, select
+ Custom to choose the component distributions yourself.
o Next, the `Media' menu allows you to specify what kind of
- media you wish to install from. If a desired media choice is
- found and configured automatically then this menu will simply
- return, otherwise you'll be asked for additional details on
- the media device type.
-
- o Finally, the Commit command will actually perform all the
- actions at once (nothing has been written to your disk
- so far, nor will it until you give the final confirmation).
+ media you wish to install from. If a given media type requires
+ extra information, such as networking information for an FTP
+ or NFS install, it will also be asked for at this point.
+
+ o Finally, you'll be prompted to commit all of these actions at
+ once (nothing has been written to your disk so far, nor will
+ it until you give the final confirmation).
+
All new or changed partition information will be written
out, file systems will be created and/or non-destructively
labelled (depending on how you set their newfs flags in the
- Label editor) and all selected distributions will be
+ Label Editor) and all selected distributions will be
extracted.
- o The Configure menu choice allows you to furthur configure your
- FreeBSD installation by giving you menu-driven access to
- various system defaults. Some items, like networking, may
- be especially important if you did a CDROM/Tape/Floppy
- installation and have not yet configured your network
- interfaces (assuming you have some). Properly configuring
- your network here will allow FreeBSD to come up on the network
- when you first reboot from the hard disk.
-
- o Exit returns you to the top menu.
-
-
- At this point, you're generally done with the sysinstall utility and
-can select the final `Quit'. If you're running it as an installer
-(e.g., before the system is all the way up) then the system will now
-reboot. If you selected the boot manager option, you will see a small
-boot menu with an `F?' prompt. Press the function key for BSD (it
-will be shown) and you should boot up into FreeBSD off the hard disk.
-
- If this fails to happen for some reason, see the Q & A section
-of the Hardware Guide for possible clues!
+ o After the system is fully installed, you'll then have the
+ option to configure the system in various ways, install a
+ WEB server, etc.
+
+At this point, you're generally done with the sysinstall utility and
+can reboot the system. If you elected to install the boot manager,
+you should now see a small boot menu with an `F?' prompt. Press the
+function key corresponding to the BSD partition and you should boot up
+into FreeBSD off the hard disk.
+
+If this fails to happen for some reason, see the Q & A section of the
+Hardware Guide for possible clues! The most likely problem is a
+mis-matched disk geometry, which will have to be corrected with a
+second pass through the install, using the (G) command in the fdisk
+menu to properly set the geometry the next time.
+
+Should you wish to re-enter this installation later, you will find it
+under /stand/sysinstall on the installed system.
+
+Good luck! If you really get stuck, you may send mail to our support
+mailing list - questions@FreeBSD.org. We'll do our best to help you!
+
+
+3.1 Repairing an existing FreeBSD installation.
+--- -------------------------------------------
+
+FreeBSD 2.1 now features a "Fixit" option in the top menu of the boot
+floppy. To use it, you will also need a fixit.flp image floppy,
+generated in the same fashion as the boot floppy.
+
+To invoke fixit, simply boot the boot floppy, chose the "Fixit"
+item and insert the fixit floppy when asked. You will then be placed
+into a shell with a wide variety of commands available (in the /stand
+and /mnt2/stand directories) for checking, repairing and examining file
+systems and their contents. Some UNIX administration experience *is*
+required to use the fixit option!
+
+
+3.2 Upgrading from FreeBSD 2.0.5
+--- ----------------------------
+
+It must first be said that this upgrade DOES NOT take a particularly
+sophisticated approach to the upgrade problem, it being more a question
+of providing what seemed "good enough" at the time. A truly polished
+upgrade that deals properly with the broad spectrum of installed 2.0.5
+systems would be nice to have, but until that gets written what you get is
+this - the brute-force approach!
+
+What this upgrade will attempt to do is best summarized thusly:
+
+ 1. fsck and mount all file systems chosen in the label editor.
+ 2. Ask for a location to preserve your /etc directory into and do so.
+ 3. Extract all selected distributions on top of your existing system.
+ 4. Copy certain obvious files back from the preserved /etc, leaving the
+ rest of the /etc file merge up to the user.
+ 5. Drop user in a shell so that they may perform that merge before
+ rebooting into the new system.
+
+And that's it! This "upgrade" is not going to hold your hand in all
+major respects, it's simply provided to make one PART of the upgrade
+easier.
+
+IMPORTANT NOTE: What this upgrade procedure may also do, in fact, is
+completely destroy your system (though much more quickly than you
+would have been able to destroy it yourself). It is simply impossible
+to guarantee that this procedure's crude form of upgrade automation
+will work in all cases and if you do this upgrade without proper
+BACKUPS for any important data then you really must like living life
+close to the edge, that's all we can say!
+
+NOTE to 2.0 users: We're sorry, but the "slice" changes that were
+added in FreeBSD 2.0.5 made automated upgrades pretty difficult due to
+the fact that a complete reinstall is pretty much called for. Things
+may still *work* after a 2.1 upgrade, but you will also no doubt
+receive many warnings at boot time about non-aligned slices and such;
+we really do recommend a fresh installation for 2.0 systems! (But
+back up your user data first :-).
Jordan
diff --git a/release/sysinstall/help/media.hlp b/release/sysinstall/help/media.hlp
index 8b081bc..dbf7d9b 100644
--- a/release/sysinstall/help/media.hlp
+++ b/release/sysinstall/help/media.hlp
@@ -1,29 +1,49 @@
You can install from the following types of media:
- CDROM - requires one of the following supported CDROM drives:
+ CDROM requires one of the following supported CDROM drives:
+ Sony CDU 31/33A
+ Matushita/Panasonic "Sound Blaster" CDROM.
+ Mitsumi FX-001{A-D} (older non-IDE drives).
+ SCSI - Any standard SCSI CDROM drive hooked to
+ a supported controller (see Hardware Guide).
- Sony CDU 31/33A
- Matushita/Panasonic "Sound Blaster" CDROM.
- Mitsumi FX-001{A-D} (older non-IDE drives).
- SCSI - Any standard SCSI CDROM drive hooked to
- a supported controller (see Hardware Guide).
- DOS - A DOS primary partition with the required FreeBSD
- distribution files copied onto it (e.g. C:\FREEBSD\)
+ DOS A DOS primary partition with the required FreeBSD
+ distribution files copied onto it (e.g. C:\FREEBSD\)
- FS - Assuming a disk or partition with an existing
- FreeBSD file system and distribution set on it,
- get the distribution files from there.
- Floppy - Get distribution files from one or more DOS formatted
- floppies.
+ FS Assuming a disk or partition with an existing
+ FreeBSD file system and distribution set on it,
+ get the distribution files from there.
- FTP - Get the distribution files from an anonymous ftp server
- (you will be presented with a list).
- NFS - Get the distribution files from an NFS server somewhere
- (make sure that permissions on the server allow this!)
+ Floppy Get distribution files from one or more DOS or UFS
+ formatted floppies.
- Tape - Extract distribution files from tape into a temporary
- directory and install from there.
+ FTP Get the distribution files from an anonymous ftp server
+ (you will be presented with a list). Please note that
+ there are also two ways of invoking FTP in either
+ "Active" and "Passive" mode.
+
+ Active mode is the standard way of fetching files and
+ Passive mode is for use when you're behind a firewall or
+ some other security mechanism that blocks active FTP
+ connections. If you chose "other" in the FTP menu, please
+ also note that all paths are *relative* to the home
+ directory of the user being logged in as. By default, this
+ is the user "ftp" (anonymous ftp) but you may change this
+ in the Options screen.
+
+
+ NFS Get the distribution files from an NFS server somewhere
+ (make sure that permissions on the server allow this!).
+ If this install method hangs on you or refuses to work
+ properly, you may need to set some special options for
+ your NFS server. See the Options screen for more details.
+
+
+ Tape Extract distribution files from tape into a temporary
+ directory and install from there. If the tape was created
+ with blocksize other than 20, you may wish to change this
+ in the Options screen.
diff --git a/release/sysinstall/help/network_device.hlp b/release/sysinstall/help/network_device.hlp
index 95c42ae..81bf6f2 100644
--- a/release/sysinstall/help/network_device.hlp
+++ b/release/sysinstall/help/network_device.hlp
@@ -2,53 +2,55 @@ You can do network installations over 3 types of communications links:
Serial port: SLIP / PPP
Parallel port: PLIP (laplink cable)
- Ethernet: A standard ethernet controller (includes some PCMCIA).
+ Ethernet: A standard ethernet controller (includes some
+ PCMCIA networking cards).
-SLIP support is rather primitive and limited primarily to hard-wired
-links, such as a serial cable running between a laptop computer and
-another PC. The link must be hard-wired as the SLIP installation
-doesn't currently offer a dialing capability; that facility is provided
-with the PPP utility, which should be used in preference to SLIP
-whenever possible. When you choose a serial port device, you'll
-be given the option later to edit the slattach command before it's
-run on the serial line. It is expected that you'll run slattach
-(or some equivalent) on the other end of the link at this time and
-bring up the line. FreeBSD will then install itself over the link
-at speeds of up to 115.2K/baud (the recommended speed for a hardwired
-cable).
+SLIP support is rather primitive and limited primarily to directly
+connected links, such as a serial cable running between a laptop
+computer and another PC. The link must be hard-wired as the SLIP
+installation doesn't currently offer a dialing capability (that
+facility is offered by the PPP utility, which should be used in
+preference to SLIP whenever possible). When you choose the SLIP
+option, you'll be given the option of later editing the slattach
+command before it's run on the serial line. It is expected that
+you'll run slattach (or some equivalent command) on the other end of
+the link at that time and bring up the line. FreeBSD will then
+install itself at serial speeds of up to 115.2K/baud (the recommended
+speed for a hardwired cable).
-If you're using a modem then PPP is almost certainly your only
-choice. Make sure that you have your service provider's information
-handy as you'll need to know it fairly early in the installation
-process. You will need to know, at the minimum, your service
-provider's IP address and possibly your own (though you can also leave
-it blank and allow PPP to negotiate it with your ISP). You will also
-need to know how to use the various "AT commands" to dial the ISP with
-your particular brand of modem as the PPP dialer provides only a very
-simple terminal emulator and has no "modem capabilities database".
+If you're using a modem then PPP is almost certainly your only choice.
+Make sure that you have your service provider's information handy as
+you'll need to know it fairly early in the installation process. You
+will need to know, at the minimum, your service provider's IP address
+and possibly your own (though you can also leave it blank and allow
+PPP to negotiate it with your ISP if your ISP supports such dynamic
+negotiation). You will also need to know how to use the various "AT
+commands" to dial the ISP with your particular brand of modem as the
+PPP dialer provides only a very simple terminal emulator and has no
+"modem capabilities database".
If a hard-wired connection to another FreeBSD (2.0R or later) machine
is available, you might also consider installing over a "laplink"
parallel port cable. The data rate over the parallel port is much
-higher than what is typically possible over a serial line with
-speeds of up to 50k/sec.
+higher than what is typically possible over a serial line, and speeds
+of up to 50KB/sec are not uncommon.
Finally, for the fastest possible network installation, an ethernet
adaptor is always a good choice! FreeBSD supports most common PC
-ethernet cards, a table of which is provided in the FreeBSD
-Hardware Guide (see the Documentation menu on the boot floppy).
-If you are using one of the supported PCMCIA ethernet cards, also be
-sure that it's plugged in _before_ the laptop is powered on! FreeBSD
-does not, unfortunately, currently support "hot insertion" of PCMCIA
-cards.
+ethernet cards, a table of which is provided in the FreeBSD Hardware
+Guide (see the Documentation menu on the boot floppy). If you are
+using one of the supported PCMCIA ethernet cards, also be sure that
+it's plugged in _before_ the laptop is powered on! FreeBSD does not,
+unfortunately, currently support "hot insertion" of PCMCIA cards.
-You will also need to know your IP address on the network, the "netmask"
-value for your address class, and the name of your machine.
+You will also need to know your IP address on the network, the
+"netmask" value for your address class, and the name of your machine.
Your system administrator can tell you which values to use for your
particular network setup. If you will be referring to other hosts by
name rather than IP address, you'll also need a name server and
possibly the address of a gateway (if you're using PPP, it's your
provider's IP address) to use in talking to it. If you do not know
-the answers to all or most of these questions, then you should
-really probably talk to your system administrator _first_ before
-trying this type of installation!
+the answers to all or most of these questions then you should really
+probably talk to your system administrator _first_ before trying this
+type of installation! Chosing the wrong IP address on a busy network
+will NOT make you popular with your systems administrator! :-)
diff --git a/release/sysinstall/help/options.hlp b/release/sysinstall/help/options.hlp
index c30180c..689c8cb 100644
--- a/release/sysinstall/help/options.hlp
+++ b/release/sysinstall/help/options.hlp
@@ -1,4 +1,5 @@
-The following options may be set from this screen:
+The following options may be set from this screen. Use the SPACE key
+to toggle an option's value, Q to leave when you're done.
NFS Secure: NFS server talks only on a secure port
@@ -14,82 +15,93 @@ NFS Slow: User is using a slow PC or ethernet card
the PC from becoming swamped with data.
-FTP Abort: On transfer failure, abort
+Debugging: Turn on the extra debugging flag
- This is pretty self-explanatory. If you're transfering from a
- host that drops the connection or cannot provide a file, abort
- the installation of that piece.
+ This turns on a lot of extra noise over on the second screen
+ (ALT-F2 to see it, ALT-F1 to switch back). If your installation
+ should fail for any reason, PLEASE turn this flag on when
+ attempting to reproduce the problem. It will provide a lot of
+ extra debugging at the failure point and may be very helpful to
+ the developers in tracking such problems down!
-FTP Reselect: On transfer failure, ask for another host
+Yes To All: Assume "Yes" answers to all non-critical dialogs
- This is more useful to someone doing an interactive installation.
- If the current host stops working, ask for a new ftp server to
- resume the installation from. The install will attempt to pick
- up from where it left off on the other server, if at all possible.
+ This flag should be used with caution. It will essentially
+ decide NOT to ask the user about any "boundry" conditions that
+ might not constitute actual errors but may be warnings indicative
+ of other problems. It's most useful to those who are doing unattended
+ installs.
-FTP Active: Use "active mode" for standard FTP
+FTP OnError: What to do when FTP transfer errors occur.
- For all FTP transfers, use "Active" mode. This will not work
- through firewalls, but will often work with older ftp servers
- that do not support passive mode. If your connection hangs
- with passive mode (the default), try active!
+ This is pretty self-explanatory. If you're transfering from a
+ host that drops the connection or cannot provide a file, you can
+ chose to Abort the connection, Retry the request (see next option)
+ or Reselect another FTP host, attempting to retry the request from
+ a new site. Pressing SPACE will toggle through these options.
-FTP Passive: Use "passive mode" for firewalled FTP
+FTP Retries: How many times to retry failing FTP requests.
- For all FTP transfers, use "Passive" mode. This allows the user
- to pass through firewalls that do not allow incoming connections
- on random port addresses.
+ If FTP OnError is set to `retry', this is the number of times to
+ loop on a failing request before giving up. If you're talking to a
+ site that's chronically overloaded (like ours!) you may wish to
+ simply set this to some large value and go to lunch or something.
- NOTE: ACTIVE AND PASSIVE MODES ARE NOT THE SAME AS A `PROXY'
- CONNECTION, WHERE A PROXY FTP SERVER IS LISTENING ON A DIFFERENT
- PORT!
- In such situations, you should specify the URL as something like:
+FTP username: Specify username and password instead of anonymous.
- ftp://foo.bar.com:1234/pub/FreeBSD
+ By default, the installation attempts to log in as the
+ anonymous user. If you wish to log in as someone else,
+ specify the username and password with this option.
- Where "1234" is the port number of the proxy ftp server.
+Tape Blocksize: Specify block size in 512 byte blocks of tape.
-Debugging: Turn on the extra debugging flag
+ This defaults to 20 blocks, which should work with most
+ tape drive + tar combinations. It may not allow your particular
+ drive to win any records for speed, however, and the more
+ adventurous among you might try experimenting with larger sizes.
- This turns on a lot of extra noise over on the second screen
- (ALT-F2 to see it, ALT-F1 to switch back). If your installation
- should fail for any reason, PLEASE turn this flag on when
- attempting to reproduce the problem. It will provide a lot of
- extra debugging at the failure point and may be very helpful to
- the developers in tracking such problems down!
+Extract Detail: How to show filenames on debug screen as they're extracted.
-Yes To All: Assume "Yes" answers to all non-critical dialogs
+ While a distribution is being extracted, the default detail level
+ of "high" will show the full file names as they're extracted.
+ If you would prefer a more terse form for this, namely dots, select
+ the "medium" detail level. If you want nothing to be printed
+ on the debugging screen during extraction, select "low".
- This flag should be used with caution. It will essentially
- decide NOT to ask the user about any "boundry" conditions that
- might not constitute actual errors but may be warnings indicative
- of other problems.
+Release Name: Which release to attempt to load from installation media.
-FTP userpass: Specify username and password instead of anonymous.
+ You should only change this option if you're really sure you know
+ what you are doing! This will change the release name used by
+ sysinstall when fetching components of any distributions.
- By default, the installation attempts to log in as the
- anonymous user. If you wish to log in as someone else,
- specify the username and password with this option.
+
+Browser Package: Which package to load for an HTML browser.
+
+ By default, this is set to lynx but may also be set to any other
+ text capable HTML browser for which a package exists. If you set this
+ to an X based browser, you will not be able to use it if you're running
+ in text mode! :)
+
+
+Browser Exec: Which binary to run for the HTML browser.
+
+ The full pathname to the main executable in Browser Package
-Clear: Clear All Option Flags
+Media Type: Which media type is being used.
- Reset all option flags back to their default values.
+ This is mostly informational and indicates which media type (if any)
+ was last selected in the Media menu. It's also a convenient short-cut
+ to the media menu itself.
-----
-Some of these items, like "FTP Active" or "FTP Passive", are actually
-mutually-exclusive even though you can turn all of them on or off at
-once. This is a limitation of the menuing system, and is compensated
-for by checks that ensure that the various flags are not in conflict.
-If you re-enter the Options menu again after leaving it, you'll see
-the settings it's actually using after checking for any possible
-conflicts.
+Use Defaults: Use default values.
+ Reset all options back to their default values.
diff --git a/release/sysinstall/help/partition.hlp b/release/sysinstall/help/partition.hlp
index 19b6ce1..cbce9a4 100644
--- a/release/sysinstall/help/partition.hlp
+++ b/release/sysinstall/help/partition.hlp
@@ -1,21 +1,50 @@
This is the FreeBSD DiskLabel Editor.
+NOTE: If you're entering this editor from the update procedure then
+you probably shouldn't (C)reate anything at all but rather use only
+the (M)ount command to check and mount existing partitions for
+upgrading.
+
+If you would like the label editor to do most of the following for
+you, simply type `A' for automatic partitioning of the disk.
+
+If you wish to create partitions manually you may do so by moving the
+highlighted selection bar with the arrow keys over the FreeBSD
+partition(s) displayed at the top of the screen. Typing (C)reate
+while a partition with available free space is selected will allow you
+to create a BSD partition inside of it using some or all of its
+available space.
+
+Typing (M)ount over an existing partition entry (displayed in the
+middle of the screen) will allow you to set a mount point for it
+without initializing it. If you want it initialized, use the (T)oggle
+command to flip the Newfs flag. When Newfs is set to "Y", the
+filesystem in question will be ERASED and rebuilt from scratch!
+
+NOTE: The (W)rite option is HIGHLY DANGEROUS and should NOT BE USED if
+you're installing a new system! It's only for use in resurrecting
+or changing an existing system, and will cause unpredictable things to
+happen if you use it in any other circumstances. Don't do it! Wait
+for the final commit dialog if you're express/novice installing, or
+use the "Commit" menu item if you're custom installing, and do it there.
+
+
You should use this editor to create at least the following
filesystems:
- Name Purpose Min Size? Optional?
- ---- ------- --------- ---------
- / Root filesystem 20MB No
- swap Swap space 2 * MEM No
- /usr System & user files 80MB or more Yes
+ Name Purpose Min Size? Optional?
+ ---- ------- --------- ---------
+ / Root filesystem 20MB No
+ swap Swap space 2 * MEM No
+ /usr System & user files 80MB or more Yes
Note: If you do not create a /usr filesystem then your / filesystem
will need to be bigger - at least 100MB. This is not recommended as
any media errors that may occur during disk I/O to user files will
corrupt the filesystem containing vital system files as well. It is
for this reason that / is generally kept on its own filesystem, where
-it's basically considered "read only" by the system and hence a good
-deal safer.
+it should be considered essentially "read only" in your administration
+of it.
Swap space is a little tricker, and the rule of "2 * MEM" is simply a
best-guess approximation and not necessarily accurate for your
@@ -44,79 +73,88 @@ instead. You may therefore wish to make the / partition bigger if you
expect a lot of mail or news and do not want to make /var its own
partition.
-
-If you're new to this installation, you should also first understand
-how FreeBSD 2.0.5's new "slices" paradigm for looking at disk storage
-works. It's not very hard to grasp. A "fully qualified slice name",
-that is the name of the file we open in /dev to talk to the slice, is
-optionally broken into 3 parts:
-
- First you have the disk name. Assume we have two SCSI
- drives in our system, which gives us `sd0' and `sd1'.
-
- Next you have the "Slice" (or "FDISK Partition") number,
- as seen in the Partition Editor. Assume that our sd0 contains
- two slices, a FreeBSD slice and a DOS slice. This gives us
- sd0s1 and sd0s2. Let's also say that sd1 is completely devoted
- to FreeBSD, so we have only one slice there: sd1s1.
-
- Next, if a slice is a FreeBSD slice, you have a number of
- (confusingly named) "partitions" you can put inside of it.
- These FreeBSD partitions are where various filesystems or swap
- areas live, and using our hypothetical two-SCSI-disk machine
- again, we might have something like the following layout on sd0:
-
- Name Mountpoint
- ---- ----------
- sd0s1a /
- sd0s1b <swap space>
- sd0s1e /usr
-
- Because of historical convention, there is also a short-cut,
- or "compatibility slice", that is maintained for easy access
- to the first FreeBSD slice on a disk for those programs which
- still don't know how to deal with the new slice scheme.
- The compatibility slice names for our filesystem above would
- look like:
-
- Name Mountpoint
- ---- ----------
- sd0a /
- sd0b <swap space>
- sd0e /usr
-
- FreeBSD automatically maps the compatibility slice to the first
- FreeBSD slice it finds (in this case, sd0s1). You may have multiple
- FreeBSD slices on a drive, but only the first one may be the
- compatibility slice!
-
- The compatibility slice will eventually be phased out, but
- it is still important right now for several reasons:
-
- 1. Some programs, as mentioned before, still don't work
- with the slice paradigm and need time to catch up.
-
- 2. The FreeBSD boot blocks are unable to look for
- a root file system in anything but a compatibility
- slice right now. This means that our root will always
- show up on "sd0a" in the above scenario, even though
- it really lives over on sd0s1a and would otherwise be
- referred to by its full slice name.
-
-Once you understand all this, then the label editor becomes fairly
-simple. You're either carving up the FreeBSD slices displayed at the
-top of the screen into smaller pieces (displayed in the middle of the
-screen) and then putting FreeBSD file systems on them, Or you're just
-mounting existing partitions/slices into your filesystem hierarchy;
-this editor lets you do both. Since a DOS partition is also just
-another slice as far as FreeBSD is concerned, you can mount one into
-in your filesystem hierarchy just as easily with this editor. For
-FreeBSD partitions you can also toggle the "newfs" state so that
-the partitions are either (re)created from scratch or simply checked
-and mounted (the contents are preserved).
+If you're new to this installation, you might also want to read the
+following explanation of how FreeBSD's new "slice" paradigm for
+looking at disk storage works:
+
+
+In FreeBSD's new system, a device name can be broken up into up to 3
+parts. Take a typical name like ``/dev/sd0s1a'':
+
+ The first three characters represent the drive name. If we had
+ a system with two SCSI drives on it then we'd see /dev/sd0 and
+ /dev/sd1 as the device entries representing the entire drives.
+
+ Next you have the "slice" (or "FDISK Partition") number,
+ as seen in the Partition Editor. Assuming that our sd0
+ contained two slices, a FreeBSD slice and a DOS slice, that
+ would give us /dev/sd0s1 and /dev/sd0s2 as device entries pointing
+ to the entire slices.
+
+ Next, if a slice is a FreeBSD slice, you can have a number of
+ (confusingly named) "partitions" inside of it.
+
+ These partitions are where various filesystems or swap areas live,
+ and using our hypothetical two-SCSI-disk machine again, we might
+ have something like the following layout on sd0:
+
+ Name Mountpoint
+ ---- ----------
+ sd0s1a /
+ sd0s1b <swap space>
+ sd0s1e /usr
+
+ Because of historical convention, there is also a short-cut,
+ or "compatibility slice", that is maintained for easy access
+ to the *first* FreeBSD slice on a disk. This gives some
+ backwards compatibility to utilities that still may not know
+ how to deal with the new slice scheme.
+
+ The compatibility slice names for our filesystem above would
+ also look like:
+
+ Name Mountpoint
+ ---- ----------
+ sd0a /
+ sd0b <swap space>
+ sd0e /usr
+
+ Again, let it be noted: FreeBSD automatically maps the
+ compatibility slice to the first FreeBSD slice it finds
+ (in this case, sd0s1). You may have multiple FreeBSD slices on a
+ drive, but only the first one will be mapped to the compatibility
+ slice!
+
+ The compatibility slice will eventually be phased out, but
+ it is still important right now for several reasons:
+
+ 1. Some programs, as mentioned before, still don't work
+ with the slice paradigm and need time to catch up.
+
+ 2. The FreeBSD boot blocks are unable to look for
+ a root file system in anything but a compatibility
+ slice right now. This means that our root will always
+ show up on "sd0a" in the above scenario, even though
+ it really lives over on sd0s1a and would otherwise be
+ referred to by its full slice name.
+
+Once you understand all this, then the purpose of the label editor
+becomes fairly clear: You're carving up the FreeBSD slices displayed
+at the top of the screen into smaller pieces, which are displayed in
+the middle of the screen, and then assigning FreeBSD file system names
+(mount points) to them.
+
+You can also use the label editor to mount existing partitions/slices
+into your filesystem hierarchy, as is frequently done for DOS FAT
+slices. For FreeBSD partitions, you can also toggle the "newfs" state
+so that the partitions are either (re)created from scratch or simply
+checked and mounted (the contents are preserved).
When you're done, type `Q' to exit.
No actual changes will be made to the disk until you (C)ommit from the
-Install menu! You're working with what is essentially a copy of
-the disk label(s), both here and in the FDISK Partition Editor.
+Install menu or (W)rite directly from this one. You're working with
+what is essentially a copy of the disk label(s), both here and in the
+FDISK Partition Editor, and the actual on-disk labels won't be
+affected by any changes you make until you explicitly say so.
+
diff --git a/release/sysinstall/help/readme.hlp b/release/sysinstall/help/readme.hlp
index c166e26..8ede34b 100644
--- a/release/sysinstall/help/readme.hlp
+++ b/release/sysinstall/help/readme.hlp
@@ -1,19 +1,19 @@
-----------------------------------------
- FreeBSD 2.0.5 --- RELEASE Version , ,
+ FreeBSD 2.1 --- RELEASE Version , ,
----------------------------------------- /( )`
\ \___ / |
-Welcome to the 2.0.5 release of FreeBSD! 2.0.5 is /- _ `-/ '
-an interim release of FreeBSD, filling a critical (/\/ \ \ /\
-gap during the period between 2.0R (which was / / | ` \
-released in Nov 94) and 2.1R, which will be O O ) / |
-released in late July of '95. FreeBSD 2.0.5 `-^--'`< '
-contains many substantial improvements from 2.0R, (_.) _ ) /
-not least of which is greater stability (by `.___/` /
-a considerable margin), dozens of new `-----' /
-features and a greatly enhanced <----. __ / __ \
-installation program. See the release <----|====O)))==) \) /====
-notes for more details on what's new in <----' `--' `.__,' \
-FreeBSD 2.0.5! | |
+Welcome to the 2.1 release of FreeBSD! 2.1 is the /- _ `-/ '
+stability release following FreeBSD 2.0.5 and con- (/\/ \ \ /\
+sists primarily of bug fixes, documentation / / | ` \
+updates and upgrades of several small non-critical O O ) / |
+subsystems. The emphasis with 2.1 was to increase `-^--'`< '
+system stability and applicability to "mission- (_.) _ ) /
+critical" applications. No major features were `.___/` /
+added or changed. As usual, for more `-----' /
+information on what's changed between <----. __ / __ \
+this release and the last one, please <----|====O)))==) \) /====
+see the release notes! <----' `--' `.__,' \
+ | |
\ / /\
______( (_ / \______/
,' ,-----' |
@@ -24,11 +24,10 @@ What is FreeBSD? FreeBSD is an operating system based on 4.4 BSD Lite
for Intel, AMD, Cyrix or NexGen "x86" based PC hardware. It works
with a very wide variety of PC peripherals and configurations and can
be used for everything from software development to Internet Service
-Provision; the busiest site on the Internet, ftp.cdrom.com, is a
-FreeBSD machine!
+Provision.
This release of FreeBSD contains everything you need to run such a
-system, plus full source code for everything. With the source
+system, including full source code for everything. With the source
distribution installed you can literally recompile the entire system
from scratch with one command, making it ideal for students,
researchers or folks who simply want to see how it all works.
@@ -36,26 +35,27 @@ researchers or folks who simply want to see how it all works.
A large collection of 3rd party ported software (the "ports
collection") is also provided to make it easier for you to obtain and
install all your favorite traditional UNIX utilities for FreeBSD.
-Over 270 ports, from editors to programming languages to graphical
+Over 350 ports, from editors to programming languages to graphical
applications, make FreeBSD a powerful and comprehensive operating
-environment that rivals that of many large workstations for general utility
-and power.
+environment that extends far beyond what's provided by many commercial
+versions of UNIX.
-For more documentation on this system, it is recommended that you
+For more documentation on this system it is recommended that you
purchase the 4.4BSD Document Set from O'Reilly Associates and the
USENIX Association, ISBN 1-56592-082-1. We have no connection with
O'Reilly, we're just satisfied customers!
-You may also wish to read the HARDWARE GUIDE *before* proceeding any
-further with the installation. Configuring PC hardware for anything
-other than DOS/Windows (which don't actually make very significant
-demands on the hardware) is actually quite a bit harder than it looks,
-and if you think you understand PCs then you clearly haven't been
-using them for long enough! :) This guide will give you some tips on
-how to configure your hardware and what symptoms to watch for in case
-of trouble. This guide is available in the Documentation menu of the
-FreeBSD boot floppy.
+If you're new to FreeBSD then you should also read EVERYTHING listed
+in the Documentation menu on the boot floppy. It may seem like a lot
+to read, but you should at least aquaint yourself with the types of
+information available should you later get stuck. Once the system is
+installed, you can also revisit this menu and use a WEB browser to
+read the installed FAQ (Frequently Asked Questions) and Handbook HTML
+documentation sets for FreeBSD. You can also use the browser to visit
+other WEB sites on the net (such as http://www.freebsd.org) if you
+have an Internet connection.
+
DISCLAIMER: While FreeBSD does its best to safeguard against accidental
loss of data, it's still more than possible to WIPE OUT YOUR ENTIRE DISK
@@ -63,6 +63,8 @@ with this installation! Please do not proceed to the final FreeBSD
installation menu unless you've adequately backed up any important
data first! We really mean it!
+o E-mail addresses and tech support info:
+
Technical comments on this release should be sent (in English!) to:
hackers@FreeBSD.org
@@ -88,17 +90,32 @@ send-pr command are logged and tracked in our bugs database, and
you'll be kept informed of any changes in status during the life of
the bug (or feature request).
+
+o WWW Resources:
+
Our WEB site, http://www.freebsd.org, is also a very good source for
updated information and provides a number of advanced documentation
-facilities. You may use the BSDI version of Netscape for browsing the
-World Wide Web directly from FreeBSD.
+searching facilities. If you wish to use Netscape as your browser,
+you may install the BSDI version from ftp://ftp.mcom.com or simply
+type:
+
+ # cd /usr/ports/net/netscape
+ # make all install
+
+If you have the Ports collection installed (see the Configuration menu
+or enable the Ports collection when given the chance to do so during
+the Novice installation).
+
-You may also wish to look in /usr/share/FAQ and /usr/share/doc for
-further information on the system.
+Several other non-commercial browsers are also available in
+/usr/ports/net and may be compiled and installed in the same fashion.
+Many are also available as pre-compiled packages - see the Packages
+entry in the Configuration menu for more details.
+The Handbook and FAQ are also available as on-line documents in
+/usr/share/doc and can be read using the ``file:/usr/share/doc''
+syntax in any HTML capable browser.
-Thanks for reading all of this, and we sincerely hope you enjoy this
-release of FreeBSD!
+We sincerely hope you enjoy this release of FreeBSD!
- Jordan Hubbard,
- for The FreeBSD Project
+ The FreeBSD Project
diff --git a/release/sysinstall/help/relnotes.hlp b/release/sysinstall/help/relnotes.hlp
index d4e30e7..e0c206a 100644
--- a/release/sysinstall/help/relnotes.hlp
+++ b/release/sysinstall/help/relnotes.hlp
@@ -1,6 +1,6 @@
RELEASE NOTES
FreeBSD
- Release 2.0.5
+ Release 2.1
1. Technical overview
---------------------
@@ -10,16 +10,16 @@ for Intel i386/i486/Pentium (or compatible) based PC's. It is based
primarily on software from U.C. Berkeley's CSRG group, with some
enhancements from NetBSD, 386BSD, and the Free Software Foundation.
-Since our release of FreeBSD 2.0 some 8 months ago, the performance,
-feature set, and stability of FreeBSD has improved dramatically. The
+Since our release of FreeBSD 2.0 over a year ago, the performance,
+feature set and stability of FreeBSD has improved dramatically. The
largest change is a revamped VM system with a merged VM/file buffer
-cache that not only increases performance, but reduces FreeBSD's
-memory footprint, making a 4MB configuration a more acceptable
-minimum. Other enhancements include full NIS client and server
-support, transaction TCP support, dial-on-demand PPP, an improved SCSI
+cache that not only increases performance but reduces FreeBSD's memory
+footprint, making a 5MB configuration a more acceptable minimum.
+Other enhancements include full NIS client and server support,
+transaction TCP support, dial-on-demand PPP, an improved SCSI
subsystem, early ISDN support, support for FDDI and Fast Ethernet
(100Mbit) adapters, improved support for the Adaptec 2940 (WIDE and
-narrow) and many hundreds of bug fixes.
+narrow) and 3940 SCSI adaptors along with many hundreds of bug fixes.
We've also taken the comments and suggestions of many of our users to
heart and have attempted to provide what we hope is a more sane and
@@ -27,63 +27,46 @@ easily understood installation process. Your feedback on this
(constantly evolving) process is especially welcome!
In addition to the base distributions, FreeBSD offers a new ported
-software collection with some 270 commonly sought-after programs. The
+software collection with over 350 commonly sought-after programs. The
list of ports ranges from http (WWW) servers, to games, languages,
editors and almost everything in between. The entire ports collection
requires only 10MB of storage, all ports being expressed as "deltas"
to their original sources. This makes it much easier for us to update
-ports, and greatly reduces the disk space demands made by the older
-1.0 ports collection. To compile a port, you simply change to the
-directory of the program you wish to install, type make and let the
-system do the rest. The full original distribution for each port you
-build is retrieved dynamically off of CDROM or a local ftp site, so
-you need only enough disk space to build the ports you want. (Almost)
-every port is also provided as a pre-compiled "package" which can be
-installed with a simple command (pkg_add) by those who do not wish to
-compile their own ports from source. See the file:
- /usr/share/FAQ/Text/ports.FAQ
-for a more complete description of the ports collection.
-
-
-Since our first release of FreeBSD 1.0 nearly two years ago, FreeBSD
-has changed almost entirely. A new port from the Berkeley 4.4 code
-base was done, which brought the legal status of the system out of the
-shadows with the blessing of Novell (the new owners of USL and UNIX). The
-port to 4.4 has also brought in a host of new features, filesystems
-and enhanced driver support. With our new unencumbered code base, we
-have every reason to hope that we'll be able to release quality
-operating systems without further legal encumbrance for some time to
-come!
-
-FreeBSD 2.0.5 represents the culmination of 2 years of work and many
-thousands of man hours put in by an international development team.
-We hope you enjoy it!
-
-A number of additional documents which you may find very helpful in
-the process of installing and using FreeBSD may also be found in
-the "FAQ" directory, either under /usr/share/FAQ on an installed
-system or at the top level of the CDROM or FTP distribution from
-where you're reading this file. Please consult FAQ/Text/ROADMAP
-for a brief description of the resources provided by the FAQ directory.
-
-For a list of contributors and a general project description, please see
-the file "CONTRIB.FreeBSD" which should be bundled with your binary
-distribution.
-
-Also see the "REGISTER.FreeBSD" file for information on registering
-with the "Free BSD user counter". This counter is for ALL freely
-available variants of BSD, not just FreeBSD, and we urge you to register
-yourself with it.
+ports and greatly reduces the disk space demands made by the ports
+collection. To compile a port, you simply change to the directory of
+the program you wish to install, type make and let the system do the
+rest. The full original distribution for each port you build is
+retrieved dynamically off of CDROM or a local ftp site, so you need
+only enough disk space to build the ports you want. (Almost) every
+port is also provided as a pre-compiled "package" which can be
+installed with a simple command (pkg_add). See also the new Packages
+option in the Configuration menu for an especially convenient interface
+to the package collection.
+
+
+A number of additional documents which you may find helpful in the
+process of installing and using FreeBSD may now also be found in the
+/usr/share/doc directory. You may view the manuals with any HTML
+capable browser by saying:
+
+ To read the handbook:
+ <browser> file:/usr/share/doc/handbook/handbook.html
+
+ To read the FAQ:
+ <browser> file:/usr/share/doc/FAQ/freebsd-faq.html
+
+You can also visit the master (and most frequently updated) copies at
+http://www.freebsd.org.
The core of FreeBSD does not contain DES code which would inhibit its
being exported outside the United States. There is an add-on package
to the core distribution, for use only in the United States, that
contains the programs that normally use DES. The auxiliary packages
-provided separately can be used by anyone. A freely (from outside the
-U.S.) exportable European distribution of DES for our non-U.S. users also
-exists and is described in the FreeBSD FAQ.
+provided separately can be used by anyone. A freely (from outside the
+U.S.) exportable distribution of DES for our non-U.S. users also
+exists at ftp://ftp.internat.freebsd.org/pub/FreeBSD.
-If password security for FreeBSD is all you need, and you have no
+If password security for FreeBSD is all you need and you have no
requirement for copying encrypted passwords from different hosts
(Suns, DEC machines, etc) into FreeBSD password entries, then
FreeBSD's MD5 based security may be all you require! We feel that our
@@ -92,335 +75,6 @@ messy export issues to deal with. If you're outside (or even inside)
the U.S., give it a try!
-1.1 What's new in 2.0.5?
-------------------------
-
-The following features were added or substantially improved between
-the release of 2.0 and this 2.0.5 release. In order to facilitate
-better communication, the person, or persons, responsible for each
-enhancement is noted. Any questions regarding the new functionality
-should be directed to them first.
-
-KERNEL:
-
-Merged VM-File Buffer Cache
----------------------------
-A merged VM/buffer cache design greatly enhances overall system
-performance and makes it possible to do a number of more optimal
-memory allocation strategies that were not possible before.
-
-Owner: David Greenman (davidg@FreeBSD.org) and
- John Dyson (dyson@implode.root.com)
-
-
-Network PCB hash optimization
------------------------------
-For systems with a great number of active TCP connections (WEB and ftp
-servers, for example), this greatly speeds up the lookup time required
-to match an incoming packet up to its associated connection.
-
-Owner: David Greenman (davidg@FreeBSD.org)
-
-
-Name cache optimization
------------------------
-The name-cache would cache all files of the same name to the same bucket,
-which would put for instance all ".." entries in the same bucket. We added
-the parent directory version to frustrate the hash, and improved the
-management of the cache in various other ways while we were at it.
-
-Owner: Poul-Henning Kamp (phk@FreeBSD.org)
- David Greenman (davidg@FreeBSD.org)
-
-
-Less restrictive swap-spaces
-----------------------------
-The need to compile the names of the swap devices into the kernel has been
-removed. Now swapon will accept any block devices, up to the maximum
-number of swap devices configured in the kernel.
-
-Owner: Poul-Henning Kamp (phk@FreeBSD.org)
- David Greenman (davidg@FreeBSD.org)
-
-
-Hard Wired SCSI Devices
------------------------
-Prior to 2.0.5, FreeBSD performed dynamic assignment of unit numbers
-to SCSI devices as they were probed, allowing a SCSI device failure to
-possibly change unit number assignment and prevent filesystems on
-still functioning disks from mounting. Hard wiring allows static
-allocation of unit numbers (and hence device names) to scsi devices
-based on SCSI ID and bus. SCSI configuration occurs in the kernel
-config file. Samples of the configuration syntax can be found in the
-scsi(4) man page or the LINT kernel config file.
-
-Owner: Peter Dufault (dufault@hda.com)
-Sources involved: sys/scsi/* usr.sbin/config/*
-
-
-Slice Support
--------------
-FreeBSD now supports a "slice" abstraction which makes it more
-completely interoperable with other operating system partitions. This
-support will allow FreeBSD to inhabit DOS extended partitions.
-
-Owner: Bruce Evans (bde@FreeBSD.org)
-Sources involved: sys/disklabel.h sys/diskslice.h sys/dkbad.h
- kern/subr_diskslice.c kern/subr_dkbad.c
- i386/isa/diskslice_machdep.c
- i386/isa/wd.c scsi/sd.c dev/vn/vn.c
-
-
-Support for Ontrack Disk Manager Version 6.0
---------------------------------------------
-Support has been added for disks which use Ontrack Disk Manager. The
-fdisk program does NOT know about it however, so make all changes
-using the install program on the boot.flp or the Ontrack Disk Manager
-tool under DOS.
-
-Owner: Poul-Henning Kamp (phk@FreeBSD.org)
-
-
-Bad144 is back and working
---------------------------
-Bad144 works again, though the semantics are slightly different than
-before in that the bad-spots are kept relative to the slice rather
-than absolute on the disk.
-
-Owner: Bruce Evans (bde@FreeBSD.org)
- Poul-Henning Kamp (phk@FreeBSD.org)
-
-
-NEW DEVICE SUPPORT:
-
- SCSI and CDROM Devices
-
-Matsushita/Panasonic (Creative) CD-ROM driver
----------------------------------------------
-The Matsushita/Panasonic CR-562 and CR-563 drives are now supported
-when connected to a Sound Blaster or 100% compatible host adapter. Up
-to four host adapters are supported for a total of 16 CD-ROM drives.
-The audio functions are supported, along with access to the raw (2352 byte)
-data frames of any compact disc. Audio discs may be played using Karoke
-variable speed functions.
-
-Owner: Frank Durda IV bsdmail@nemesis.lonestar.org
-Sources involved: isa/matcd
-
-
-Adaptec 2742/2842/2940 SCSI driver
-----------------------------------
-The original 274x/284x driver has evolved considerably since the 2.0
-release. We now offer full support for the 2940 series as well as the
-Wide models of these cards. The arbitration bug (as well as many
-others) that caused the driver problems with fast devices has been
-corrected and there is even experimental tagged queuing support
-(kernel option "AHC_TAGENABLE"). John Aycock has also released the
-sequencer code under a "Berkeley style" copyright making the driver
-entirely clean of the GPL.
-
-Owner: Justin Gibbs (gibbs@FreeBSD.org)
-Sources involved: isa/aic7770.c pci/aic7870.c i386/scsi/*
- sys/dev/aic7xxx/*
-
-
-NCR5380/NCR53400 SCSI ("ProAudio Spectrum") driver
---------------------------------------------------
-Owner: core
-Submitted by: Serge Vakulenko (vak@cronyx.ru)
-Sources involved: isa/ncr5380.c
-
-
-Sony CDROM driver
------------------
-Owner: core
-Submitted by: Mikael Hybsch (micke@dynas.se)
-Sources involved: isa/scd.c
-
-
- Serial Devices
-
-SDL Communications Riscom/8 Serial Board Driver
------------------------------------------------
-Owner: Andrey Chernov (ache@FreeBSD.org)
-Sources involved: isa/rc.c isa/rcreg.h
-
-
-Cyclades Cyclom-y Serial Board Driver
--------------------------------------
-Owner: Bruce Evans (bde@FreeBSD.org)
-Submitted by: Andrew Werple (andrew@werple.apana.org.au) and
- Heikki Suonsivu (hsu@cs.hut.fi)
-Obtained from: NetBSD
-Sources involved: isa/cy.c
-
-
-Cronyx/Sigma sync/async serial driver
--------------------------------------
-Owner: core
-Submitted by: Serge Vakulenko
-Sources involved: isa/cronyx.c
-
-
-
- Networking
-
-Diskless booting
-----------------
-Diskless booting in 2.0.5 is much improved. The boot-program is in
-src/sys/i386/boot/netboot, and can be run from an MSDOS system or
-burned into an EPROM. Local swapping is also possible. WD, SMC, 3COM
-and Novell ethernet cards are currently supported.
-
-
-DEC DC21140 Fast Ethernet driver
---------------------------------
-This driver supports any of the numerous NICs using the DC21140 chipset
-including the 100Mb DEC DE-500-XA and SMC 9332.
-
-Owner: core
-Submitted by: Matt Thomas (thomas@lkg.dec.com)
-Sources involved: pci/if_de.c pci/dc21040.h
-
-
-DEC FDDI (DEFPA/DEFEA) driver
------------------------------
-Owner: core
-Submitted by: Matt Thomas (thomas@lkg.dec.com)
-Sources involved: pci/if_pdq.c pci/pdq.c pci/pdq_os.h pci/pdqreg.h
-
-
-3Com 3c505 (Etherlink/+) NIC driver
------------------------------------
-Owner: core
-Submitted by: Dean Huxley (dean@fsa.ca)
-Obtained from: NetBSD
-Sources involved: isa/if_eg.c
-
-
-Fujitsu MB86960A family of NICs driver
--------------------------------------
-Owner: core
-Submitted by: M.S. (seki@sysrap.cs.fujitsu.co.jp)
-Sources involved: isa/if_fe.c
-
-
-Intel EtherExpress driver
--------------------------
-Owner: Rodney W. Grimes (rgrimes@FreeBSD.org)
-Sources involved: isa/if_ix.c isa/if_ixreg.h
-
-
-3Com 3c589 driver
------------------
-Owner: core
-Submitted by: "HOSOKAWA Tatsumi" (hosokawa@mt.cs.keio.ac.jp),
- Seiji Murata (seiji@mt.cs.keio.ac.jp) and
- Noriyuki Takahashi (hor@aecl.ntt.jp)
-Sources involved: isa/if_zp.c
-
-
-IBM Credit Card Adapter driver
-------------------------------
-Owner: core
-Submitted by: "HOSOKAWA Tatsumi" (hosokawa@mt.cs.keio.ac.jp),
-Sources involved: isa/pcic.c isa/pcic.h
-
-
-EDSS1 and 1TR6 ISDN interface driver
-------------------------------------
-Owner: core
-Submitted by: Dietmar Friede (dfriede@drnhh.neuhaus.de) and
- Juergen Krause (jkr@saarlink.de)
-Sources involved: gnu/isdn/*
-
-
- Miscellaneous Drivers
-
-Joystick driver
----------------
-Owner: Jean-Marc Zucconi (jmz@FreeBSD.org)
-Sources involved: isa/joy.c
-
-
-National Instruments "LabPC" driver
------------------------------------
-Owner: Peter Dufault (dufault@hda.com)
-Sources involved: isa/labpc.c
-
-
-WD7000 driver
--------------
-Owner: Olof Johansson (offe@ludd.luth.se)
-
-
-Pcvt Console driver
--------------------
-Owner: Joerg Wunsch (joerg@FreeBSD.org)
-Submitted by: Hellmuth Michaelis (hm@altona.hamburg.com)
-Sources involved: isa/pcvt/* usr.sbin/pcvt/*
-
-
-BSD-audio emulator for VAT driver
----------------------------------
-Owner: Amancio Hasty (ahasty@FreeBSD.org) and
- Paul Traina (pst@FreeBSD.org)
-Sources involved: isa/sound/vat_audio.c isa/sound/vat_audioio.h
-
-
-National Instruments AT-GPIB and AT-GPIB/TNT GPIB driver
---------------------------------------------------------
-Owner: core
-Submitted by: Fred Cawthorne (fcawth@delphi.umd.edu)
-Sources involved: isa/gpib.c isa/gpib.h isa/gpibreg.h
-
-
-Genius GS-4500 hand scanner driver
-----------------------------------
-Owner: core
-Submitted by: Gunther Schadow (gusw@fub46.zedat.fu-berlin.de)
-Sources involved: isa/gsc.c isa/gscreg.h
-
-
-CORTEX-I Frame Grabber
-----------------------
-Owner: core
-Submitted by: Paul S. LaFollette, Jr.
-Sources involved: isa/ctx.c isa/ctxreg.h
-
-
-Video Spigot video capture card
--------------------------------
-Owner: Jim Lowe
-
-
-
-1.2 Experimental features
--------------------------
-
-The unionfs and LFS file systems are known to be severely broken in
-2.0.5. This is in part due to old bugs that we haven't had time to
-resolve yet and the need to update these file systems to deal with the
-new VM system. We hope to address these issues in a later release of
-FreeBSD.
-
-FreeBSD now supports running iBCS2 compatible binaries (currently SCO
-UNIX 3.2.2 & 3.2.4 and ISC 2.2 COFF format are supported). The iBCS2
-emulator is in its early stages, but it is functional, we haven't been
-able to do exhaustive testing (lack of commercial apps), but almost
-all of SCO's 3.2.2 binaries are working, so is an old INFORMIX-2.10
-for SCO. Further testing is nessesary to complete this project. There
-is also work under way for ELF & XOUT loaders, and most of the svr4
-syscall wrappers have been written.
-
-FreeBSD also implements enough of its Linux compatibility that we
-can now run Linux DOOM! See the ``xperimnt'' directory (on your local
-FTP server or CDROM) for full docs on how to set this up.
-
-Owner: Soren Schmidt (sos) & Sean Eric Fagan (sef)
-Sources involved: sys/i386/ibcs2/* + misc kernel changes.
-
-
2. Supported Configurations
---------------------------
@@ -430,9 +84,9 @@ based PC's, ranging from 386sx to Pentium class machines (though the
configurations, various SCSI controller, network and serial cards is
also provided.
-Following is a list of all disk controllers and ethernet cards currently
-known to work with FreeBSD. Other configurations may very well work, and
-we have simply not received any indication of this.
+What follows is a list of all disk controllers and ethernet cards
+currently known to work with FreeBSD. Other configurations may also
+work, but we have simply not received any confirmation of this.
2.1. Disk Controllers
@@ -446,17 +100,19 @@ ATA
Adaptec 152x series ISA SCSI controllers
Adaptec 154x series ISA SCSI controllers
Adaptec 174x series EISA SCSI controller in standard and enhanced mode.
-Adaptec 274X/284X/2940 (Narrow/Wide/Twin) series ISA/EISA/PCI SCSI controllers
+Adaptec 274X/284X/2940/3940 (Narrow/Wide/Twin) series ISA/EISA/PCI SCSI
+controllers.
Adaptec AIC-6260 and AIC-6360 based boards, which includes
the AHA-152x and SoundBlaster SCSI cards.
** Note: You cannot boot from the SoundBlaster cards as they have no
- on-board BIOS, which is necessary for mapping the boot device into the
+ on-board BIOS, such being necessary for mapping the boot device into the
system BIOS I/O vectors. They're perfectly usable for external tapes,
CDROMs, etc, however. The same goes for any other AIC-6x60 based card
without a boot ROM. Some systems DO have a boot ROM, which is generally
indicated by some sort of message when the system is first powered up
- or reset. Check your system/board documentation for more details.
+ or reset, and in such cases you *will* also be able to boot from them.
+ Check your system/board documentation for more details.
[Note that Buslogic was formerly known as "Bustec"]
Buslogic 545S & 545c
@@ -483,25 +139,14 @@ SCSI-I & SCSI-II peripherals, including Disks, tape drives (including
DAT) and CD ROM drives.
The following CD-ROM type systems are supported at this time:
-(cd) SCSI (also includes ProAudio Spectrum and SoundBlaster SCSI)
-(mcd) Mitsumi proprietary interface
-(matcd) Matsushita/Panasonic (Creative) proprietary interface
-(scd) Sony proprietary interface
-
-Note: CD-Drives with IDE interfaces are not supported at this time.
-
-Some controllers have limitations with the way they deal with >16MB of
-memory, due to the fact that the ISA bus only has a DMA address space
-of 24 bits. If you do your arithmetic, you'll see that this makes it
-impossible to do direct DMA to any address >16MB. This limitation is
-even true of some EISA controllers (which are normally 32 bit) when
-they're configured to emulate an ISA card, which they then do in *all*
-respects. This problem is avoided entirely by IDE controllers (which
-do not use DMA), true EISA controllers (like the UltraStor, Adaptec
-1742A or Adaptec 2742) and most VLB (local bus) controllers. In the
-cases where it's necessary, the system will use "bounce buffers" to
-talk to the controller so that you can still use more than 16Mb of
-memory without difficulty.
+(cd) SCSI interface (also includes ProAudio Spectrum and
+ SoundBlaster SCSI)
+(mcd) Mitsumi proprietary interface (all models)
+(matcd) Matsushita/Panasonic (Creative SoundBlaster) proprietary
+ interface (562/563 models)
+(scd) Sony proprietary interface (all models)
+(wcd) ATAPI IDE interface (experimental and should be considered ALPHA
+ quality!).
2.2. Ethernet cards
@@ -541,6 +186,10 @@ Toshiba ethernet cards
PCMCIA ethernet cards from IBM and National Semiconductor are also
supported.
+Note that NO token ring cards are supported at this time as we're
+still waiting for someone to donate a driver for one of them. Any
+takers?
+
2.3. Misc
---------
@@ -555,20 +204,13 @@ Cyclades Cyclom-y Serial Board.
STB 4 port card using shared IRQ.
-Mitsumi (all models) CDROM interface and drive.
-
SDL Communications Riscom/8 Serial Board.
-SoundBlaster SCSI and ProAudio Spectrum SCSI CDROM interface and drive.
-
-Matsushita/Panasonic (Creative SoundBlaster) CDROM interface and drive.
-
Adlib, SoundBlaster, SoundBlaster Pro, ProAudioSpectrum, Gravis UltraSound
and Roland MPU-401 sound cards.
-FreeBSD currently does NOT support IBM's microchannel (MCA) bus, but
-support is apparently close to materializing. Details will be posted
-as the situation develops.
+FreeBSD currently does NOT support IBM's microchannel (MCA) bus.
+
3. Obtaining FreeBSD
@@ -582,21 +224,23 @@ You can ftp FreeBSD and any or all of its optional packages from
`ftp.freebsd.org' - the official FreeBSD release site.
For other locations that mirror the FreeBSD software see the file
-MIRROR.SITES. Please ftp the distribution from the nearest site
-to you netwise.
+MIRROR.SITES. Please ftp the distribution from the site closest (in
+networking terms) to you. Additional mirror sites are always welcome!
+Contact admin@freebsd.org for more details if you'd like to become an
+official mirror site.
If you do not have access to the internet and electronic mail is your
only recourse, then you may still fetch the files by sending mail to
`ftpmail@decwrl.dec.com' - putting the keyword "help" in your message
-to get more information on how to fetch files from ftp.freebsd.org.
-Note: This approach will end up sending many *tens of megabytes*
-through the mail, and should only be employed as an absolute LAST
-resort!
+to get more information on how to fetch files using this mechanism.
+Please do note, however, that this will end up sending many *tens of
+megabytes* through the mail and should only be employed as an absolute
+LAST resort!
2. CDROM
-FreeBSD 2.0.5 may be ordered on CDROM from:
+FreeBSD 2.1 may be ordered on CDROM from:
Walnut Creek CDROM
4041 Pike Lane, Suite D
@@ -607,19 +251,21 @@ Or via the internet from orders@cdrom.com or http://www.cdrom.com.
Their current catalog can be obtained via ftp as:
ftp://ftp.cdrom.com/cdrom/catalog.
-Cost per CD is $39.95, or $24.95 with a FreeBSD subscription. With
-a subscription, you will automatically receive updates as they
-are released. Your credit card will be billed when each disk is shipped
-and you may cancel your subscription at any time without further obligation.
+Cost per CD is $39.95 or $24.95 with a FreeBSD subscription. With a
+subscription, you will automatically receive updates as they are
+released. Your credit card will be billed when each disk is shipped
+and you may cancel your subscription at any time without further
+obligation.
-Walnut Creek CDROM also sells a full line of FreeBSD related merchandise such
-as T-shirts ($14.95, available in "child", Large and XL sizes), coffee mugs
-($9.95), tattoos ($0.25 each) and posters ($3.00).
+Walnut Creek CDROM also sells a full line of FreeBSD related
+merchandise such as T-shirts ($14.95, available in "child", Large and
+XL sizes), coffee mugs ($9.95), tattoos ($0.25 each) and posters
+($3.00).
-Shipping (per order not per disc) is $5 in the US, Canada or
-Mexico and $9.00 overseas. They accept Visa, Mastercard, Discover,
-American Express or checks in U.S. Dollars and ship COD within the
-United States. California residents please add 8.25% sales tax.
+Shipping (per order not per disc) is $5 in the US, Canada or Mexico
+and $9.00 overseas. They accept Visa, Mastercard, Discover, American
+Express or checks in U.S. Dollars and ship COD within the United
+States. California residents please add 8.25% sales tax.
Should you be dissatisfied for any reason, the CD comes with an
unconditional return policy.
@@ -630,13 +276,16 @@ Reporting problems, making suggestions, submitting code
Your suggestions, bug reports and contributions of code are always
valued - please do not hesitate to report any problems you may find
-(preferably with a fix attached if you can!).
+(preferably with a fix attached, if you can!).
The preferred method to submit bug reports from a machine with
internet mail connectivity is to use the send-pr command. Bug reports
will be dutifully filed by our faithful bugfiler program and you can
be sure that we'll do our best to respond to all reported bugs as soon
-as possible.
+as possible. Bugs filed in this way are also visible on our WEB site
+in the support section and are therefore valuable both as bug reports
+and as "signposts" for other users concerning potential problems to
+watch out for.
If, for some reason, you are unable to use the send-pr command to
submit a bug report, you can try to send it to:
@@ -648,17 +297,20 @@ Otherwise, for any questions or suggestions, please send mail to:
questions@FreeBSD.org
+
Additionally, being a volunteer effort, we are always happy to have
-extra hands willing to help - there are already far more enhancements
-to be done than we can ever manage to do by ourselves! To contact us
-on technical matters, or with offers of help, you may send mail to:
+extra hands willing to help - there are already far more desired
+enhancements than we'll ever be able to manage by ourselves! To
+contact us on technical matters, or with offers of help, please send
+mail to:
hackers@FreeBSD.org
-Since these mailing lists can experience significant amounts of
-traffic, if you have slow or expensive mail access and you are
-only interested in keeping up with significant FreeBSD events, you may
-find it preferable to subscribe to:
+
+Please note that these mailing lists can experience *significant*
+amounts of traffic and if you have slow or expensive mail access and
+are only interested in keeping up with significant FreeBSD events, you
+may find it preferable to subscribe instead to:
announce@FreeBSD.org
@@ -679,9 +331,11 @@ FreeBSD represents the cumulative work of many dozens, if not
hundreds, of individuals from around the world who have worked very
hard to bring you this release. It would be very difficult, if not
impossible, to enumerate everyone who's contributed to FreeBSD, but
-nonetheless we shall try (in alphabetical order, of course). If your
-name is not mentioned, please be assured that its omission is entirely
-accidental.
+nonetheless we shall try (in alphabetical order, of course). If you've
+contributed something substantive to us and your name is not mentioned
+here, please be assured that its omission is entirely accidental.
+Please contact hackers@FreeBSD.org for any desired updates to the
+lists that follow:
The Computer Systems Research Group (CSRG), U.C. Berkeley.
@@ -691,21 +345,18 @@ Bill Jolitz, for his initial work with 386BSD.
The FreeBSD Core Team
(in alphabetical order by first name):
- Andreas Schulz <ats@FreeBSD.org>
Andrey A. Chernov <ache@FreeBSD.org>
Bruce Evans <bde@FreeBSD.org>
David Greenman <davidg@FreeBSD.org>
Garrett A. Wollman <wollman@FreeBSD.org>
Gary Palmer <gpalmer@FreeBSD.org>
- Geoff Rehmet <csgr@FreeBSD.org>
- Jack Vogel <jackv@FreeBSD.org>
+ Jörg Wunsch <joerg@FreeBSD.org>
John Dyson <dyson@FreeBSD.org>
Jordan K. Hubbard <jkh@FreeBSD.org>
Justin Gibbs <gibbs@FreeBSD.org>
- Paul Richards <paul@FreeBSD.org>
+ Peter Wemm <peter@FreeBSD.org>
Poul-Henning Kamp <phk@FreeBSD.org>
Rich Murphey <rich@FreeBSD.org>
- Rodney W. Grimes <rgrimes@FreeBSD.org>
Satoshi Asami <asami@FreeBSD.org>
Søren Schmidt <sos@FreeBSD.org>
@@ -719,29 +370,24 @@ Special mention to:
Additional FreeBSD helpers and beta testers:
- J.T. Conklin Julian Elischer
- Frank Durda IV Peter Dufault
- Sean Eric Fagan Jeffrey Hsu
- Terry Lambert L Jonas Olsson
- Chris Provenzano Dave Rivers
- Guido van Rooij Steven Wallace
- Atsushi Murai Scott Mace
- Nate Williams
+ Atsushi Murai Coranth Gryphon
+ Dave Rivers Frank Durda IV
+ Guido van Rooij Jeffrey Hsu
+ John Hay Julian Elischer
+ Kaleb S. Keithley Michael Smith
+ Nate Williams Peter Dufault
+ Peter Wemm Rod Grimes
+ Scott Mace Stefan Esser
+ Steven Wallace Terry Lambert
+ Wolfram Schneider
And everyone at Montana State University for their initial support.
+And to the many thousands of FreeBSD users and testers all over the
+world without whom this release simply would not have been possible.
-Jordan would also like to give special thanks to Poul-Henning Kamp and
-Gary Palmer, both of whom put in long hours helping him to construct
-the new installation utility. Poul, being a proud new father, was
-especially pressed for time and yet somehow managed to put in
-a significant amount of effort anyway. This release could not have
-happened without him! Thank you both!
-
-Thanks also to everyone else who helped, especially those not
-mentioned, and we sincerely hope you enjoy this release of FreeBSD!
-
+We sincerely hope you enjoy this release of FreeBSD!
The FreeBSD Core Team
-$Id: RELNOTES,v 1.10 1995/06/10 09:56:30 jkh Exp $
+$Id: relnotes.hlp,v 1.1.2.10 1995/11/17 13:34:54 jkh Exp $
diff --git a/release/sysinstall/help/slice.hlp b/release/sysinstall/help/slice.hlp
index e055ca4..1c1581b 100644
--- a/release/sysinstall/help/slice.hlp
+++ b/release/sysinstall/help/slice.hlp
@@ -1,15 +1,23 @@
-This is the Main Partition (or ``Slice'') Editor.
+This is the Main Partition (or ``FDISK'') Editor.
+
+Possible commands are printed at the bottom and the Master Boot Record
+contents are shown at the top. You can move up and down with the
+arrow keys and (C)reate a new partition whenever the highlighted
+selection bar is over a partition whose type is marked as "unused."
+
+You are expected to leave this screen with at least one partition
+marked "FreeBSD." Note that unlike Linux, you don't need to create
+multiple FreeBSD fdisk partition entries for different things like
+swap, file systems, etc. The usual convention is to create ONE
+FreeBSD partition per drive and then subsection this partition into
+swap and file systems with the Label editor.
-Possible commands are printed at the bottom, and the Master Boot Record
-contents are at the top. You can move up and down with the arrow keys
-and can (C)reate a new partition whenever the "bar" is over a partition
-whose type is set to "unused".
The flags field has the following legend:
- '=' -- Partition is properly aligned.
- '>' -- The partition doesn't end before cylinder 1024
- 'R' -- Has been marked as containing the root (/) filesystem
+ '=' -- This partition is properly aligned.
+ '>' -- This partition doesn't end before cylinder 1024
+ 'R' -- This partition contains the root (/) filesystem
'B' -- Partition employs BAD144 bad-spot handling
'C' -- This is the FreeBSD 2.0-compatibility partition (default)
'A' -- This partition is marked active.
@@ -21,8 +29,39 @@ If no partition is marked Active, you will need to either install
a Boot Manager (the option for which will be presented later in the
installation) or set one Active before leaving this screen.
-To leave this screen, type `Q'.
+To leave the partition editor, type `Q'.
No actual changes will be made to the disk until you (C)ommit from the
-Install menu! You're working with what is essentially a copy of
-the disk label(s), both here and in the Label Editor.
+Install menu or use the (W)rite option here! You're working with what
+is essentially a copy of the disk label(s), both here and in the Label
+Editor.
+
+NOTE: The (W)rite option is HIGHLY DANGEROUS and should NOT BE USED if
+you're installing a new system! It's only for use in resurrecting
+or changing an existing system, and will cause unpredictable things to
+happen if you use it in any other circumstances. Don't do it! Wait
+for the final commit dialog if you're express/novice installing, or
+use the "Commit" menu item if you're custom installing, and do it there.
+
+If you want to use the entire disk for FreeBSD, type `A'. You'll be
+asked whether or not you wish to keep the disk (potentially) compatible
+with other operating systems, i.e. the information in the FDISK table
+should be kept valid. If you select the default of `Yes', slices will be
+aligned to fictitious cylinder boundaries and space will be reserved
+in front of the FreeBSD slice for a [future] possible boot manager.
+
+For the truly dedicated disk case, you can select `No' at the
+compatibility prompt. In that case, all BIOS geometry considerations
+will no longer be in effect and you can safely ignore any
+``The detected geometry is invalid'' warning messages you may later
+see. It is also not necessary in this case to set a partition bootable
+or install an MBR boot manager as both things are then irrelevant.
+
+The FreeBSD slice will start at absolute sector 0 of the disk (so that
+FreeBSD's disk label is identical to the Master Boot Record) and
+extend to the very last sector of the disk medium. Needless to say,
+such a disk cannot have any sort of a boot manager, `disk manager',
+or anything else that has to interact with the BIOS. This option is
+therefore only considered safe for SCSI disks and most IDE disks and
+is primarily intented for people who are going to set up a dedicated
+FreeBSD server or workstation, not a typical `home PC'.
diff --git a/release/sysinstall/help/usage.hlp b/release/sysinstall/help/usage.hlp
index b01a94b..03a8159 100644
--- a/release/sysinstall/help/usage.hlp
+++ b/release/sysinstall/help/usage.hlp
@@ -1,6 +1,9 @@
HOW TO USE THIS SYSTEM
======================
+The following keys are recognised in most of the dialogs you'll
+encounter during this installation:
+
KEY ACTION
--- ------
UP ARROW Move to previous item (or up, in a text field).
@@ -12,18 +15,22 @@ LEFT ARROW Move to previous item or group (same as SHIFT-TAB).
RETURN Select item.
PAGE UP In text boxes, scrolls up one page.
PAGE DOWN In text boxes, scrolls down one page.
-SPACE In "radio" or multiple choice menus, toggle the current item.
+SPACE In "radio" or multiple choice menus, toggle the current
+ item. In help screens, scroll to next page of text.
F1 Help (in screens that provide it).
-If you also see small "^(-)" or "v(+)" symbols at the edges of a menu,
-it means that there are more items above or below the current one that
-aren't being shown (due to insufficient screen space). Using the
-up/down arrow keys will cause the menu to scroll. When a symbol
-disappears, it means you are at the top (or bottom) of the menu.
-
In text fields, the amount of text above the current point will be
displayed as a percentage in the lower right corner. 100% means
-you're at the bottom of the field.
+you're at the bottom of the available text.
+
+If you see small "^(-)" or "v(+)" symbols at the edges of a menu, it
+means that there are more items above or below the current one that
+aren't being shown (due to insufficient screen space). Using the
+up/down arrow keys will cause the menu to scroll. The PageUp and
+PageDown keys will scroll by entire screens.
+
+When an arrow symbol disappears, it means you are at the top (or
+bottom) of the menu.
Selecting OK in a menu will confirm whatever action it's controlling.
Selecting Cancel will cancel the operation and generally return you to
@@ -35,20 +42,25 @@ SPECIAL FEATURES:
It is also possible to select a menu item by typing the first
character of its name, if unique. Such "accelerator" characters will
-be specially highlighted in the item name.
+be specially highlighted in the item name. Unfortunately, the
+accellerators aren't always unique (a shortcoming of the dialog menu
+library) so you'll only be able to get at the *first* unique menu
+entry for a given accellerator.
The console driver also contains a scroll-back buffer for reviewing
things that may have scrolled off the screen. To use scroll-back,
-press the "Scroll Lock" key on your keyboard and use the arrow or
-Page Up/Page Down keys to move through the saved text. To leave
-scroll-back mode, press the Scroll Lock key again. This feature
-is most useful for dealing with sub-shells or other "wizard modes"
-that don't use menus.
-
-Once the system is fully installed and running "multi-user", you will
-also find that you have multiple "virtual consoles" and can use them to
-have several active sessions at once. Use ALT-F<n> to switch between
-them, where `F<n>' is the function key corresponding to the screen you
-wish to see. By default, the system comes with 3 virtual consoles enabled.
-You can create more by editing the /etc/ttys file, once the system is up,
-for a maximum of 12.
+press the "Scroll Lock" key on your keyboard and use the arrow or Page
+Up/Page Down keys to move through the saved text. To leave
+scroll-back mode, press the Scroll Lock key again. This feature is
+most useful for reading back through your boot messages (go ahead, try
+it now!) though it's also useful when dealing with sub-shells or other
+"wizard modes" that don't use menus and tend to scroll their output
+off the top of the screen.
+
+Once the system is fully installed and running multi-user you will
+also find that you have multiple "virtual consoles" and can use them
+to have several active sessions at once. Use ALT-F<n> to switch
+between them, where `F<n>' is the function key corresponding to the
+screen you wish to see. By default, the system comes with 3 virtual
+consoles enabled. You can create more by editing the /etc/ttys file
+(up to a maximum of 12).
diff --git a/release/sysinstall/install.c b/release/sysinstall/install.c
index 5530e9c..462bda0 100644
--- a/release/sysinstall/install.c
+++ b/release/sysinstall/install.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: install.c,v 1.71.2.1 1995/07/21 10:53:54 rgrimes Exp $
+ * $Id: install.c,v 1.72 1995/09/18 16:52:27 peter Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -42,30 +42,35 @@
*/
#include "sysinstall.h"
+#include <ctype.h>
#include <sys/disklabel.h>
#include <sys/errno.h>
#include <sys/ioctl.h>
#include <sys/fcntl.h>
#include <sys/wait.h>
+#include <sys/param.h>
+#define MSDOSFS
+#include <sys/mount.h>
+#undef MSDOSFS
#include <sys/stat.h>
#include <unistd.h>
+#include <sys/mount.h>
-Boolean SystemWasInstalled = FALSE;
+static void create_termcap(void);
-static Boolean copy_self(void);
-static Boolean root_extract(void);
-
-static Chunk *rootdev;
+#define TERMCAP_FILE "/usr/share/misc/termcap"
static Boolean
-checkLabels(void)
+checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev)
{
Device **devs;
+ Boolean status;
Disk *disk;
- Chunk *c1, *c2, *swapdev, *usrdev;
+ Chunk *c1, *c2, *rootdev, *swapdev, *usrdev;
int i;
- rootdev = swapdev = usrdev = NULL;
+ status = TRUE;
+ *rdev = *sdev = *udev = rootdev = swapdev = usrdev = NULL;
devs = deviceFind(NULL, DEVICE_TYPE_DISK);
/* First verify that we have a root device */
for (i = 0; devs[i]; i++) {
@@ -81,17 +86,25 @@ checkLabels(void)
if (c2->type == part && c2->subtype != FS_SWAP && c2->private) {
if (c2->flags & CHUNK_IS_ROOT) {
if (rootdev) {
- msgConfirm("WARNING: You have more than one root device set?!\nUsing the first one found.");
+ dialog_clear();
+ msgConfirm("WARNING: You have more than one root device set?!\n"
+ "Using the first one found.");
continue;
}
rootdev = c2;
+ if (isDebug())
+ msgDebug("Found rootdev at %s!\n", rootdev->name);
}
else if (!strcmp(((PartInfo *)c2->private)->mountpoint, "/usr")) {
if (usrdev) {
- msgConfirm("WARNING: You have more than one /usr filesystem.\nUsing the first one found.");
+ dialog_clear();
+ msgConfirm("WARNING: You have more than one /usr filesystem.\n"
+ "Using the first one found.");
continue;
}
usrdev = c2;
+ if (isDebug())
+ msgDebug("Found usrdev at %s!\n", usrdev->name);
}
}
}
@@ -99,6 +112,7 @@ checkLabels(void)
}
}
+ swapdev = NULL;
/* Now check for swap devices */
for (i = 0; devs[i]; i++) {
disk = (Disk *)devs[i]->private;
@@ -108,8 +122,10 @@ checkLabels(void)
for (c1 = disk->chunks->part; c1; c1 = c1->next) {
if (c1->type == freebsd) {
for (c2 = c1->part; c2; c2 = c2->next) {
- if (c2->type == part && c2->subtype == FS_SWAP) {
+ if (c2->type == part && c2->subtype == FS_SWAP && !swapdev) {
swapdev = c2;
+ if (isDebug())
+ msgDebug("Found swapdev at %s!\n", swapdev->name);
break;
}
}
@@ -117,284 +133,601 @@ checkLabels(void)
}
}
+ *rdev = rootdev;
if (!rootdev) {
- msgConfirm("No root device found - you must label a partition as /\n in the label editor.");
- return FALSE;
- }
- else if (rootdev->name[strlen(rootdev->name) - 1] != 'a') {
- msgConfirm("Invalid placement of root partition. For now, we only support\nmounting root partitions on \"a\" partitions due to limitations\nin the FreeBSD boot code. Please correct this and\ntry again.");
- return FALSE;
+ dialog_clear();
+ msgConfirm("No root device found - you must label a partition as /\n"
+ "in the label editor.");
+ status = FALSE;
}
+
+ *sdev = swapdev;
if (!swapdev) {
- msgConfirm("No swap devices found - you must create at least one\nswap partition.");
- return FALSE;
+ dialog_clear();
+ msgConfirm("No swap devices found - you must create at least one\n"
+ "swap partition.");
+ status = FALSE;
}
- if (!usrdev)
- msgConfirm("WARNING: No /usr filesystem found. This is not technically\nan error if your root filesystem is big enough (or you later\nintend to get your /usr filesystem over NFS), but it may otherwise\ncause you trouble and is not recommended procedure!");
- return TRUE;
+
+ *udev = usrdev;
+ if (!usrdev) {
+ dialog_clear();
+ msgConfirm("WARNING: No /usr filesystem found. This is not technically\n"
+ "an error if your root filesystem is big enough (or you later\n"
+ "intend to mount your /usr filesystem over NFS), but it may otherwise\n"
+ "cause you trouble if you're not exactly sure what you are doing!");
+ }
+ return status;
}
-static Boolean
+static int
installInitial(void)
{
static Boolean alreadyDone = FALSE;
if (alreadyDone)
- return TRUE;
+ return RET_SUCCESS;
- if (!getenv(DISK_PARTITIONED)) {
- msgConfirm("You need to partition your disk before you can proceed with\nthe installation.");
- return FALSE;
- }
- if (!getenv(DISK_LABELLED)) {
+ if (!variable_get(DISK_LABELLED)) {
+ dialog_clear();
msgConfirm("You need to assign disk labels before you can proceed with\nthe installation.");
- return FALSE;
+ return RET_FAIL;
}
- if (!checkLabels())
- return FALSE;
+ /* If it's labelled, assume it's also partitioned */
+ if (!variable_get(DISK_PARTITIONED))
+ variable_set2(DISK_PARTITIONED, "yes");
/* If we refuse to proceed, bail. */
- if (msgYesNo("Last Chance! Are you SURE you want continue the installation?\n\nIf you're running this on an existing system, we STRONGLY\nencourage you to make proper backups before proceeding.\nWe take no responsibility for lost disk contents!"))
- return FALSE;
-
- (void)diskPartitionWrite(NULL);
-
- if (!installFilesystems()) {
+ dialog_clear();
+ if (msgYesNo("Last Chance! Are you SURE you want continue the installation?\n\n"
+ "If you're running this on a disk with data you wish to save\n"
+ "then WE STRONGLY ENCOURAGE YOU TO MAKE PROPER BACKUPS before\n"
+ "proceeding!\n\n"
+ "We can take no responsibility for lost disk contents!"))
+ return RET_FAIL;
+
+ if (diskLabelCommit(NULL) != RET_SUCCESS) {
+ dialog_clear();
msgConfirm("Couldn't make filesystems properly. Aborting.");
- return FALSE;
+ return RET_FAIL;
}
- if (!copy_self()) {
- msgConfirm("Couldn't clone the boot floppy onto the root file system.\nAborting.");
- return FALSE;
+ if (!copySelf()) {
+ dialog_clear();
+ msgConfirm("Couldn't clone the boot floppy onto the root file system.\n"
+ "Aborting.");
+ return RET_FAIL;
}
dialog_clear();
- chroot("/mnt");
+ if (chroot("/mnt") == -1) {
+ dialog_clear();
+ msgConfirm("Unable to chroot to /mnt - this is bad!");
+ return RET_FAIL;
+ }
+
chdir("/");
variable_set2(RUNNING_ON_ROOT, "yes");
+
/* stick a helpful shell over on the 4th VTY */
- if (OnVTY && !fork()) {
- int i, fd;
- extern int login_tty(int);
-
- msgDebug("Starting an emergency holographic shell over on the 4th screen\n");
- for (i = 0; i < 64; i++)
- close(i);
- fd = open("/dev/ttyv3", O_RDWR);
- ioctl(0, TIOCSCTTY, &fd);
- dup2(0, 1);
- dup2(0, 2);
- if (login_tty(fd) == -1) {
- msgNotify("Can't set controlling terminal");
- exit(1);
+ systemCreateHoloshell();
+ alreadyDone = TRUE;
+ return RET_SUCCESS;
+}
+
+int
+installFixit(char *str)
+{
+ struct ufs_args args;
+ pid_t child;
+ int waitstatus;
+
+ memset(&args, 0, sizeof(args));
+ args.fspec = "/dev/fd0";
+ Mkdir("/mnt2", NULL);
+
+ while (1) {
+ dialog_clear();
+ msgConfirm("Please insert a writable fixit floppy and press return");
+ if (mount(MOUNT_UFS, "/mnt2", 0, (caddr_t)&args) != -1)
+ break;
+ dialog_clear();
+ if (msgYesNo("Unable to mount the fixit floppy - do you want to try again?"))
+ return RET_FAIL;
+ }
+ dialog_clear();
+ dialog_update();
+ end_dialog();
+ DialogActive = FALSE;
+ if (!directoryExists("/tmp"))
+ (void)symlink("/mnt2/tmp", "/tmp");
+ if (!directoryExists("/var/tmp/vi.recover")) {
+ if (Mkdir("/var/tmp/vi.recover", NULL) != RET_SUCCESS) {
+ dialog_clear();
+ msgConfirm("Warning: Was unable to create a /var/tmp/vi.recover directory.\n"
+ "vi will kvetch and moan about it as a result but should still\n"
+ "be essentially usable.");
+ }
+ }
+ /* Link the spwd.db file */
+ if (Mkdir("/etc", NULL) != RET_SUCCESS) {
+ dialog_clear();
+ msgConfirm("Unable to create an /etc directory! Things are weird on this floppy..");
+ }
+ else {
+ if (symlink("/mnt2/etc/spwd.db", "/etc/spwd.db") == -1) {
+ dialog_clear();
+ msgConfirm("Couldn't symlink the /etc/spwd.db file! I'm not sure I like this..");
+ }
+ }
+ if (!file_readable(TERMCAP_FILE))
+ create_termcap();
+ if (!(child = fork())) {
+ struct termios foo;
+
+ signal(SIGTTOU, SIG_IGN);
+ if (tcgetattr(0, &foo) != -1) {
+ foo.c_cc[VERASE] = '\010';
+ if (tcsetattr(0, TCSANOW, &foo) == -1)
+ msgDebug("fixit shell: Unable to set erase character.\n");
}
- printf("Warning: This shell is chroot()'d to /mnt\n");
+ else
+ msgDebug("fixit shell: Unable to get terminal attributes!\n");
+ printf("When you're finished with this shell, please type exit.\n");
+ printf("The fixit floppy itself is mounted as /mnt2\n");
+ setenv("PATH", "/bin:/sbin:/usr/bin:/usr/sbin:/stand:/mnt2/stand", 1);
execlp("sh", "-sh", 0);
- exit(1);
+ msgDebug("fixit shell: Failed to execute shell!\n");
+ return -1;
}
- alreadyDone = TRUE;
- return TRUE;
-}
+ else
+ (void)waitpid(child, &waitstatus, 0);
+ DialogActive = TRUE;
+ clear();
+ dialog_clear();
+ dialog_update();
+ unmount("/mnt2", MNT_FORCE);
+ dialog_clear();
+ msgConfirm("Please remove the fixit floppy now.");
+ return RET_SUCCESS;
+}
+
int
installExpress(char *str)
{
- msgConfirm("In the next menu, you will need to set up a DOS-style\n"
- "partitioning scheme for your hard disk. If you don't\n"
- "want to do anything special, just type `A' to use the\n"
- "whole disk and then `Q' to quit.");
- diskPartitionEditor("express");
-
- msgConfirm("Next, you need to lay out BSD partitions inside of the\n"
- "DOS-style partition just created. If you don't want to\n"
- "do anything special, just type `A' to use the default\n"
- "partitioning scheme and then `Q' to quit.");
- diskLabelEditor("express");
-
- msgConfirm("Now it is time to select an installation subset. There\n"
- "are two basic configurations: Developer and Router. The\n"
- "Developer subset includes sources, documentation, and\n"
- "binaries for almost everything. The Router subset\n"
- "includes the same binaries and documentation, but no\n"
- "sources. You can also install absolutely everything,\n"
- "or select a custom software set.");
+ if (diskPartitionEditor("express") == RET_FAIL)
+ return RET_FAIL;
- while(!Dists) {
- dmenuOpenSimple(&MenuInstallType);
+ if (diskLabelEditor("express") == RET_FAIL)
+ return RET_FAIL;
+
+ if (!Dists) {
+ if (!dmenuOpenSimple(&MenuDistributions))
+ return RET_FAIL;
}
+
+ if (!mediaDevice) {
+ if (!dmenuOpenSimple(&MenuMedia) || !mediaDevice)
+ return RET_FAIL;
+ }
+
+ if (installCommit("express") == RET_FAIL)
+ return RET_FAIL;
+
+ return RET_DONE;
+}
+
+/* Novice mode installation */
+int
+installNovice(char *str)
+{
+ dialog_clear();
+ msgConfirm("In the next menu, you will need to set up a DOS-style (\"fdisk\") partitioning\n"
+ "scheme for your hard disk. If you simply wish to devote all disk space\n"
+ "to FreeBSD (overwritting anything else that might be on the disk(s) selected)\n"
+ "then use the (A)ll command to select the default partitioning scheme followed\n"
+ "by a (Q)uit. If you wish to allocate only free space to FreeBSD, move to a\n"
+ "partition marked \"unused\" and use the (C)reate command.");
+
+ if (diskPartitionEditor("novice") == RET_FAIL)
+ return RET_FAIL;
- msgConfirm("Finally, you must specify an installation medium.");
-
- dmenuOpenSimple(&MenuMedia);
-
- installCommit("express");
-
- dmenuOpenSimple(&MenuConfigure);
- return 0;
+ dialog_clear();
+ msgConfirm("Next, you need to create BSD partitions inside of the fdisk partition(s)\n"
+ "just created. If you have a reasonable amount of disk space (200MB or more)\n"
+ "and don't have any special requirements, simply use the (A)uto command to\n"
+ "allocate space automatically. If you have more specific needs or just don't\n"
+ "care for the layout chosen by (A)uto, press F1 for more information on\n"
+ "manual layout.");
+
+ if (diskLabelEditor("novice") == RET_FAIL)
+ return RET_FAIL;
+
+ dialog_clear();
+ msgConfirm("Now it is time to select an installation subset. There are a number of\n"
+ "canned distribution sets, ranging from minimal installation sets to full\n"
+ "X11 developer oriented configurations. You can also select a custom set\n"
+ "of distributions if none of the provided ones are suitable.");
+ while (1) {
+ if (!dmenuOpenSimple(&MenuDistributions))
+ return RET_FAIL;
+
+ if (Dists || !msgYesNo("No distributions selected. Are you sure you wish to continue?"))
+ break;
+ }
+
+ if (!mediaDevice) {
+ dialog_clear();
+ msgConfirm("Finally, you must specify an installation medium.");
+ if (!dmenuOpenSimple(&MenuMedia) || !mediaDevice)
+ return RET_FAIL;
+ }
+
+ if (installCommit("novice") == RET_FAIL)
+ return RET_FAIL;
+
+ return RET_DONE;
}
/*
* What happens when we select "Commit" in the custom installation menu.
*
- * This is broken into multiple stages so that the user can do a full installation but come
- * back here again to load more distributions, perhaps from a different media type.
- * This would allow, for example, the user to load the majority of the system from CDROM
- * and then use ftp to load just the DES dist.
+ * This is broken into multiple stages so that the user can do a full installation but come back here
+ * again to load more distributions, perhaps from a different media type. This would allow, for
+ * example, the user to load the majority of the system from CDROM and then use ftp to load just the
+ * DES dist.
*/
int
installCommit(char *str)
{
- Device **devs;
int i;
+ extern Boolean cdromMounted;
- if (!Dists) {
- msgConfirm("You haven't told me what distributions to load yet!\nPlease select a distribution from the Distributions menu.");
- return 0;
+ if (!mediaVerify())
+ return RET_FAIL;
+
+ i = RET_DONE;
+ if (RunningAsInit) {
+ if (installInitial() == RET_FAIL)
+ return RET_FAIL;
+ if (configFstab() == RET_FAIL)
+ return RET_FAIL;
+ if (!rootExtract()) {
+ dialog_clear();
+ msgConfirm("Failed to load the ROOT distribution. Please correct\n"
+ "this problem and try again.");
+ return RET_FAIL;
+ }
}
- if (!mediaVerify())
- return 0;
+ if (distExtractAll(NULL) == RET_FAIL)
+ i = RET_FAIL;
- if (RunningAsInit && !SystemWasInstalled) {
- if (!installInitial())
- return 0;
- configFstab();
- }
- if (RunningAsInit && !SystemWasInstalled && !root_extract()) {
- msgConfirm("Failed to load the ROOT distribution. Please correct\nthis problem and try again.");
- return 0;
- }
+ if (installFixup(NULL) == RET_FAIL)
+ i = RET_FAIL;
+
+ if (i != RET_FAIL)
+ variable_set2(SYSTEM_STATE, "base-install");
+
+ if (i != RET_FAIL && !strcmp(str, "novice")) {
+ dialog_clear();
+ msgConfirm("Since you're running the novice installation, a few post-configuration\n"
+ "questions will be asked at this point. For any option you do not wish\n"
+ "to configure, select Cancel.");
+
+ if (mediaDevice->type != DEVICE_TYPE_FTP && mediaDevice->type != DEVICE_TYPE_NFS) {
+ dialog_clear();
+ if (!msgYesNo("Would you like to configure this machine's network interfaces?")) {
+ Device *save = mediaDevice;
- /* If we're about to extract the bin dist again, reset the installed state */
- if (Dists & DIST_BIN)
- SystemWasInstalled = FALSE;
+ /* This will also set the media device, which we don't want */
+ tcpDeviceSelect();
+ mediaDevice = save;
+ }
+ }
- (void)distExtractAll(NULL);
+ dialog_clear();
+ if (!msgYesNo("Would you like to configure Samba for connecting NETBUI clients to this\n"
+ "machine? Windows 95, Windows NT and Windows for Workgroups\n"
+ "machines can use NETBUI transport for disk and printer sharing."))
+ configSamba(NULL);
+
+ dialog_clear();
+ if (!msgYesNo("Will this machine be an IP gateway (e.g. will it forward packets\n"
+ "between interfaces)?"))
+ variable_set2("gateway", "YES");
+
+ dialog_clear();
+ if (!msgYesNo("Do you want to allow anonymous FTP connections to this machine?"))
+ configAnonFTP(NULL);
+
+ dialog_clear();
+ if (!msgYesNo("Do you want to configure this machine as an NFS server?"))
+ configNFSServer(NULL);
+
+ dialog_clear();
+ if (!msgYesNo("Do you want to configure this machine as an NFS client?"))
+ variable_set2("nfs_client", "YES");
+
+ dialog_clear();
+ if (!msgYesNo("Do you want to configure this machine as a WEB server?"))
+ configApache(NULL);
+
+ dialog_clear();
+ if (!msgYesNo("Would you like to customize your system console settings?"))
+ dmenuOpenSimple(&MenuSyscons);
+
+ dialog_clear();
+ if (!msgYesNo("Would you like to set this machine's time zone now?"))
+ systemExecute("rm -f /etc/wall_cmos_clock /etc/localtime; tzsetup");
+
+ dialog_clear();
+ if (!msgYesNo("Does this system have a mouse attached to it?"))
+ dmenuOpenSimple(&MenuMouse);
+
+ if (directoryExists("/usr/X11R6")) {
+ dialog_clear();
+ if (!msgYesNo("Would you like to configure your X server at this time?"))
+ systemExecute("/usr/X11R6/bin/xf86config");
+ }
- if (!SystemWasInstalled && access("/kernel", R_OK)) {
- if (vsystem("ln -f /kernel.GENERIC /kernel")) {
- msgConfirm("Unable to link /kernel into place!");
- return 0;
+ if (cdromMounted) {
+ dialog_clear();
+ if (!msgYesNo("Would you like to link to the ports tree on your CDROM?\n\n"
+ "This will require that you have your FreeBSD CD in the CDROM\n"
+ "drive to use the ports collection, but at a substantial savings\n"
+ "in disk space (NOTE: This may take as long as 15 or 20 minutes\n"
+ "depending on the speed of your CDROM drive)."))
+ configPorts(NULL);
}
+
+ dialog_clear();
+ if (!msgYesNo("The FreeBSD package collection is a collection of over 300 ready-to-run\n"
+ "applications, from text editors to games to WEB servers. Would you like\n"
+ "to browse the collection now?"))
+ configPackages(NULL);
+
+ /* XXX Put whatever other nice configuration questions you'd like to ask the user here XXX */
+
}
+ /* Final menu of last resort */
+ dialog_clear();
+ if (!msgYesNo("Would you like to go to the general configuration menu for a chance to set\n"
+ "any last configuration options?"))
+ dmenuOpenSimple(&MenuConfigure);
+
+ /* Write out any changes .. */
+ configResolv();
+ configSysconfig();
+
+ variable_set2(SYSTEM_STATE, i == RET_FAIL ? "error-install" : "full-install");
+
+ /* Don't print this if we're express or novice installing */
+ if (strcmp(str, "express") && strcmp(str, "novice")) {
+ if (Dists || i == RET_FAIL) {
+ dialog_clear();
+ msgConfirm("Installation completed with some errors. You may wish to\n"
+ "scroll through the debugging messages on VTY1 with the\n"
+ "scroll-lock feature.");
+ }
+ else {
+ dialog_clear();
+ msgConfirm("Installation completed successfully.\n\n"
+ "If you have any network devices you have not yet configured,\n"
+ "see the Interfaces configuration item on the Configuration menu.");
+ }
+ }
+ else if (!strcmp(str, "novice")) {
+ if (Dists || i == RET_FAIL) {
+ dialog_clear();
+ msgConfirm("Installation completed with some errors. You may wish to\n"
+ "scroll through the debugging messages on VTY1 with the\n"
+ "scroll-lock feature. You can also chose \"No\" at the next\n"
+ "prompt and go back into the installation menus to try and retry\n"
+ "whichever operations have failed.");
+ }
+ else {
+ dialog_clear();
+ msgConfirm("Congradulations! You now have FreeBSD installed on your system.\n"
+ "At this stage, there shouldn't be much left to do from this\n"
+ "installation utility so if you wish to come up from the hard disk\n"
+ "now, simply select \"Yes\" at the next prompt to reboot.\n"
+ "If you wish to re-enter this utility after the system is up, you\n"
+ "may do so by typing: /stand/sysinstall.");
+ }
+ }
+ return i;
+}
+
+int
+installFixup(char *str)
+{
+ Device **devs;
+ int i;
+
+ if (!file_readable("/kernel")) {
+ if (file_readable("/kernel.GENERIC")) {
+ if (vsystem("cp -p /kernel.GENERIC /kernel")) {
+ dialog_clear();
+ msgConfirm("Unable to link /kernel into place!");
+ return RET_FAIL;
+ }
+ }
+ else {
+ dialog_clear();
+ msgConfirm("Can't find a kernel image to link to on the root file system!\n"
+ "You're going to have a hard time getting this system to\n"
+ "boot from the hard disk, I'm afraid!");
+ return RET_FAIL;
+ }
+ }
/* Resurrect /dev after bin distribution screws it up */
- if (RunningAsInit && !SystemWasInstalled) {
+ if (RunningAsInit) {
msgNotify("Remaking all devices.. Please wait!");
- if (vsystem("cd /dev; sh MAKEDEV all"))
+ if (vsystem("cd /dev; sh MAKEDEV all")) {
+ dialog_clear();
msgConfirm("MAKEDEV returned non-zero status");
-
+ return RET_FAIL;
+ }
+
msgNotify("Resurrecting /dev entries for slices..");
devs = deviceFind(NULL, DEVICE_TYPE_DISK);
if (!devs)
msgFatal("Couldn't get a disk device list!");
+
/* Resurrect the slices that the former clobbered */
for (i = 0; devs[i]; i++) {
Disk *disk = (Disk *)devs[i]->private;
Chunk *c1;
+ if (!devs[i]->enabled)
+ continue;
if (!disk->chunks)
msgFatal("No chunk list found for %s!", disk->name);
for (c1 = disk->chunks->part; c1; c1 = c1->next) {
if (c1->type == freebsd) {
msgNotify("Making slice entries for %s", c1->name);
- if (vsystem("cd /dev; sh MAKEDEV %sh", c1->name))
+ if (vsystem("cd /dev; sh MAKEDEV %sh", c1->name)) {
+ dialog_clear();
msgConfirm("Unable to make slice entries for %s!", c1->name);
+ return RET_FAIL;
+ }
}
}
}
- }
+ /* XXX Do all the last ugly work-arounds here which we'll try and excise someday right?? XXX */
- /* XXX Do all the last ugly work-arounds here which we'll try and excise someday right?? XXX */
- /* BOGON #1: XFree86 extracting /usr/X11R6 with root-only perms */
- if (file_readable("/usr/X11R6"))
- chmod("/usr/X11R6", 0755);
+ msgNotify("Fixing permissions..");
+ /* BOGON #1: XFree86 extracting /usr/X11R6 with root-only perms */
+ if (directoryExists("/usr/X11R6")) {
+ system("chmod -R a+r /usr/X11R6");
+ system("find /usr/X11R6 -type d | xargs chmod a+x");
+ }
+ /* BOGON #2: We leave /etc in a bad state */
+ chmod("/etc", 0755);
- /* BOGON #2: We leave /etc in a bad state */
- chmod("/etc", 0755);
+ /* BOGON #3: No /var/db/mountdtab complains */
+ Mkdir("/var/db", NULL);
+ creat("/var/db/mountdtab", 0644);
- dialog_clear();
- /* We get a NULL value for str if run from installExpress(), in which case we don't want to print the following */
- if (str) {
- if (Dists)
- msgConfirm("Installation completed with some errors. You may wish\nto scroll through the debugging messages on ALT-F2 with the scroll-lock\nfeature. Press [ENTER] to return to the installation menu.");
- else
- msgConfirm("Installation completed successfully, now press [ENTER] to return\nto the main menu. If you have any network devices you have not yet\nconfigured, see the Interface configuration item on the\nConfiguration menu.");
+ /* Now run all the mtree stuff to fix things up */
+ vsystem("mtree -deU -f /etc/mtree/BSD.root.dist -p /");
+ vsystem("mtree -deU -f /etc/mtree/BSD.var.dist -p /var");
+ vsystem("mtree -deU -f /etc/mtree/BSD.usr.dist -p /usr");
}
- SystemWasInstalled = TRUE;
- return 0;
+ return RET_SUCCESS;
}
/* Go newfs and/or mount all the filesystems we've been asked to */
-Boolean
-installFilesystems(void)
+int
+installFilesystems(char *str)
{
int i;
Disk *disk;
- Chunk *c1, *c2;
+ Chunk *c1, *c2, *rootdev, *swapdev, *usrdev;
Device **devs;
- char dname[40];
- PartInfo *p = (PartInfo *)rootdev->private;
- Boolean RootReadOnly;
+ PartInfo *root;
+ char dname[80];
+ extern int MakeDevChunk(Chunk *c, char *n);
+ Boolean upgrade = FALSE;
+
+ if (!(str && !strcmp(str, "script")) && !checkLabels(&rootdev, &swapdev, &usrdev))
+ return RET_FAIL;
+ root = (PartInfo *)rootdev->private;
command_clear();
- devs = deviceFind(NULL, DEVICE_TYPE_DISK);
+ upgrade = str && !strcmp(str, "upgrade");
+
+ /* As the very first thing, try to get ourselves some swap space */
+ sprintf(dname, "/dev/%s", swapdev->name);
+ if (!MakeDevChunk(swapdev, "/dev") || !file_readable(dname)) {
+ dialog_clear();
+ msgConfirm("Unable to make device node for %s in /dev!\n"
+ "The creation of filesystems will be aborted.", dname);
+ return RET_FAIL;
+ }
+ if (!swapon(dname))
+ msgNotify("Added %s as initial swap device", dname);
+ else
+ msgConfirm("WARNING! Unable to swap to %s: %s\n"
+ "This may cause the installation to fail at some point\n"
+ "if you don't have a lot of memory.", dname, strerror(errno));
+
+ /* Next, create and/or mount the root device */
+ sprintf(dname, "/dev/r%sa", rootdev->disk->name);
+ if (!MakeDevChunk(rootdev, "/dev") || !file_readable(dname)) {
+ dialog_clear();
+ msgConfirm("Unable to make device node for %s in /dev!\n"
+ "The creation of filesystems will be aborted.", dname);
+ return RET_FAIL;
+ }
- /* First, create and mount the root device */
- if (strcmp(p->mountpoint, "/"))
- msgConfirm("Warning: %s is marked as a root partition but is mounted on %s", rootdev->name, p->mountpoint);
+ if (strcmp(root->mountpoint, "/")) {
+ dialog_clear();
+ msgConfirm("Warning: %s is marked as a root partition but is mounted on %s", rootdev->name, root->mountpoint);
+ }
- if (p->newfs) {
+ if (root->newfs) {
int i;
- sprintf(dname, "/dev/r%sa", rootdev->disk->name);
msgNotify("Making a new root filesystem on %s", dname);
- i = vsystem("%s %s", p->newfs_cmd, dname);
+ i = vsystem("%s %s", root->newfs_cmd, dname);
if (i) {
- msgConfirm("Unable to make new root filesystem! Command returned status %d", i);
- return FALSE;
+ dialog_clear();
+ msgConfirm("Unable to make new root filesystem on %s!\n"
+ "Command returned status %d", dname, i);
+ return RET_FAIL;
}
- RootReadOnly = FALSE;
}
else {
- RootReadOnly = TRUE;
- msgConfirm("Warning: You have selected a Read-Only root device\nand may be unable to find the appropriate device entries on it\nif it is from an older pre-slice version of FreeBSD.");
- sprintf(dname, "/dev/r%sa", rootdev->disk->name);
- msgNotify("Checking integrity of existing %s filesystem", dname);
+ if (!upgrade) {
+ dialog_clear();
+ msgConfirm("Warning: Root device is selected read-only. It will be assumed\n"
+ "that you have the appropriate device entries already in /dev.");
+ }
+ msgNotify("Checking integrity of existing %s filesystem.", dname);
i = vsystem("fsck -y %s", dname);
- if (i)
- msgConfirm("Warning: fsck returned status off %d - this partition may be\nunsafe to use.", i);
+ if (i) {
+ dialog_clear();
+ msgConfirm("Warning: fsck returned status of %d for %s.\n"
+ "This partition may be unsafe to use.", i, dname);
+ }
}
+ /* Switch to block device */
sprintf(dname, "/dev/%sa", rootdev->disk->name);
if (Mount("/mnt", dname)) {
- msgConfirm("Unable to mount the root file system! Giving up.");
- return FALSE;
+ dialog_clear();
+ msgConfirm("Unable to mount the root file system on %s! Giving up.", dname);
+ return RET_FAIL;
}
/* Now buzz through the rest of the partitions and mount them too */
+ devs = deviceFind(NULL, DEVICE_TYPE_DISK);
for (i = 0; devs[i]; i++) {
if (!devs[i]->enabled)
continue;
disk = (Disk *)devs[i]->private;
if (!disk->chunks) {
+ dialog_clear();
msgConfirm("No chunk list found for %s!", disk->name);
- return FALSE;
+ return RET_FAIL;
}
-
- /* Make the proper device mount points in /mnt/dev */
- if (!(RootReadOnly && disk == rootdev->disk)) {
+ if (root->newfs || upgrade) {
Mkdir("/mnt/dev", NULL);
MakeDevDisk(disk, "/mnt/dev");
}
+
for (c1 = disk->chunks->part; c1; c1 = c1->next) {
if (c1->type == freebsd) {
for (c2 = c1->part; c2; c2 = c2->next) {
if (c2->type == part && c2->subtype != FS_SWAP && c2->private) {
PartInfo *tmp = (PartInfo *)c2->private;
- if (!strcmp(tmp->mountpoint, "/"))
+ /* Already did root */
+ if (c2 == rootdev)
continue;
if (tmp->newfs)
@@ -407,16 +740,20 @@ installFilesystems(void)
char fname[80];
int i;
+ if (c2 == swapdev)
+ continue;
sprintf(fname, "/mnt/dev/%s", c2->name);
i = swapon(fname);
if (!i)
- msgNotify("Added %s as a swap device", fname);
- else
+ msgNotify("Added %s as an additional swap device", fname);
+ else {
+ dialog_clear();
msgConfirm("Unable to add %s as a swap device: %s", fname, strerror(errno));
+ }
}
}
}
- else if (c1->type == fat && c1->private && !RootReadOnly) {
+ else if (c1->type == fat && c1->private && (root->newfs || upgrade)) {
char name[FILENAME_MAX];
sprintf(name, "/mnt%s", ((PartInfo *)c1->private)->mountpoint);
@@ -425,32 +762,58 @@ installFilesystems(void)
}
}
+ msgNotify("Copying initial device files..");
/* Copy the boot floppy's dev files */
- if (vsystem("find -x /dev | cpio -pdmV /mnt")) {
+ if ((root->newfs || upgrade) && vsystem("find -x /dev | cpio -pdmv /mnt")) {
+ dialog_clear();
msgConfirm("Couldn't clone the /dev files!");
- return FALSE;
+ return RET_FAIL;
}
command_sort();
command_execute();
- return TRUE;
+ return RET_SUCCESS;
+}
+
+int
+installVarDefaults(char *unused)
+{
+ /* Set default startup options */
+ variable_set2(VAR_ROUTEDFLAGS, "-q");
+ variable_set2(VAR_RELNAME, RELEASE_NAME);
+ variable_set2(VAR_CPIO_VERBOSITY, "high");
+ variable_set2(VAR_TAPE_BLOCKSIZE, DEFAULT_TAPE_BLOCKSIZE);
+ variable_set2(VAR_FTP_USER, "ftp");
+ variable_set2(VAR_BROWSER_PACKAGE, "lynx-2.4.2");
+ variable_set2(VAR_BROWSER_BINARY, "/usr/local/bin/lynx");
+ variable_set2(VAR_CONFIG_FILE, "freebsd.cfg");
+ variable_set2(VAR_FTP_STATE, "passive");
+ variable_set2(VAR_FTP_ONERROR, "abort");
+ variable_set2(VAR_FTP_RETRIES, MAX_FTP_RETRIES);
+ if (getpid() != 1)
+ variable_set2(SYSTEM_STATE, "update");
+ else
+ variable_set2(SYSTEM_STATE, "init");
+ return RET_SUCCESS;
}
/* Copy the boot floppy contents into /stand */
-static Boolean
-copy_self(void)
+Boolean
+copySelf(void)
{
int i;
msgWeHaveOutput("Copying the boot floppy to /stand on root filesystem");
- i = vsystem("find -x /stand | cpio -pdmV /mnt");
+ i = vsystem("find -x /stand | cpio -pdmv /mnt");
if (i) {
+ dialog_clear();
msgConfirm("Copy returned error status of %d!", i);
return FALSE;
}
/* Copy the /etc files into their rightful place */
- if (vsystem("cd /mnt/stand; find etc | cpio -pdmV /mnt")) {
+ if (vsystem("cd /mnt/stand; find etc | cpio -pdmv /mnt")) {
+ dialog_clear();
msgConfirm("Couldn't copy up the /etc files!");
return TRUE;
}
@@ -459,8 +822,8 @@ copy_self(void)
static Boolean loop_on_root_floppy(void);
-static Boolean
-root_extract(void)
+Boolean
+rootExtract(void)
{
int fd;
static Boolean alreadyExtracted = FALSE;
@@ -470,7 +833,7 @@ root_extract(void)
if (mediaDevice) {
if (isDebug())
- msgDebug("Attempting to extract root image from %s device\n", mediaDevice->description);
+ msgDebug("Attempting to extract root image from %s\n", mediaDevice->name);
switch(mediaDevice->type) {
case DEVICE_TYPE_FLOPPY:
@@ -478,18 +841,20 @@ root_extract(void)
break;
default:
- if (!(*mediaDevice->init)(mediaDevice))
+ if (!mediaDevice->init(mediaDevice))
break;
- fd = (*mediaDevice->get)(mediaDevice, "floppies/root.flp", NULL);
+ fd = mediaDevice->get(mediaDevice, "floppies/root.flp", FALSE);
if (fd < 0) {
- msgConfirm("Couldn't get root image from %s!\nWill try to get it from floppy.", mediaDevice->name);
- (*mediaDevice->shutdown)(mediaDevice);
+ dialog_clear();
+ msgConfirm("Couldn't get root image from %s!\n"
+ "Will try to get it from floppy.", mediaDevice->name);
+ mediaDevice->shutdown(mediaDevice);
alreadyExtracted = loop_on_root_floppy();
}
else {
- msgNotify("Loading root image from %s", mediaDevice->name);
+ msgNotify("Loading root image from:\n%s", mediaDevice->name);
alreadyExtracted = mediaExtractDist("/", fd);
- (*mediaDevice->close)(mediaDevice, fd);
+ mediaDevice->close(mediaDevice, fd);
}
break;
}
@@ -516,3 +881,30 @@ loop_on_root_floppy(void)
}
return status;
}
+
+static void
+create_termcap(void)
+{
+ FILE *fp;
+
+ const char *caps[] = {
+ termcap_vt100, termcap_cons25, termcap_cons25_m, termcap_cons25r,
+ termcap_cons25r_m, termcap_cons25l1, termcap_cons25l1_m, NULL,
+ };
+ const char **cp;
+
+ if (!file_readable(TERMCAP_FILE)) {
+ Mkdir("/usr/share/misc", NULL);
+ fp = fopen(TERMCAP_FILE, "w");
+ if (!fp) {
+ dialog_clear();
+ msgConfirm("Unable to initialize termcap file. Some screen-oriented\nutilities may not work.");
+ return;
+ }
+ cp = caps;
+ while (*cp)
+ fprintf(fp, "%s\n", *(cp++));
+ fclose(fp);
+ }
+}
+
diff --git a/release/sysinstall/label.c b/release/sysinstall/label.c
index ccfb63b..21ef267 100644
--- a/release/sysinstall/label.c
+++ b/release/sysinstall/label.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: label.c,v 1.32.2.2 1995/07/21 11:45:39 rgrimes Exp $
+ * $Id: label.c,v 1.33 1995/09/18 16:52:28 peter Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -45,8 +45,6 @@
#include <ctype.h>
#include <sys/disklabel.h>
#include <sys/param.h>
-#undef TRUE
-#undef FALSE
#include <sys/sysctl.h>
/*
@@ -60,14 +58,20 @@
#define CHUNK_SLICE_START_ROW 2
#define CHUNK_PART_START_ROW 11
-/* One MB worth of blocks */
-#define ONE_MEG 2048
-
/* The smallest filesystem we're willing to create */
#define FS_MIN_SIZE ONE_MEG
/* The smallest root filesystem we're willing to create */
-#define ROOT_MIN_SIZE (20 * ONE_MEG)
+#define ROOT_MIN_SIZE 20
+
+/* The smallest swap partition we want to create by default */
+#define SWAP_MIN_SIZE 16
+
+/* The smallest /usr partition we're willing to create by default */
+#define USR_MIN_SIZE 80
+
+/* The smallest /var partition we're willing to create by default */
+#define VAR_MIN_SIZE 30
/* All the chunks currently displayed on the screen */
static struct {
@@ -76,6 +80,118 @@ static struct {
} label_chunk_info[MAX_CHUNKS + 1];
static int here;
+static int diskLabel(char *str);
+static int scriptLabel(char *str);
+
+static int
+labelHook(char *str)
+{
+ Device **devs = NULL;
+
+ /* Clip garbage off the ends */
+ string_prune(str);
+ str = string_skipwhite(str);
+ /* Try and open all the disks */
+ while (str) {
+ char *cp;
+
+ cp = index(str, '\n');
+ if (cp)
+ *cp++ = 0;
+ if (!*str) {
+ beep();
+ return 0;
+ }
+ devs = deviceFind(str, DEVICE_TYPE_DISK);
+ if (!devs) {
+ dialog_clear();
+ msgConfirm("Unable to find disk %s!", str);
+ return 0;
+ }
+ else if (devs[1]) {
+ dialog_clear();
+ msgConfirm("Bizarre multiple match for %s!", str);
+ }
+ devs[0]->enabled = TRUE;
+ str = cp;
+ }
+ return devs ? 1 : 0;
+}
+
+int
+diskLabelEditor(char *str)
+{
+ Device **devs;
+ DMenu *menu;
+ int i, cnt;
+ char *cp;
+
+ cp = variable_get(VAR_DISK);
+ devs = deviceFind(cp, DEVICE_TYPE_DISK);
+ cnt = deviceCount(devs);
+ if (!cnt) {
+ dialog_clear();
+ 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 RET_FAIL;
+ }
+ else if (cnt == 1 || variable_get(DISK_SELECTED)) {
+ devs[0]->enabled = TRUE;
+ if (str && !strcmp(str, "script"))
+ i = scriptLabel(str);
+ else
+ i = diskLabel(str);
+ }
+ else {
+ menu = deviceCreateMenu(&MenuDiskDevices, DEVICE_TYPE_DISK, labelHook);
+ if (!menu) {
+ dialog_clear();
+ 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.");
+ i = RET_FAIL;
+ }
+ else {
+ if (!dmenuOpenSimple(menu))
+ i = RET_FAIL;
+ else
+ i = diskLabel(str);
+ free(menu);
+ }
+ }
+ return i;
+}
+
+int
+diskLabelCommit(char *str)
+{
+ char *cp;
+ int i;
+
+ /* Already done? */
+ if ((cp = variable_get(DISK_LABELLED)) && strcmp(cp, "yes"))
+ i = RET_SUCCESS;
+ else if (!cp) {
+ dialog_clear();
+ msgConfirm("You must assign disk labels before this option can be used.");
+ i = RET_FAIL;
+ }
+ /* The routine will guard against redundant writes, just as this one does */
+ else if (diskPartitionWrite(str) != RET_SUCCESS)
+ i = RET_FAIL;
+ else if (installFilesystems(str) != RET_SUCCESS)
+ i = RET_FAIL;
+ else {
+ msgInfo("All filesystem information written successfully.");
+ variable_set2(DISK_LABELLED, "written");
+ i = RET_SUCCESS;
+ }
+ return i;
+}
+
/* See if we're already using a desired partition name */
static Boolean
check_conflict(char *name)
@@ -93,13 +209,12 @@ check_conflict(char *name)
static int
space_free(struct chunk *c)
{
- struct chunk *c1 = c->part;
+ struct chunk *c1;
int sz = c->size;
- while (c1) {
+ for (c1 = c->part; c1; c1 = c1->next) {
if (c1->type != unused)
sz -= c1->size;
- c1 = c1->next;
}
if (sz < 0)
msgFatal("Partitions are larger than actual chunk??");
@@ -108,19 +223,12 @@ space_free(struct chunk *c)
/* Snapshot the current situation into the displayed chunks structure */
static void
-record_label_chunks()
+record_label_chunks(Device **devs)
{
int i, j, p;
struct chunk *c1, *c2;
- Device **devs;
Disk *d;
- devs = deviceFind(NULL, DEVICE_TYPE_DISK);
- if (!devs) {
- msgConfirm("No disks found!");
- return;
- }
-
j = p = 0;
/* First buzz through and pick up the FreeBSD slices */
for (i = 0; devs[i]; i++) {
@@ -139,6 +247,7 @@ record_label_chunks()
}
}
}
+
/* Now run through again and get the FreeBSD partition entries */
for (i = 0; devs[i]; i++) {
if (!devs[i]->enabled)
@@ -198,7 +307,7 @@ new_part(char *mpoint, Boolean newfs, u_long size)
}
/* Get the mountpoint for a partition and save it away */
-PartInfo *
+static PartInfo *
get_mountpoint(struct chunk *old)
{
char *val;
@@ -266,7 +375,9 @@ get_partition_type(void)
"A swap partition.",
};
i = dialog_menu("Please choose a partition type",
- "If you want to use this partition for swap space, select Swap.\nIf you want to put a filesystem on it, choose FS.", -1, -1, 2, 2, fs_types, selection, NULL, NULL);
+ "If you want to use this partition for swap space, select Swap.\n"
+ "If you want to put a filesystem on it, choose FS.",
+ -1, -1, 2, 2, fs_types, selection, NULL, NULL);
if (!i) {
if (!strcmp(selection, "FS"))
return PART_FILESYSTEM;
@@ -283,11 +394,124 @@ getNewfsCmd(PartInfo *p)
char *val;
val = msgGetInput(p->newfs_cmd,
- "Please enter the newfs command and options you'd like to use in\ncreating this file system.");
+ "Please enter the newfs command and options you'd like to use in\n"
+ "creating this file system.");
if (val)
strncpy(p->newfs_cmd, val, NEWFS_CMD_MAX);
}
+static int
+scriptLabel(char *str)
+{
+ char *cp;
+ PartType type;
+ PartInfo *p;
+ u_long flags = 0;
+ int i, status;
+ Device **devs;
+ Disk *d;
+
+ status = RET_SUCCESS;
+ cp = variable_get(VAR_DISK);
+ if (!cp) {
+ dialog_clear();
+ msgConfirm("scriptLabel: No disk selected - can't label automatically.");
+ return RET_FAIL;
+ }
+
+ devs = deviceFind(cp, DEVICE_TYPE_DISK);
+ if (!devs) {
+ dialog_clear();
+ msgConfirm("scriptLabel: No disk device %s found!", cp);
+ return RET_FAIL;
+ }
+ d = devs[0]->private;
+
+ record_label_chunks(devs);
+ for (i = 0; label_chunk_info[i].c; i++) {
+ Chunk *c1 = label_chunk_info[i].c;
+
+ if (label_chunk_info[i].type == PART_SLICE) {
+ if ((cp = variable_get(c1->name)) != NULL) {
+ int sz;
+ char typ[10], mpoint[50];
+
+ if (sscanf(cp, "%s %d %s", typ, &sz, mpoint) != 3) {
+ dialog_clear();
+ msgConfirm("For slice entry %s, got an invalid detail entry of: %s", c1->name, cp);
+ status = RET_FAIL;
+ continue;
+ }
+ else {
+ Chunk *tmp;
+
+ if (!strcmp(typ, "swap")) {
+ type = PART_SWAP;
+ strcpy(mpoint, "<swap>");
+ }
+ else {
+ type = PART_FILESYSTEM;
+ if (!strcmp(mpoint, "/"))
+ flags |= CHUNK_IS_ROOT;
+ }
+ if (!sz)
+ sz = space_free(c1);
+ if (sz > space_free(c1)) {
+ dialog_clear();
+ msgConfirm("Not enough free space to create partition: %s", mpoint);
+ status = RET_FAIL;
+ continue;
+ }
+ if (!(tmp = Create_Chunk_DWIM(d, c1, sz, part,
+ (type == PART_SWAP) ? FS_SWAP : FS_BSDFFS, flags))) {
+ dialog_clear();
+ msgConfirm("Unable to create from partition spec: %s. Too big?", cp);
+ status = RET_FAIL;
+ break;
+ }
+ else {
+ tmp->private = new_part(mpoint, TRUE, sz);
+ tmp->private_free = safe_free;
+ status = RET_SUCCESS;
+ }
+ }
+ }
+ }
+ else {
+ /* Must be something we can set a mountpoint */
+ cp = variable_get(c1->name);
+ if (cp) {
+ char mpoint[50], nwfs[8];
+ Boolean newfs = FALSE;
+
+ nwfs[0] = '\0';
+ if (sscanf(cp, "%s %s", mpoint, nwfs) != 2) {
+ dialog_clear();
+ msgConfirm("For slice entry %s, got an invalid detail entry of: %s", c1->name, cp);
+ status = RET_FAIL;
+ continue;
+ }
+ newfs = toupper(nwfs[0]) == 'Y' ? TRUE : FALSE;
+ if (c1->private) {
+ p = c1->private;
+ p->newfs = newfs;
+ strcpy(p->mountpoint, mpoint);
+ }
+ else {
+ c1->private = new_part(mpoint, newfs, 0);
+ c1->private_free = safe_free;
+ }
+ if (!strcmp(mpoint, "/"))
+ c1->flags |= CHUNK_IS_ROOT;
+ else
+ c1->flags &= ~CHUNK_IS_ROOT;
+ }
+ }
+ }
+ if (status == RET_SUCCESS)
+ variable_set2(DISK_LABELLED, "yes");
+ return status;
+}
#define MAX_MOUNT_NAME 12
@@ -401,8 +625,8 @@ print_command_summary()
move(0, 0);
}
-int
-diskLabelEditor(char *str)
+static int
+diskLabel(char *str)
{
int sz, key = 0;
Boolean labeling;
@@ -411,14 +635,17 @@ diskLabelEditor(char *str)
PartType type;
Device **devs;
+ devs = deviceFind(NULL, DEVICE_TYPE_DISK);
+ if (!devs) {
+ dialog_clear();
+ msgConfirm("No disks found!");
+ return RET_FAIL;
+ }
+
labeling = TRUE;
keypad(stdscr, TRUE);
- record_label_chunks();
+ record_label_chunks(devs);
- if (!getenv(DISK_PARTITIONED)) {
- msgConfirm("You need to partition your disk(s) before you can assign disk labels.");
- return 0;
- }
dialog_clear(); clear();
while (labeling) {
clear();
@@ -426,6 +653,7 @@ diskLabelEditor(char *str)
print_command_summary();
if (msg) {
attrset(A_REVERSE); mvprintw(23, 0, msg); attrset(A_NORMAL);
+ clrtoeol();
beep();
msg = NULL;
}
@@ -467,7 +695,7 @@ diskLabelEditor(char *str)
case KEY_F(1):
case '?':
- systemDisplayFile("partition.hlp");
+ systemDisplayHelp("partition");
break;
case 'A':
@@ -481,73 +709,105 @@ diskLabelEditor(char *str)
if (label_chunk_info[i++].type != PART_SLICE)
cnt++;
if (cnt == (CHUNK_COLUMN_MAX * 2) + 4) {
- msgConfirm("Sorry, I can't fit any more partitions on the screen! You can get around\nthis limitation by partitioning your disks individually rather than all\nat once. This will be fixed just as soon as we get a scrolling partition\nbox written. Sorry for the inconvenience!");
+ dialog_clear();
+ msgConfirm("Sorry, I can't fit any more partitions on the screen! You can get around\n"
+ "this limitation by partitioning your disks individually rather than all\n"
+ "at once. This will be fixed just as soon as we get a scrolling partition\n"
+ "box written. Sorry for the inconvenience!");
break;
}
sz = space_free(label_chunk_info[here].c);
if (sz <= FS_MIN_SIZE) {
- msg = "Not enough space to create additional FreeBSD partition";
+ msg = "Not enough space to create an additional FreeBSD partition";
break;
}
{
struct chunk *tmp;
int mib[2];
int physmem;
- size_t size;
-
+ size_t size, swsize;
+ char *cp;
+
+ cp = variable_get(VAR_ROOT_SIZE);
tmp = Create_Chunk_DWIM(label_chunk_info[here].c->disk,
label_chunk_info[here].c,
- 32 * ONE_MEG, part, FS_BSDFFS,
+ (cp ? atoi(cp) : 32) * ONE_MEG, part, FS_BSDFFS,
CHUNK_IS_ROOT);
if (!tmp) {
+ dialog_clear();
msgConfirm("Unable to create the root partition. Too big?");
break;
}
tmp->private = new_part("/", TRUE, tmp->size);
tmp->private_free = safe_free;
- record_label_chunks();
-
- mib[0] = CTL_HW;
- mib[1] = HW_PHYSMEM;
- size = sizeof physmem;
- sysctl(mib, 2, &physmem, &size, (void *)0, (size_t)0);
+ record_label_chunks(devs);
+ cp = variable_get(VAR_SWAP_SIZE);
+ if (cp)
+ swsize = atoi(cp) * ONE_MEG;
+ else {
+ mib[0] = CTL_HW;
+ mib[1] = HW_PHYSMEM;
+ size = sizeof physmem;
+ sysctl(mib, 2, &physmem, &size, (void *)0, (size_t)0);
+ swsize = 16 * ONE_MEG + (physmem * 2 / 512);
+ }
tmp = Create_Chunk_DWIM(label_chunk_info[here].c->disk,
label_chunk_info[here].c,
- physmem * 2 / 512, part, FS_SWAP, 0);
+ swsize,
+ part, FS_SWAP, 0);
if (!tmp) {
+ dialog_clear();
msgConfirm("Unable to create the swap partition. Too big?");
break;
}
tmp->private = 0;
tmp->private_free = safe_free;
- record_label_chunks();
+ record_label_chunks(devs);
+ cp = variable_get(VAR_VAR_SIZE);
tmp = Create_Chunk_DWIM(label_chunk_info[here].c->disk,
label_chunk_info[here].c,
- 16 * ONE_MEG, part, FS_BSDFFS, 0);
+ (cp ? atoi(cp) : VAR_MIN_SIZE) * ONE_MEG, part, FS_BSDFFS, 0);
if (!tmp) {
- msgConfirm("Unable to create the /var partition. Too big?");
+ dialog_clear();
+ msgConfirm("Less than %dMB free for /var - you will need to\n"
+ "partition your disk manually with a custom install!", (cp ? atoi(cp) : VAR_MIN_SIZE));
break;
}
tmp->private = new_part("/var", TRUE, tmp->size);
tmp->private_free = safe_free;
- record_label_chunks();
+ record_label_chunks(devs);
- sz = space_free(label_chunk_info[here].c);
+ cp = variable_get(VAR_USR_SIZE);
+ if (cp)
+ sz = atoi(cp) * ONE_MEG;
+ else
+ sz = space_free(label_chunk_info[here].c);
+ if (!sz || sz < (USR_MIN_SIZE * ONE_MEG)) {
+ dialog_clear();
+ msgConfirm("Less than %dMB free for /usr - you will need to\n"
+ "partition your disk manually with a custom install!", USR_MIN_SIZE);
+ break;
+ }
+
tmp = Create_Chunk_DWIM(label_chunk_info[here].c->disk,
label_chunk_info[here].c,
sz, part, FS_BSDFFS, 0);
if (!tmp) {
- msgConfirm("Unable to create the /usr partition. Too big?");
+ dialog_clear();
+ msgConfirm("Unable to create the /usr partition. Not enough space?\n"
+ "You will need to partition your disk manually with a custom install!");
break;
}
+ /* At this point, we're reasonably "labelled" */
+ variable_set2(DISK_LABELLED, "yes");
tmp->private = new_part("/usr", TRUE, tmp->size);
tmp->private_free = safe_free;
- record_label_chunks();
+ record_label_chunks(devs);
}
break;
@@ -564,13 +824,17 @@ diskLabelEditor(char *str)
if (label_chunk_info[i++].type != PART_SLICE)
cnt++;
if (cnt == (CHUNK_COLUMN_MAX * 2)) {
- msgConfirm("Sorry, I can't fit any more partitions on the screen! You can get around\nthis limitation by partitioning your disks individually rather than all\nat once. This will be fixed just as soon as we get a scrolling partition\nbox written. Sorry for the inconvenience!");
+ dialog_clear();
+ msgConfirm("Sorry, I can't fit any more partitions on the screen! You can get around\n"
+ "this limitation by partitioning your disks individually rather than all\n"
+ "at once. This will be fixed just as soon as we get a scrolling partition\n"
+ "box written. Sorry for the inconvenience!");
break;
}
}
sz = space_free(label_chunk_info[here].c);
if (sz <= FS_MIN_SIZE) {
- msg = "Not enough space to create additional FreeBSD partition";
+ msg = "Not enough space to create an additional FreeBSD partition";
break;
}
{
@@ -581,7 +845,9 @@ diskLabelEditor(char *str)
u_long flags = 0;
sprintf(osize, "%d", sz);
- val = msgGetInput(osize, "Please specify the size for new FreeBSD partition in blocks, or\nappend a trailing `M' for megabytes (e.g. 20M) or `C' for cylinders.\n\nSpace free is %d blocks (%dMB)", sz, sz / ONE_MEG);
+ val = msgGetInput(osize, "Please specify the size for new FreeBSD partition in blocks, or\n"
+ "append a trailing `M' for megabytes (e.g. 20M) or `C' for cylinders.\n\n"
+ "Space free is %d blocks (%dMB)", sz, sz / ONE_MEG);
if (!val || (size = strtol(val, &cp, 0)) <= 0)
break;
@@ -611,11 +877,17 @@ diskLabelEditor(char *str)
if ((flags & CHUNK_IS_ROOT)) {
if (!(label_chunk_info[here].c->flags & CHUNK_BSD_COMPAT)) {
- msgConfirm("This region cannot be used for your root partition as\nthe FreeBSD boot code cannot deal with a root partition created in\nsuch a location. Please choose another location for your root\npartition and try again!");
+ msgConfirm("This region cannot be used for your root partition as the\n"
+ "FreeBSD boot code cannot deal with a root partition created\n"
+ "in that location. Please choose another location or smaller\n"
+ "size for your root partition and try again!");
break;
}
- if (size < ROOT_MIN_SIZE)
- msgConfirm("Warning: This is smaller than the recommended size for a\nroot partition. For a variety of reasons, root\npartitions should usually be at least %dMB in size", ROOT_MIN_SIZE / ONE_MEG);
+ if (size < (ROOT_MIN_SIZE * ONE_MEG)) {
+ msgConfirm("Warning: This is smaller than the recommended size for a\n"
+ "root partition. For a variety of reasons, root\n"
+ "partitions should usually be at least %dMB in size", ROOT_MIN_SIZE);
+ }
}
tmp = Create_Chunk_DWIM(label_chunk_info[here].c->disk,
label_chunk_info[here].c,
@@ -627,7 +899,10 @@ diskLabelEditor(char *str)
break;
}
if ((flags & CHUNK_IS_ROOT) && (tmp->flags & CHUNK_PAST_1024)) {
- msgConfirm("This region cannot be used for your root partition as it starts\nor extends past the 1024'th cylinder mark and is thus a\npoor location to boot from. Please choose another\nlocation for your root partition and try again!");
+ msgConfirm("This region cannot be used for your root partition as it starts\n"
+ "or extends past the 1024'th cylinder mark and is thus a\n"
+ "poor location to boot from. Please choose another\n"
+ "location (or smaller size) for your root partition and try again!");
Delete_Chunk(label_chunk_info[here].c->disk, tmp);
break;
}
@@ -640,7 +915,8 @@ diskLabelEditor(char *str)
tmp->private = p;
}
tmp->private_free = safe_free;
- record_label_chunks();
+ variable_set2(DISK_LABELLED, "yes");
+ record_label_chunks(devs);
}
break;
@@ -654,7 +930,8 @@ diskLabelEditor(char *str)
break;
}
Delete_Chunk(label_chunk_info[here].c->disk, label_chunk_info[here].c);
- record_label_chunks();
+ variable_set2(DISK_LABELLED, "yes");
+ record_label_chunks(devs);
break;
case 'M': /* mount */
@@ -681,7 +958,8 @@ diskLabelEditor(char *str)
strcpy(p->mountpoint, "/bogus");
}
}
- record_label_chunks();
+ variable_set2(DISK_LABELLED, "yes");
+ record_label_chunks(devs);
break;
default:
@@ -704,33 +982,49 @@ diskLabelEditor(char *str)
label_chunk_info[here].c->private = new_part(pi ? pi->mountpoint : NULL, pi ? !pi->newfs : TRUE, label_chunk_info[here].c->size);
safe_free(pi);
label_chunk_info[here].c->private_free = safe_free;
+ variable_set2(DISK_LABELLED, "yes");
}
else
msg = MSG_NOT_APPLICABLE;
break;
case 'U':
- devs = deviceFind(NULL, DEVICE_TYPE_DISK);
+ clear();
+ if (msgYesNo("Are you SURE you want to Undo everything?"))
+ break;
+ variable_unset(DISK_PARTITIONED);
for (i = 0; devs[i]; i++) {
+ extern void diskPartition(Device *dev, Disk *d);
+ Disk *d;
+
if (!devs[i]->enabled)
continue;
- else {
- char *cp = devs[i]->name;
-
+ else if ((d = Open_Disk(devs[i]->name)) != NULL) {
Free_Disk(devs[i]->private);
- devs[i]->private = Open_Disk(cp);
+ devs[i]->private = d;
+ diskPartition(devs[i], d);
}
}
- record_label_chunks();
+ variable_unset(DISK_LABELLED);
+ record_label_chunks(devs);
break;
case 'W':
- if (!msgYesNo("Are you sure that you wish to make and mount all filesystems\nat this time? You also have the option of doing it later in\none final 'commit' operation, and if you're at all unsure as\nto which option to chose, then chose No."))
- diskLabelCommit(NULL);
+ if (!msgYesNo("Are you SURE that you wish to make and mount all filesystems\n"
+ "at this time? You also have the option of doing it later in\n"
+ "one final 'commit' operation, and if you're at all unsure as\n"
+ "to which option to chose, then PLEASE CHOSE NO! This option\n"
+ "is DANGEROUS if you're not EXACTLY sure what you are doing!")) {
+ variable_set2(DISK_LABELLED, "yes");
+ clear();
+ diskLabelCommit(NULL);
+ }
break;
case '|':
- if (!msgYesNo("Are you sure you want to go into Wizard mode?\n\nThis is an entirely undocumented feature which you are not\nexpected to understand!")) {
+ if (!msgYesNo("Are you sure you want to go into Wizard mode?\n\n"
+ "This is an entirely undocumented feature which you are not\n"
+ "expected to understand!")) {
int i;
Device **devs;
@@ -739,16 +1033,18 @@ diskLabelEditor(char *str)
DialogActive = FALSE;
devs = deviceFind(NULL, DEVICE_TYPE_DISK);
if (!devs) {
- msgConfirm("Can't find any disk devicse!");
+ dialog_clear();
+ msgConfirm("Can't find any disk devices!");
break;
}
for (i = 0; devs[i] && ((Disk *)devs[i]->private); i++) {
if (devs[i]->enabled)
slice_wizard(((Disk *)devs[i]->private));
}
+ variable_set2(DISK_LABELLED, "yes");
DialogActive = TRUE;
dialog_clear();
- record_label_chunks();
+ record_label_chunks(devs);
}
else
msg = "A most prudent choice!";
@@ -764,17 +1060,6 @@ diskLabelEditor(char *str)
break;
}
}
- variable_set2(DISK_LABELLED, "yes");
dialog_clear();
- return 0;
-}
-
-int
-diskLabelCommit(char *str)
-{
- if (!getenv(DISK_LABELLED))
- msgConfirm("You must assign disk labels before this option can be used.");
- else if (!installFilesystems())
- msgConfirm("Failed to make/mount all filesystems. Please correct\nwhatever went wrong and try again.");
- return 0;
+ return RET_SUCCESS;
}
diff --git a/release/sysinstall/main.c b/release/sysinstall/main.c
index 7d22216..a94f133 100644
--- a/release/sysinstall/main.c
+++ b/release/sysinstall/main.c
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated for what's essentially a complete rewrite.
*
- * $Id: main.c,v 1.13 1995/06/11 19:30:02 rgrimes Exp $
+ * $Id: main.c,v 1.14 1995/09/18 16:52:29 peter Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -43,12 +43,24 @@
#include "sysinstall.h"
#include <stdio.h>
+#include <sys/signal.h>
+
+static void
+screech(int sig)
+{
+ fprintf(stderr, "\007Fatal signal %d caught! I'm dead..\n", sig);
+ pause();
+}
int
main(int argc, char **argv)
{
int choice, scroll, curr, max;
+ if (getpid() == 1) {
+ signal(SIGBUS, screech);
+ signal(SIGSEGV, screech);
+ }
if (geteuid() != 0) {
fprintf(stderr, "Warning: This utility should be run as root.\n");
sleep(1);
@@ -64,21 +76,18 @@ main(int argc, char **argv)
/* Probe for all relevant devices on the system */
deviceGetAll();
- /* Default to passive mode ftp since it's the only thing we currently support :-( */
- OptFlags |= OPT_FTP_PASSIVE;
+ /* Set default flag and variable values */
+ installVarDefaults(NULL);
/* Begin user dialog at outer menu */
while (1) {
choice = scroll = curr = max = 0;
dmenuOpen(&MenuInitial, &choice, &scroll, &curr, &max);
- if (getpid() != 1 || !msgYesNo("Are you sure you wish to exit? System will reboot."))
+ if (getpid() != 1 || !msgYesNo("Are you sure you wish to exit? The system will reboot\n"
+ "(be sure to remove any floppies from the drives)."))
break;
}
- /* Write out any changes to /etc/sysconfig */
- if (SystemWasInstalled)
- configSysconfig();
-
/* Say goodnight, Gracie */
systemShutdown();
diff --git a/release/sysinstall/media.c b/release/sysinstall/media.c
index 8f77630..d502c1e 100644
--- a/release/sysinstall/media.c
+++ b/release/sysinstall/media.c
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
- * $Id: media.c,v 1.25.2.1 1995/07/21 10:53:58 rgrimes Exp $
+ * $Id: media.c,v 1.26 1995/09/18 16:52:31 peter Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -72,6 +72,16 @@ cdromHook(char *str)
return genericHook(str, DEVICE_TYPE_CDROM);
}
+char *
+cpioVerbosity()
+{
+ if (!strcmp(variable_get(VAR_CPIO_VERBOSITY), "high"))
+ return "-v";
+ else if (!strcmp(variable_get(VAR_CPIO_VERBOSITY), "medium"))
+ return "-V";
+ return "";
+}
+
/*
* Return 1 if we successfully found and set the installation type to
* be a CD.
@@ -82,11 +92,24 @@ mediaSetCDROM(char *str)
Device **devs;
int cnt;
+ if (!RunningAsInit) {
+ vsystem("mount /cdrom");
+ if (!file_readable("/cdrom/kernel")) {
+ msgConfirm("Can't find a FreeBSD CD in /cdrom?");
+ return RET_FAIL;
+ }
+ else
+ return RET_SUCCESS;
+ }
devs = deviceFind(NULL, DEVICE_TYPE_CDROM);
cnt = deviceCount(devs);
if (!cnt) {
- msgConfirm("No CDROM devices found! Please check that your system's\nconfiguration is correct and that the CDROM drive is of a supported\ntype. For more information, consult the hardware guide\nin the Doc menu.");
- return 0;
+ dialog_clear();
+ msgConfirm("No CDROM devices found! Please check that your system's\n"
+ "configuration is correct and that the CDROM drive is of a supported\n"
+ "type. For more information, consult the hardware guide\n"
+ "in the Doc menu.");
+ return RET_FAIL;
}
else if (cnt > 1) {
DMenu *menu;
@@ -98,11 +121,11 @@ mediaSetCDROM(char *str)
status = dmenuOpenSimple(menu);
free(menu);
if (!status)
- return 0;
+ return RET_FAIL;
}
else
mediaDevice = devs[0];
- return mediaDevice ? 1 : 0;
+ return mediaDevice ? RET_DONE : RET_FAIL;
}
static int
@@ -124,8 +147,11 @@ mediaSetFloppy(char *str)
devs = deviceFind(NULL, DEVICE_TYPE_FLOPPY);
cnt = deviceCount(devs);
if (!cnt) {
- msgConfirm("No floppy devices found! Please check that your system's\nconfiguration is correct. For more information, consult the hardware guide\nin the Doc menu.");
- return 0;
+ dialog_clear();
+ msgConfirm("No floppy devices found! Please check that your system's configuration\n"
+ "is correct. For more information, consult the hardware guide in the Doc\n"
+ "menu.");
+ return RET_FAIL;
}
else if (cnt > 1) {
DMenu *menu;
@@ -137,11 +163,11 @@ mediaSetFloppy(char *str)
status = dmenuOpenSimple(menu);
free(menu);
if (!status)
- return 0;
+ return RET_FAIL;
}
else
mediaDevice = devs[0];
- return mediaDevice ? 1 : 0;
+ return mediaDevice ? RET_DONE : RET_FAIL;
}
static int
@@ -163,8 +189,9 @@ mediaSetDOS(char *str)
devs = deviceFind(NULL, DEVICE_TYPE_DOS);
cnt = deviceCount(devs);
if (!cnt) {
+ dialog_clear();
msgConfirm("No DOS primary partitions found! This installation method is unavailable");
- return 0;
+ return RET_FAIL;
}
else if (cnt > 1) {
DMenu *menu;
@@ -176,11 +203,11 @@ mediaSetDOS(char *str)
status = dmenuOpenSimple(menu);
free(menu);
if (!status)
- return 0;
+ return RET_FAIL;
}
else
mediaDevice = devs[0];
- return mediaDevice ? 1 : 0;
+ return mediaDevice ? RET_DONE : RET_FAIL;
}
static int
@@ -202,8 +229,11 @@ mediaSetTape(char *str)
devs = deviceFind(NULL, DEVICE_TYPE_TAPE);
cnt = deviceCount(devs);
if (!cnt) {
- msgConfirm("No tape drive devices found! Please check that your system's\nconfiguration is correct. For more information, consult the hardware guide\nin the Doc menu.");
- return 0;
+ dialog_clear();
+ msgConfirm("No tape drive devices found! Please check that your system's configuration\n"
+ "is correct. For more information, consult the hardware guide in the Doc\n"
+ "menu.");
+ return RET_FAIL;
}
else if (cnt > 1) {
DMenu *menu;
@@ -215,20 +245,24 @@ mediaSetTape(char *str)
status = dmenuOpenSimple(menu);
free(menu);
if (!status)
- return 0;
+ return RET_FAIL;
}
else
mediaDevice = devs[0];
if (mediaDevice) {
char *val;
- val = msgGetInput("/usr/tmp", "Please enter the name of a temporary directory containing\nsufficient space for holding the contents of this tape (or\ntapes). The contents of this directory will be removed\nafter installation, so be sure to specify a directory that\ncan be erased afterward!");
+ val = msgGetInput("/usr/tmp", "Please enter the name of a temporary directory containing\n"
+ "sufficient space for holding the contents of this tape (or\n"
+ "tapes). The contents of this directory will be removed\n"
+ "after installation, so be sure to specify a directory that\n"
+ "can be erased afterwards!\n");
if (!val)
mediaDevice = NULL;
else
mediaDevice->private = strdup(val);
}
- return mediaDevice ? 1 : 0;
+ return mediaDevice ? RET_DONE : RET_FAIL;
}
/*
@@ -241,24 +275,40 @@ mediaSetFTP(char *str)
static Device ftpDevice;
char *cp;
- if (!dmenuOpenSimple(&MenuMediaFTP))
- return 0;
- cp = getenv("ftp");
- if (!cp)
- return 0;
- if (!strcmp(cp, "other")) {
- cp = msgGetInput("ftp://", "Please specify the URL of a FreeBSD distribution on a\nremote ftp site. This site must accept either anonymous\nftp or you should have set an ftp username and password\nin the Options Menu.\nA URL looks like this: ftp://<hostname>/<path>\nWhere <path> is relative to the anonymous ftp directory or the\nhome directory of the user being logged in as.");
- if (!cp || strncmp("ftp://", cp, 6))
- return 0;
+ if (!(str && !strcmp(str, "script") && (cp = variable_get(VAR_FTP_PATH)))) {
+ if (!dmenuOpenSimple(&MenuMediaFTP))
+ return RET_FAIL;
else
- variable_set2("ftp", cp);
+ cp = variable_get(VAR_FTP_PATH);
+ }
+ if (!cp) {
+ dialog_clear();
+ msgConfirm("%s not set! Not setting an FTP installation path, OK?", VAR_FTP_PATH);
+ return RET_FAIL;
+ }
+ else if (!strcmp(cp, "other")) {
+ variable_set2(VAR_FTP_PATH, "ftp://");
+ cp = variable_get_value(VAR_FTP_PATH, "Please specify the URL of a FreeBSD distribution on a\n"
+ "remote ftp site. This site must accept either anonymous\n"
+ "ftp or you should have set an ftp username and password\n"
+ "in the Options screen.\n\n"
+ "A URL looks like this: ftp://<hostname>/<path>\n"
+ "Where <path> is relative to the anonymous ftp directory or the\n"
+ "home directory of the user being logged in as.");
+ if (!cp || !*cp)
+ return RET_FAIL;
+ }
+ if (strncmp("ftp://", cp, 6)) {
+ dialog_clear();
+ msgConfirm("Sorry, %s is an invalid URL!", cp);
+ return RET_FAIL;
}
strcpy(ftpDevice.name, cp);
- /* XXX hack: if str == NULL, we were called by an ftp strategy routine and don't need to reinit all */
- if (!str)
- return 1;
- if (!tcpDeviceSelect())
- return 0;
+
+ /* If str == NULL || "script", we were called just to change FTP sites, not network devices */
+ if (str && strcmp(str, "script") && !tcpDeviceSelect())
+ return RET_FAIL;
+
ftpDevice.type = DEVICE_TYPE_FTP;
ftpDevice.init = mediaInitFTP;
ftpDevice.get = mediaGetFTP;
@@ -266,20 +316,20 @@ mediaSetFTP(char *str)
ftpDevice.shutdown = mediaShutdownFTP;
ftpDevice.private = mediaDevice; /* Set to network device by tcpDeviceSelect() */
mediaDevice = &ftpDevice;
- return 1;
+ return RET_DONE;
}
int
mediaSetFTPActive(char *str)
{
- OptFlags &= OPT_FTP_ACTIVE;
+ variable_set2(VAR_FTP_STATE, "active");
return mediaSetFTP(str);
}
int
mediaSetFTPPassive(char *str)
{
- OptFlags &= OPT_FTP_PASSIVE;
+ variable_set2(VAR_FTP_STATE, "passive");
return mediaSetFTP(str);
}
@@ -289,9 +339,12 @@ mediaSetUFS(char *str)
static Device ufsDevice;
char *val;
- val = msgGetInput(NULL, "Enter a fully qualified pathname for the directory\ncontaining the FreeBSD distribution files:");
- if (!val)
- return 0;
+ if (!(str && !strcmp(str, "script") && (val = variable_get(VAR_UFS_PATH)))) {
+ val = variable_get_value(VAR_UFS_PATH, "Enter a fully qualified pathname for the directory\n"
+ "containing the FreeBSD distribution files:");
+ if (!val)
+ return RET_FAIL;
+ }
strcpy(ufsDevice.name, "ufs");
ufsDevice.type = DEVICE_TYPE_UFS;
ufsDevice.init = dummyInit;
@@ -300,21 +353,26 @@ mediaSetUFS(char *str)
ufsDevice.shutdown = dummyShutdown;
ufsDevice.private = strdup(val);
mediaDevice = &ufsDevice;
- return 1;
+ return RET_DONE;
}
int
mediaSetNFS(char *str)
{
static Device nfsDevice;
- char *val;
+ char *cp;
- val = msgGetInput(NULL, "Please enter the full NFS file specification for the remote\nhost and directory containing the FreeBSD distribution files.\nThis should be in the format: hostname:/some/freebsd/dir");
- if (!val)
- return 0;
- strncpy(nfsDevice.name, val, DEV_NAME_MAX);
- if (!tcpDeviceSelect())
- return 0;
+ if (!(str && !strcmp(str, "script") && (cp = variable_get(VAR_NFS_PATH)))) {
+ cp = variable_get_value(VAR_NFS_PATH, "Please enter the full NFS file specification for the remote\n"
+ "host and directory containing the FreeBSD distribution files.\n"
+ "This should be in the format: hostname:/some/freebsd/dir");
+ if (!cp)
+ return RET_FAIL;
+ }
+ strncpy(nfsDevice.name, cp, DEV_NAME_MAX);
+ /* str == NULL means we were just called to change NFS paths, not network interfaces */
+ if (str && strcmp(str, "script") && !tcpDeviceSelect())
+ return RET_FAIL;
nfsDevice.type = DEVICE_TYPE_NFS;
nfsDevice.init = mediaInitNFS;
nfsDevice.get = mediaGetNFS;
@@ -322,7 +380,7 @@ mediaSetNFS(char *str)
nfsDevice.shutdown = mediaShutdownNFS;
nfsDevice.private = mediaDevice;
mediaDevice = &nfsDevice;
- return 1;
+ return RET_DONE;
}
Boolean
@@ -368,7 +426,7 @@ mediaExtractDistBegin(char *dir, int *fd, int *zpid, int *cpid)
close(1); open("/dev/null", O_WRONLY);
dup2(1, 2);
}
- i = execl("/stand/cpio", "/stand/cpio", "-iduVm", "-H", "tar", 0);
+ i = execl("/stand/cpio", "/stand/cpio", "-idum", cpioVerbosity(), "--block-size", mediaTapeBlocksize(), 0);
if (isDebug())
msgDebug("/stand/cpio command returns %d status\n", i);
exit(i);
@@ -441,7 +499,7 @@ mediaExtractDist(char *dir, int fd)
close(1); open("/dev/null", O_WRONLY);
dup2(1, 2);
}
- i = execl("/stand/cpio", "/stand/cpio", "-iduVm", "-H", "tar", 0);
+ i = execl("/stand/cpio", "/stand/cpio", "-idum", cpioVerbosity(), "--block-size", mediaTapeBlocksize(), 0);
if (isDebug())
msgDebug("/stand/cpio command returns %d status\n", i);
exit(i);
@@ -466,12 +524,12 @@ mediaExtractDist(char *dir, int fd)
return TRUE;
}
-Boolean
-mediaGetType(void)
+int
+mediaGetType(char *unused)
{
if (!dmenuOpenSimple(&MenuMedia))
- return FALSE;
- return TRUE;
+ return RET_FAIL;
+ return RET_SUCCESS;
}
/* Return TRUE if all the media variables are set up correctly */
@@ -479,8 +537,69 @@ Boolean
mediaVerify(void)
{
if (!mediaDevice) {
- msgConfirm("Media type not set! Please select a media type\nfrom the Installation menu before proceeding.");
- return FALSE;
+ dialog_clear();
+ msgConfirm("Media type not set! Please select a media type\n"
+ "from the Installation menu before proceeding.");
+ return mediaGetType(NULL) == RET_SUCCESS;
}
return TRUE;
}
+
+/* Set FTP error behavior */
+int
+mediaSetFtpOnError(char *str)
+{
+ char *cp = variable_get(VAR_FTP_ONERROR);
+
+ if (!cp) {
+ dialog_clear();
+ msgConfirm("FTP error handling is not set to anything!");
+ return RET_FAIL;
+ }
+ else {
+ if (!strcmp(cp, "abort"))
+ variable_set2(VAR_FTP_ONERROR, "retry");
+ else if (!strcmp(cp, "retry"))
+ variable_set2(VAR_FTP_ONERROR, "reselect");
+ else /* must be "reselect" - wrap around */
+ variable_set2(VAR_FTP_ONERROR, "abort");
+ }
+ return RET_SUCCESS;
+}
+
+/* Set the FTP username and password fields */
+int
+mediaSetFtpUserPass(char *str)
+{
+ char *pass;
+
+ dialog_clear();
+ if (variable_get_value(VAR_FTP_USER, "Please enter the username you wish to login as:"))
+ pass = variable_get_value(VAR_FTP_PASS, "Please enter the password for this user:");
+ else
+ pass = NULL;
+ dialog_clear();
+ return pass ? RET_SUCCESS : RET_FAIL;
+}
+
+/* Set CPIO verbosity level */
+int
+mediaSetCPIOVerbosity(char *str)
+{
+ char *cp = variable_get(VAR_CPIO_VERBOSITY);
+
+ if (!cp) {
+ dialog_clear();
+ msgConfirm("CPIO Verbosity is not set to anything!");
+ return RET_FAIL;
+ }
+ else {
+ if (!strcmp(cp, "low"))
+ variable_set2(VAR_CPIO_VERBOSITY, "medium");
+ else if (!strcmp(cp, "medium"))
+ variable_set2(VAR_CPIO_VERBOSITY, "high");
+ else /* must be "high" - wrap around */
+ variable_set2(VAR_CPIO_VERBOSITY, "low");
+ }
+ return RET_SUCCESS;
+}
diff --git a/release/sysinstall/media_strategy.c b/release/sysinstall/media_strategy.c
deleted file mode 100644
index d25a7a9..0000000
--- a/release/sysinstall/media_strategy.c
+++ /dev/null
@@ -1,838 +0,0 @@
-/*
- * The new sysinstall program.
- *
- * This is probably the last attempt in the `sysinstall' line, the next
- * generation being slated to essentially a complete rewrite.
- *
- * $Id: media_strategy.c,v 1.27 1995/05/26 19:28:02 jkh Exp $
- *
- * 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.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Jordan Hubbard
- * for the FreeBSD Project.
- * 4. The name of Jordan Hubbard or the FreeBSD project may not be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * 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 <stdio.h>
-#include "sysinstall.h"
-#include <ctype.h>
-#include <sys/stat.h>
-#include <sys/errno.h>
-#include <sys/file.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <sys/param.h>
-#include <sys/dkbad.h>
-#include <sys/mman.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include "ftp.h"
-
-#define MSDOSFS
-#define CD9660
-#define NFS
-#include <sys/mount.h>
-#undef MSDOSFS
-#undef CD9660
-#undef NFS
-
-#define MAX_ATTRIBS 200
-#define MAX_NAME 511
-#define MAX_VALUE 4095
-
-struct attribs {
- char *name;
- char *value;
-};
-
-static int lno;
-static int num_attribs;
-
-static int
-attr_parse(struct attribs **attr, char *file)
-{
- char hold_n[MAX_NAME+1];
- char hold_v[MAX_VALUE+1];
- int n, v, ch = 0;
- enum { LOOK, COMMENT, NAME, VALUE, COMMIT } state;
- FILE *fp;
-
- num_attribs = n = v = lno = 0;
- state = LOOK;
-
- if ((fp=fopen(file, "r")) == NULL)
- {
- msgConfirm("Cannot open the information file `%s': %s (%d)", file, strerror(errno), errno);
- return 0;
- }
-
- while (state == COMMIT || (ch = fgetc(fp)) != EOF) {
- /* Count lines */
- if (ch == '\n')
- ++lno;
- switch(state) {
- case LOOK:
- if (isspace(ch))
- continue;
- /* Allow shell or lisp style comments */
- else if (ch == '#' || ch == ';') {
- state = COMMENT;
- continue;
- }
- else if (isalpha(ch)) {
- hold_n[n++] = ch;
- state = NAME;
- }
- else
- msgFatal("Invalid character '%c' at line %d\n", ch, lno);
- break;
-
- case COMMENT:
- if (ch == '\n')
- state = LOOK;
- break;
-
- case NAME:
- if (ch == '\n') {
- hold_n[n] = '\0';
- hold_v[v = 0] = '\0';
- state = COMMIT;
- }
- else if (isspace(ch))
- continue;
- else if (ch == '=') {
- hold_n[n] = '\0';
- state = VALUE;
- }
- else
- hold_n[n++] = ch;
- break;
-
- case VALUE:
- if (v == 0 && isspace(ch))
- continue;
- else if (ch == '{') {
- /* multiline value */
- while ((ch = fgetc(fp)) != '}') {
- if (ch == EOF)
- msgFatal("Unexpected EOF on line %d", lno);
- else {
- if (v == MAX_VALUE)
- msgFatal("Value length overflow at line %d", lno);
- hold_v[v++] = ch;
- }
- }
- hold_v[v] = '\0';
- state = COMMIT;
- }
- else if (ch == '\n') {
- hold_v[v] = '\0';
- state = COMMIT;
- }
- else {
- if (v == MAX_VALUE)
- msgFatal("Value length overflow at line %d", lno);
- else
- hold_v[v++] = ch;
- }
- break;
-
- case COMMIT:
- (*attr)[num_attribs].name = strdup(hold_n);
- (*attr)[num_attribs++].value = strdup(hold_v);
- state = LOOK;
- v = n = 0;
- break;
-
- default:
- msgFatal("Unknown state at line %d??\n", lno);
- }
- }
- fclose(fp);
- return 1;
-}
-
-static const char *
-attr_match(struct attribs *attr, char *name)
-{
- int n = 0;
-
- while((strcasecmp(attr[n].name, name)!=0) && (n < num_attribs) && (n < 20))
- n++;
-
- if (strcasecmp(attr[n].name, name)==0)
- return((const char *) attr[n].value);
-
- return NULL;
-}
-
-static pid_t getDistpid = 0;
-static Device *floppyDev;
-
-static int
-floppyChoiceHook(char *str)
-{
- Device **devs;
-
- /* Clip garbage off the ends */
- string_prune(str);
- str = string_skipwhite(str);
- if (!*str)
- return 0;
- devs = deviceFind(str, DEVICE_TYPE_FLOPPY);
- if (devs)
- floppyDev = devs[0];
- return devs ? 1 : 0;
-}
-
-int
-genericGetDist(char *path, void *attrs, Boolean prompt)
-{
- int fd;
- char buf[512];
- struct stat sb;
- int pfd[2], numchunks;
- const char *tmp;
- Device *devp;
- struct attribs *dist_attrib = (struct attribs *)attrs;
-
- top:
- fd = -1;
- /* Floppy is always last-ditch device */
- while (!mediaDevice && (prompt && floppyDev == NULL)) {
- Device **devs;
- int cnt;
-
- devs = deviceFind(NULL, DEVICE_TYPE_FLOPPY);
- cnt = deviceCount(devs);
- if (cnt == 1)
- devp = devs[0];
- else if (cnt > 1) {
- DMenu *menu;
-
- menu = deviceCreateMenu(&MenuMediaFloppy, DEVICE_TYPE_FLOPPY, floppyChoiceHook);
- menu->title = "Please insert the ROOT floppy";
- dmenuOpenSimple(menu);
- }
- else {
- msgConfirm("No floppy devices found! Something is seriously wrong!");
- return -1;
- }
- if (!floppyDev)
- continue;
- fd = open(floppyDev->devname, O_RDONLY);
- if (fd != -1)
- return fd;
- else
- floppyDev = NULL;
- }
- if (stat(path, &sb) == 0)
- {
- fd = open(path, O_RDONLY, 0);
- return(fd);
- }
-
- snprintf(buf, 512, "%s.tgz", path);
- if (stat(buf, &sb) == 0)
- {
- fd = open(buf, O_RDONLY, 0);
- return(fd);
- }
-
- snprintf(buf, 512, "%s.aa", path);
- if (stat(buf, &sb) != 0 && !prompt)
- {
- msgConfirm("Cannot find file(s) for distribution in ``%s''!\n", path);
- return -1;
- }
-
- if (fd == -1 && prompt) {
- if (mediaDevice->shutdown)
- (*mediaDevice->shutdown)(mediaDevice);
-
- if (mediaDevice->init)
- if (!(*mediaDevice->init)(mediaDevice))
- return -1;
- msgConfirm("Please put distribution files for %s\nin %s and press return", path, mediaDevice->description);
- goto top;
- }
-
- if (dist_attrib) {
- tmp = attr_match(dist_attrib, "pieces");
- numchunks = atoi(tmp);
- }
- else
- numchunks = 1;
-
- /* reap the previous child corpse - yuck! */
- if (getDistpid) {
- int i, j;
-
- i = waitpid(getDistpid, &j, 0);
- if (i < 0 || WEXITSTATUS(j)) {
- msgNotify("Warning: Previous extraction returned status code %d.", WEXITSTATUS(j));
- getDistpid = 0;
- return -1;
- }
- getDistpid = 0;
- }
-
- msgDebug("Attempting to concatenate %u chunks\n", numchunks);
- pipe(pfd);
- getDistpid = fork();
- if (!getDistpid) {
- caddr_t memory;
- int chunk;
- int retval;
-
- dup2(pfd[1], 1); close(pfd[1]);
- close(pfd[0]);
-
- for (chunk = 0; chunk < numchunks; chunk++) {
- int fd;
- unsigned long len, val;
-
- retval = stat(buf, &sb);
- if ((retval != 0) && (prompt != TRUE))
- {
- msgConfirm("Cannot find file(s) for distribution in ``%s''!\n", path);
- return -1;
- } else {
- char *tmp = index(buf, '/');
- tmp++;
-
- while (retval != 0)
- {
- msgConfirm("Please insert the disk with the `%s' file on it\n", tmp);
- retval = stat(buf, &sb);
- }
- }
-
- snprintf(buf, 512, "%s.%c%c", path, (chunk / 26) + 'a', (chunk % 26) + 'a');
- if ((fd = open(buf, O_RDONLY)) == -1)
- msgFatal("Cannot find file `%s'!", buf);
-
- if (prompt == TRUE)
- {
- extern int crc(int, unsigned long *, unsigned long *);
-
- crc(fd, &val, &len);
- msgDebug("crc for %s is %lu %lu\n", buf, val, len);
- }
-
- fstat(fd, &sb);
- msgDebug("mmap()ing %s (%d)\n", buf, fd);
- memory = mmap(0, sb.st_size, PROT_READ, MAP_SHARED, fd, (off_t) 0);
- if (memory == (caddr_t) -1)
- msgFatal("mmap error: %s\n", strerror(errno));
-
- retval = write(1, memory, sb.st_size);
- if (retval != sb.st_size)
- {
- msgConfirm("write didn't write out the complete file!\n(wrote %d bytes of %d bytes)", retval,
- sb.st_size);
- exit(1);
- }
-
- retval = munmap(memory, sb.st_size);
- if (retval != 0)
- {
- msgConfirm("munmap() returned %d", retval);
- exit(1);
- }
- close(fd);
- }
- close(1);
- msgDebug("Extract of %s finished!!!\n", path);
- exit(0);
- }
- close(pfd[1]);
- return(pfd[0]);
-}
-
-/* Various media "strategy" routines */
-
-static Boolean cdromMounted;
-
-Boolean
-mediaInitCDROM(Device *dev)
-{
- struct iso_args args;
- struct stat sb;
-
- if (cdromMounted)
- return TRUE;
-
- if (Mkdir("/cdrom", NULL))
- return FALSE;
-
- args.fspec = dev->devname;
- args.flags = 0;
-
- if (mount(MOUNT_CD9660, "/cdrom", MNT_RDONLY, (caddr_t) &args) == -1)
- {
- msgConfirm("Error mounting %s on /cdrom: %s (%u)\n", dev, strerror(errno), errno);
- return FALSE;
- }
-
- /* Do a very simple check to see if this looks roughly like a 2.0.5 CDROM
- Unfortunately FreeBSD won't let us read the ``label'' AFAIK, which is one
- sure way of telling the disc version :-( */
- if (stat("/cdrom/dists", &sb))
- {
- if (errno == ENOENT)
- {
- msgConfirm("Couldn't locate the directory `dists' on the CD.\nIs this a 2.0.5 CDROM?\n");
- return FALSE;
- } else {
- msgConfirm("Couldn't stat directory %s: %s", "/cdrom/dists", strerror(errno));
- return FALSE;
- }
- }
- cdromMounted = TRUE;
- return TRUE;
-}
-
-int
-mediaGetCDROM(char *dist, char *path)
-{
- char buf[PATH_MAX];
- struct attribs *dist_attr;
- int retval;
-
- dist_attr = safe_malloc(sizeof(struct attribs) * MAX_ATTRIBS);
-
- snprintf(buf, PATH_MAX, "/stand/info/%s.inf", dist);
-
- if (!access(buf, R_OK) && attr_parse(&dist_attr, buf) == 0)
- {
- msgConfirm("Cannot load information file for %s distribution!\nPlease verify that your media is valid and try again.", dist);
- free(dist_attr);
- return FALSE;
- }
-
- snprintf(buf, PATH_MAX, "/cdrom/%s%s", path ? path : "", dist);
-
- retval = genericGetDist(buf, dist_attr, FALSE);
- free(dist_attr);
- return retval;
-}
-
-void
-mediaShutdownCDROM(Device *dev)
-{
-
- msgDebug("In mediaShutdownCDROM\n");
- if (getDistpid) {
- int i, j;
-
- i = waitpid(getDistpid, &j, 0);
- if (i < 0 || WEXITSTATUS(j)) {
- msgConfirm("Warning: Last extraction returned status code %d.", WEXITSTATUS(j));
- getDistpid = 0;
- }
- getDistpid = 0;
- }
- if (unmount("/cdrom", 0) != 0)
- msgConfirm("Could not unmount the CDROM: %s\n", strerror(errno));
- msgDebug("Unmount returned\n");
- cdromMounted = FALSE;
- return;
-}
-
-static Boolean floppyMounted;
-
-Boolean
-mediaInitFloppy(Device *dev)
-{
- struct ufs_args ufsargs;
- char mountpoint[FILENAME_MAX];
-
- if (floppyMounted)
- return TRUE;
- memset(&ufsargs,0,sizeof ufsargs);
-
- if (Mkdir("/mnt", NULL)) {
- msgConfirm("Unable to make directory mountpoint for %s!", mountpoint);
- return FALSE;
- }
- msgDebug("initFloppy: mount floppy %s on /mnt\n", dev->devname);
- ufsargs.fspec = dev->devname;
- if (mount(MOUNT_MSDOS, "/mnt", 0, (caddr_t)&ufsargs) == -1) {
- msgConfirm("Error mounting floppy %s (%s) on /mnt : %s\n", dev->name,
- dev->devname, mountpoint, strerror(errno));
- return FALSE;
- }
- floppyMounted = TRUE;
- return TRUE;
-}
-
-int
-mediaGetFloppy(char *dist, char *path)
-{
- char buf[PATH_MAX];
- char *fname;
- struct attribs *dist_attr;
- int retval;
-
- dist_attr = safe_malloc(sizeof(struct attribs) * MAX_ATTRIBS);
-
- snprintf(buf, PATH_MAX, "/stand/info/%s.inf", dist);
- if (!access(buf, R_OK) && attr_parse(&dist_attr, buf) == 0)
- {
- msgConfirm("Cannot load information file for %s distribution!\nPlease verify that your media is valid and try again.", dist);
- free(dist_attr);
- return FALSE;
- }
- fname = index(dist, '/') + 1;
- snprintf(buf, PATH_MAX, "/mnt/%s", fname);
-
- retval = genericGetDist(buf, dist_attr, TRUE);
- free(dist_attr);
- return retval;
-}
-
-void
-mediaShutdownFloppy(Device *dev)
-{
- if (floppyMounted) {
- if (vsystem("umount /mnt") != 0)
- msgDebug("Umount of floppy on /mnt failed: %s (%d)\n", strerror(errno), errno);
- else
- floppyMounted = FALSE;
- }
-}
-
-Boolean
-mediaInitTape(Device *dev)
-{
- return TRUE;
-}
-
-static Boolean networkInitialized;
-
-Boolean
-mediaInitNetwork(Device *dev)
-{
- int i;
- char *rp;
-
- if (networkInitialized)
- return TRUE;
-
- configResolv();
- if (!strncmp("cuaa", dev->name, 4)) {
- if (!tcpStartPPP(dev)) {
- msgConfirm("Unable to start PPP! This installation method\ncannot be used.");
- return FALSE;
- }
- }
- else {
- char *cp, ifconfig[64];
-
- snprintf(ifconfig, 64, "%s%s", VAR_IFCONFIG, dev->name);
- cp = getenv(ifconfig);
- if (!cp) {
- msgConfirm("The %s device is not configured. You will need to do so\nin the Networking configuration menu before proceeding.");
- return FALSE;
- }
- i = vsystem("ifconfig %s %s", dev->name, cp);
- if (i) {
- msgConfirm("Unable to configure the %s interface!\nThis installation method cannot be used.", dev->name);
- return FALSE;
- }
- }
-
- rp = getenv(VAR_GATEWAY);
- if (!rp)
- msgConfirm("No gateway has been set. You will not be able to access hosts\n
-not on the local network\n");
- else
- vsystem("route add default %s", rp);
- networkInitialized = TRUE;
- return TRUE;
-}
-
-int
-mediaGetTape(char *dist, char *path)
-{
- return -1;
-}
-
-void
-mediaShutdownTape(Device *dev)
-{
- return;
-}
-
-void
-mediaShutdownNetwork(Device *dev)
-{
- char *cp;
-
- if (!networkInitialized)
- return;
-
- if (!strncmp("cuaa", dev->name, 4)) {
- msgConfirm("You may now go to the 3rd screen (ALT-F3) and shut down\nyour PPP connection. It shouldn't be needed any longer\n(unless you wish to create a shell by typing ESC and\nexperiment with it further, in which case go right ahead!)");
- return;
- }
- else {
- int i;
- char ifconfig[64];
-
- snprintf(ifconfig, 64, "%s%s", VAR_IFCONFIG, dev->name);
- cp = getenv(ifconfig);
- if (!cp)
- return;
- i = vsystem("ifconfig %s down", dev->name);
- if (i)
- msgConfirm("Warning: Unable to down the %s interface properly", dev->name);
- }
-
- cp = getenv(VAR_GATEWAY);
- if (cp)
- vsystem("route delete default");
- networkInitialized = FALSE;
-}
-
-static FTP_t ftp;
-
-Boolean
-mediaInitFTP(Device *dev)
-{
- int i;
- char *url, *hostname, *dir;
- char *my_name, email[BUFSIZ];
- Device *netDevice = (Device *)dev->private;
-
- if (netDevice->init)
- if (!(*netDevice->init)(netDevice))
- return FALSE;
-
- if ((ftp = FtpInit()) == NULL) {
- msgConfirm("FTP initialisation failed!");
- return FALSE;
- }
-
- url = getenv("ftp");
- if (!url)
- return FALSE;
- my_name = getenv(VAR_HOSTNAME);
- if (strncmp("ftp://", url, 6) != NULL) {
- msgConfirm("Invalid URL (`%s') passed to FTP routines!\n(must start with `ftp://')", url);
- return FALSE;
- }
-
- msgDebug("Using URL `%s'\n", url);
- hostname = url + 6;
- if ((dir = index(hostname, '/')) != NULL)
- *(dir++) = '\0';
- strcpy(dev->name, hostname);
- msgDebug("hostname = `%s'\n", hostname);
- msgDebug("dir = `%s'\n", dir ? dir : "/");
- msgNotify("Looking up host %s..", hostname);
- if ((gethostbyname(hostname) == NULL) && (inet_addr(hostname) == INADDR_NONE)) {
- msgConfirm("Cannot resolve hostname `%s'! Are you sure your name server\nand/or gateway values are set properly?", hostname);
- return FALSE;
- }
-
- snprintf(email, BUFSIZ, "installer@%s", my_name);
- msgDebug("Using fake e-mail `%s'\n", email);
-
- msgNotify("Logging in as anonymous.");
- if ((i = FtpOpen(ftp, hostname, "anonymous", email)) != 0) {
- msgConfirm("Couldn't open FTP connection to %s: %s (%u)\n", hostname, strerror(i), i);
- return FALSE;
- }
-
- if (getenv("ftpPassive"))
- FtpPassive(ftp, 1);
- FtpBinary(ftp, 1);
- if (dir && *dir != '\0') {
- msgNotify("CD to distribution in ~ftp/%s", dir);
- FtpChdir(ftp, dir);
- }
- msgDebug("leaving mediaInitFTP!\n");
- return TRUE;
-}
-
-static pid_t ftppid = 0;
-
-int
-mediaGetFTP(char *dist, char *path)
-{
- int fd;
- char buf[512];
- int pfd[2], numchunks;
- const char *tmp;
- struct attribs *dist_attr;
-
- if (!path)
- path = "";
- msgNotify("Attempting to retreive `%s' over FTP", dist);
- snprintf(buf, PATH_MAX, "/stand/info/%s%s.inf", path, dist);
- if (!access(buf, R_OK)) {
- msgDebug("Parsing attributes file for %s\n", dist);
- dist_attr = safe_malloc(sizeof(struct attribs) * MAX_ATTRIBS);
- if (attr_parse(&dist_attr, buf) == 0) {
- msgConfirm("Cannot load information file for %s distribution!\nPlease verify that your media is valid and try again.", dist);
- return -1;
- }
-
- msgDebug("Looking for attribute `pieces'\n");
- tmp = attr_match(dist_attr, "pieces");
- numchunks = atoi(tmp);
- }
- else
- numchunks = 0;
- msgDebug("Attempting to extract distribution from %u files\n", numchunks ? numchunks : 1);
-
- /* Take the lack of an info file to mean we're a fully qualified name */
- if (!numchunks) {
- sprintf(buf, "%s%s", path, dist);
- return(FtpGet(ftp, buf));
- }
- else if (numchunks == 1) {
- snprintf(buf, 512, "%s%s.aa", path, dist);
- return(FtpGet(ftp, buf));
- }
-
- /* reap the previous child corpse - yuck! */
- if (ftppid) {
- int i, j;
-
- i = waitpid(ftppid, &j, 0);
- if (i < 0 || WEXITSTATUS(j)) {
- msgConfirm("Previous FTP transaction returned status code %d - aborting\ntransfer.", WEXITSTATUS(j));
- ftppid = 0;
- return -1;
- }
- ftppid = 0;
- }
- pipe(pfd);
- ftppid = fork();
- if (!ftppid) {
- int chunk;
- int retval;
-
- dup2(pfd[1], 1); close(pfd[1]);
- close(pfd[0]);
-
- for (chunk = 0; chunk < numchunks; chunk++) {
- char buffer[10240];
- int n;
-
- snprintf(buf, 512, "%s%s.%c%c", path, dist, (chunk / 26) + 'a', (chunk % 26) + 'a');
- fd = FtpGet(ftp, buf);
-
- if (fd < 0)
- {
- msgConfirm("FtpGet failed to retreive piece `%s' in the %s distribution!\nAborting the transfer", chunk, dist);
- exit(1);
- }
-
- while ((n = read(fd, buffer, 10240))>0)
- {
- retval = write(1, buffer, n);
- if (retval != n)
- {
- msgConfirm("Write failure on transfer! (wrote %d bytes of %d bytes)", retval, n);
- exit(1);
- }
-
- }
- FtpEOF(ftp);
- }
- close(1);
- msgDebug("Extract of %s finished with success!!!\n", dist);
- exit(0);
- }
- close(pfd[1]);
- return(pfd[0]);
-}
-
-void
-mediaShutdownFTP(Device *dev)
-{
- Device *netdev = (Device *)dev->private;
-
- if (ftp != NULL) {
- FtpClose(ftp);
- ftp = NULL;
- }
- if (ftppid) {
- int i, j;
-
- i = waitpid(ftppid, &j, 0);
- if (i < 0 || WEXITSTATUS(j))
- msgConfirm("Warning: Last FTP transaction returned status code %d.", WEXITSTATUS(j));
- ftppid = 0;
- }
- if (netdev->shutdown)
- (*netdev->shutdown)(netdev);
-}
-
-Boolean
-mediaInitUFS(Device *dev)
-{
- return TRUE;
-}
-
-int
-mediaGetUFS(char *dist, char *path)
-{
- return -1;
-}
-
-/* UFS has no Shutdown routine since this is handled at the device level */
-
-
-Boolean
-mediaInitDOS(Device *dev)
-{
- return TRUE;
-}
-
-int
-mediaGetDOS(char *dist, char *path)
-{
- return -1;
-}
-
-void
-mediaShutdownDOS(Device *dev)
-{
-}
diff --git a/release/sysinstall/menus.c b/release/sysinstall/menus.c
index 87213fd..017bb268 100644
--- a/release/sysinstall/menus.c
+++ b/release/sysinstall/menus.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: menus.c,v 1.42.2.3 1995/07/27 01:37:18 jkh Exp $
+ * $Id: menus.c,v 1.43 1995/09/18 16:52:32 peter Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -53,81 +53,118 @@
/* The initial installation menu */
DMenu MenuInitial = {
DMENU_NORMAL_TYPE,
- "Welcome to FreeBSD RELEASE_NAME!", /* title */
+ "Welcome to FreeBSD!", /* title */
"This is the main menu of the FreeBSD installation system. Please\n\
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].", /* prompt */
- "Press F1 for usage instructions", /* help line */
- "usage.hlp", /* help file */
- { { "Usage", "Quick start - How to use this menu system.", /* U */
- DMENU_DISPLAY_FILE, "usage.hlp", 0, 0 },
- { "Doc", "More detailed documentation on FreeBSD.", /* D */
+ "Press F1 for usage instructions", /* help line */
+ "usage", /* help file */
+{ { "Usage", "Quick start - How to use this menu system", /* U */
+ DMENU_DISPLAY_FILE, "usage", 0, 0 },
+ { "Doc", "More detailed documentation on FreeBSD", /* D */
DMENU_SUBMENU, &MenuDocumentation, 0, 0 },
- { "Options", "Select various options for this utility.", /* O */
- DMENU_SUBMENU, &MenuOptions, 0, 0 },
- { "Custom", "Begin a custom installation", /* C */
+ { "Options", "Go to options editor", /* O */
+ DMENU_CALL, optionsEditor, 0, 0 },
+ { "Novice", "Begin a novice installation (for beginners)", /* N */
+ DMENU_CALL, installNovice, 0, 0 },
+ { "Express", "Begin a quick installation (for the impatient)", /* E */
+ DMENU_CALL, installExpress, 0, 0 },
+ { "Custom", "Begin a custom installation (for experts)", /* C */
DMENU_SUBMENU, &MenuInstallCustom, 0, 0 },
- { "Express", "Begin a quick installation", /* E */
- DMENU_CALL, &installExpress, 0, 0 },
- { "Shell", "Go to a shell for debugging or repair",
- DMENU_SYSTEM_COMMAND, "sh", 0, 0 },
- { "Quit", "Exit this menu (and the installation)", /* Q */
+ { "Fixit", "Mount fixit floppy and go into repair mode", /* F */
+ DMENU_CALL, installFixit, 0, 0 },
+ { "Upgrade", "Upgrade an existing 2.0.5 system", /* U */
+ DMENU_CALL, installUpgrade, 0, 0 },
+ { "Configure", "Do post-install configuration of FreeBSD", /* C (dup) */
+ DMENU_SUBMENU, &MenuConfigure, 0, 0 },
+ { "Quit", "Exit this menu (and the installation)", /* Q */
DMENU_CANCEL, NULL, 0, 0 },
- { NULL } },
+ { "Load", "Load a pre-configuration file from floppy",
+ DMENU_CALL, installPreconfig, 0, },
+ { NULL } },
};
/* The main documentation menu */
DMenu MenuDocumentation = {
- DMENU_NORMAL_TYPE,
- "Documentation for FreeBSD RELEASE_NAME", /* Title */
- "If you are at all unsure about the configuration of your hardware\n\
+DMENU_NORMAL_TYPE,
+"Documentation for FreeBSD " RELEASE_NAME, /* Title */
+"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.hlp",
- { { "README", "Read this for a general description of FreeBSD",
- DMENU_DISPLAY_FILE, "README", 0, 0 },
- { "Hardware", "The FreeBSD survival guide for PC hardware.",
- DMENU_DISPLAY_FILE, "hardware.hlp", 0, 0 },
- { "Install", "A step-by-step guide to installing FreeBSD.",
- DMENU_DISPLAY_FILE, "install.hlp", 0, 0 },
- { "Copyright", "The FreeBSD Copyright notices.",
+"Confused? Press F1 for help.",
+"usage",
+{ { "README", "Read this for a general description of FreeBSD",
+ DMENU_DISPLAY_FILE, "readme", 0, 0 },
+ { "Hardware", "The FreeBSD survival guide for PC hardware.",
+ DMENU_DISPLAY_FILE, "hardware", 0, 0 },
+ { "Install", "A step-by-step guide to installing FreeBSD.",
+ DMENU_DISPLAY_FILE, "install", 0, 0 },
+ { "Copyright", "The FreeBSD Copyright notices.",
DMENU_DISPLAY_FILE, "COPYRIGHT", 0, 0 },
- { "Release", "The release notes for this version of FreeBSD.",
- DMENU_DISPLAY_FILE, "RELNOTES", 0, 0 },
- { "Exit", "Exit this menu (returning to previous)",
+ { "Release", "The release notes for this version of FreeBSD.",
+ DMENU_DISPLAY_FILE, "relnotes", 0, 0 },
+ { "HTML Docs", "Go to the HTML documentation menu (post-install).",
+ DMENU_CALL, docBrowser, 0, 0 },
+ { "Exit", "Exit this menu (returning to previous)",
DMENU_CANCEL, NULL, 0, 0 },
- { NULL } },
+ { NULL } },
+};
+
+DMenu MenuMouse = {
+DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
+"Please select your mouse type from the following menu",
+"There are many different types of mice currently on the market,\n\
+but this configuration menu should at least narrow down the choices\n\
+somewhat. Once you've selected one of the below, you can specify\n\
+/dev/mouse as your mouse device when running the XFree86 configuration\n\
+utility (see Configuration menu). Please note that for PS/2 mice,\n\
+a kernel recompile is also required! See the handbook for more details\n\
+on building a kernel.",
+"For more information, visit the Documentation menu",
+NULL,
+{ { "COM1", "Serial mouse on COM1",
+ DMENU_SYSTEM_COMMAND, "ln -fs /dev/cuaa0 /dev/mouse", 0, 0 },
+ { "COM2", "Serial mouse on COM2",
+ DMENU_SYSTEM_COMMAND, "ln -fs /dev/cuaa1 /dev/mouse", 0, 0 },
+ { "COM3", "Serial mouse on COM3",
+ DMENU_SYSTEM_COMMAND, "ln -fs /dev/cuaa2 /dev/mouse", 0, 0 },
+ { "COM4", "Serial mouse on COM4",
+ DMENU_SYSTEM_COMMAND, "ln -fs /dev/cuaa3 /dev/mouse", 0, 0 },
+ { "BusMouse", "Logitech or ATI bus mouse",
+ DMENU_SYSTEM_COMMAND, "ln -fs /dev/mse0 /dev/mouse", 0, 0 },
+ { "PS/2", "PS/2 style mouse (requires new kernel)",
+ DMENU_SYSTEM_COMMAND, "ln -fs /dev/psm0 /dev/mouse", 0, 0 },
+ { 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 RELEASE_NAME distribution. If you are seeing this menu it is because\n\
+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.hlp",
- { { NULL } },
+"Press F1 to read the installation guide",
+"install",
+{ { NULL } },
};
DMenu MenuMediaFloppy = {
- DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
- "Choose a Floppy drive",
+DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
+"Choose a Floppy drive",
"You have more than one floppy drive. Please chose the drive\n\
you would like to use for this operation",
- NULL,
- NULL,
- { { NULL } },
+NULL,
+NULL,
+{ { NULL } },
};
DMenu MenuMediaDOS = {
- DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
- "Choose a DOS partition",
+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\
@@ -136,182 +173,191 @@ 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.hlp",
- { { NULL } },
+"Press F1 to read the installation guide",
+"install",
+{ { NULL } },
};
DMenu MenuMediaFTP = {
- DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
- "Please specify an FTP site",
- "FreeBSD is distributed from a number of sites on the Internet. Please\n\
-select the site closest to you or \"other\" if you'd like to specify another\n\
-choice. Also note that not all sites carry every possible distribution!\n\
-Distributions other than the basic user set are only guaranteed to be\n\
-available from the Primary site.\n\n\
-If the first site selected doesn't respond, try one of the alternates.\n\
-You may also wish to investigate the options menu in case of trouble.\n\
-To specify a URL not in this list, chose \"other\".",
- "Select a site that's close!",
- "install.hlp",
- { { "Primary Site", "ftp.freebsd.org",
- DMENU_SET_VARIABLE, "ftp=ftp://ftp.freebsd.org/pub/FreeBSD/RELEASE_NAME", 0, 0 },
- { "Secondary Site", "freefall.cdrom.com",
- DMENU_SET_VARIABLE, "ftp=ftp://freefall.cdrom.com/pub/FreeBSD/RELEASE_NAME", 0, 0 },
- { "Other", "Specify some other ftp site by URL",
- DMENU_SET_VARIABLE, "ftp=other", 0, 0 },
- { "Australia", "ftp.physics.usyd.edu.au",
- DMENU_SET_VARIABLE, "ftp=ftp://ftp.physics.usyd.edu.au/FreeBSD/RELEASE_NAME", 0, 0 },
- { "Finland", "nic.funet.fi",
- DMENU_SET_VARIABLE, "ftp=ftp://nic.funet.fi/pub/unix/FreeBSD/RELEASE_NAME", 0, 0 },
- { "France", "ftp.ibp.fr",
- DMENU_SET_VARIABLE, "ftp=ftp://ftp.ibp.fr/pub/FreeBSD/RELEASE_NAME", 0, 0 },
- { "Germany", "ftp.fb9dv.uni-duisburg.de",
- DMENU_SET_VARIABLE, "ftp=ftp://ftp.fb9dv.uni-duisburg.de/pub/unix/FreeBSD/RELEASE_NAME", 0, 0 },
- { "Germany #2", "gil.physik.rwth-aachen.de",
- DMENU_SET_VARIABLE, "ftp=ftp://gil.physik.rwth-aachen.de/pub/FreeBSD/RELEASE_NAME", 0, 0 },
- { "Germany #3", "ftp.uni-paderborn.de",
- DMENU_SET_VARIABLE, "ftp=ftp://ftp.uni-paderborn.de/freebsd/RELEASE_NAME", 0, 0 },
- { "Hong Kong", "ftp.hk.super.net",
- DMENU_SET_VARIABLE, "ftp=ftp://ftp.hk.super.net/pub/FreeBSD/RELEASE_NAME", 0, 0 },
- { "Israel", "orgchem.weizmann.ac.il",
- DMENU_SET_VARIABLE, "ftp=ftp://orgchem.weizmann.ac.il/pub/FreeBSD-RELEASE_NAME", 0, 0 },
- { "Japan", "ftp.sra.co.jp",
- DMENU_SET_VARIABLE, "ftp=ftp://ftp.sra.co.jp/pub/os/FreeBSD/RELEASE_NAME", 0, 0 },
- { "Japan #2", "ftp.mei.co.jp",
- DMENU_SET_VARIABLE, "ftp=ftp://ftp.mei.co.jp/free/PC-UNIX/FreeBSD/RELEASE_NAME", 0, 0 },
- { "Japan #3", "ftp.waseda.ac.jp",
- DMENU_SET_VARIABLE, "ftp=ftp://ftp.waseda.ac.jp/pub/FreeBSD/RELEASE_NAME", 0, 0 },
- { "Japan #4", "ftp.pu-toyama.ac.jp",
- DMENU_SET_VARIABLE, "ftp=ftp://ftp.pu-toyama.ac.jp/pub/FreeBSD/RELEASE_NAME", 0, 0 },
- { "Japan #5", "ftpsv1.u-aizu.ac.jp",
- DMENU_SET_VARIABLE, "ftp=ftp://ftpsv1.u-aizu.ac.jp/pub/os/FreeBSD/RELEASE_NAME", 0, 0 },
- { "Japan #6", "ftp.tut.ac.jp",
- DMENU_SET_VARIABLE, "ftp://ftp.tut.ac.jp/FreeBSD/RELEASE_NAME", 0, 0 },
- { "Japan #7", "ftp.ee.uec.ac.jp",
- DMENU_SET_VARIABLE, "ftp=ftp://ftp.ee.uec.ac.jp/pub/os/mirror/ftp.freebsd.org/RELEASE_NAME", 0, 0 },
- { "Japan #8", "ftp.tokyonet.ad.jp",
- DMENU_SET_VARIABLE, "ftp://ftp.tokyonet.ad.jp/pub/FreeBSD/RELEASE_NAME", 0, 0 },
- { "Korea", "ftp.cau.ac.kr",
- DMENU_SET_VARIABLE, "ftp=ftp://ftp.cau.ac.kr/pub/FreeBSD/RELEASE_NAME", 0, 0 },
- { "Netherlands", "ftp.nl.net",
- DMENU_SET_VARIABLE, "ftp=ftp://ftp.nl.net/pub/os/FreeBSD/RELEASE_NAME", 0, 0 },
- { "Russia", "ftp.kiae.su",
- DMENU_SET_VARIABLE, "ftp=ftp://ftp.kiae.su/FreeBSD/RELEASE_NAME", 0, 0 },
- { "Sweden", "ftp.luth.se",
- DMENU_SET_VARIABLE, "ftp=ftp://ftp.luth.se/pub/FreeBSD/RELEASE_NAME", 0, 0 },
- { "Taiwan", "netbsd.csie.nctu.edu.tw",
- DMENU_SET_VARIABLE, "ftp=ftp://netbsd.csie.nctu.edu.tw/pub/FreeBSD/RELEASE_NAME", 0, 0 },
- { "Thailand", "ftp.nectec.or.th",
- DMENU_SET_VARIABLE, "ftp=ftp://ftp.nectec.or.th/pub/FreeBSD/RELEASE_NAME", 0, 0 },
- { "UK", "ftp.demon.co.uk",
- DMENU_SET_VARIABLE, "ftp=ftp://ftp.demon.co.uk/pub/BSD/FreeBSD/RELEASE_NAME", 0, 0 },
- { "UK #2", "src.doc.ic.ac.uk",
- DMENU_SET_VARIABLE, "ftp=ftp://src.doc.ic.ac.uk/packages/unix/FreeBSD/RELEASE_NAME", 0, 0 },
- { "UK #3", "unix.hensa.ac.uk",
- DMENU_SET_VARIABLE, "ftp=ftp://unix.hensa.ac.uk/mirrors/walnut.creek/FreeBSD/RELEASE_NAME", 0, 0 },
- { "USA", "ref.tfs.com",
- DMENU_SET_VARIABLE, "ftp=ftp://ref.tfs.com/pub/FreeBSD/RELEASE_NAME", 0, 0 },
- { "USA #2", "ftp.dataplex.net",
- DMENU_SET_VARIABLE, "ftp=ftp://ftp.dataplex.net/pub/FreeBSD/RELEASE_NAME", 0, 0 },
- { "USA #3", "kryten.atinc.com",
- DMENU_SET_VARIABLE, "ftp=ftp://kryten.atinc.com/pub/FreeBSD/RELEASE_NAME", 0, 0 },
- { "USA #4", "ftp.neosoft.com",
- DMENU_SET_VARIABLE, "ftp=ftp://ftp.neosoft.com/systems/FreeBSD/RELEASE_NAME", 0, 0 },
- { NULL } }
+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",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.freebsd.org/pub/FreeBSD/", 0, 0 },
+ { "Other", "Specify some other ftp site by URL",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=other", 0, 0 },
+ { "Australia", "ftp.physics.usyd.edu.au",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.physics.usyd.edu.au/FreeBSD/", 0, 0 },
+ { "Australia #2", "minnie.cs.adfa.oz.au",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://minnie.cs.adfa.oz.au/FreeBSD/", 0, 0 },
+ { "Canada", "ftp.synapse.net",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.synapse.net/contrib/FreeBSD/", 0, 0 },
+ { "Finland", "nic.funet.fi",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://nic.funet.fi/pub/unix/FreeBSD/", 0, 0 },
+ { "France", "ftp.ibp.fr",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.ibp.fr/pub/FreeBSD/", 0, 0 },
+ { "Germany", "ftp.fb9dv.uni-duisburg.de",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.fb9dv.uni-duisburg.de/pub/unix/FreeBSD/", 0, 0 },
+ { "Germany #2", "gil.physik.rwth-aachen.de",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://gil.physik.rwth-aachen.de/pub/FreeBSD/", 0, 0 },
+ { "Germany #3", "ftp.uni-paderborn.de",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.uni-paderborn.de/freebsd/", 0, 0 },
+ { "Germany #4", "ftp.leo.org",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.leo.org/pub/comp/os/bsd/FreeBSD/", 0, 0 },
+ { "Germany #5", "ftp.tu-dresden.de",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.tu-dresden.de/pub/soft/unix/bsd/FreeBSD/", 0, 0 },
+ { "Hong Kong", "ftp.hk.super.net",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.hk.super.net/pub/FreeBSD/", 0, 0 },
+ { "Ireland", "ftp.internet-eireann.ie",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.internet-eireann.ie/pub/FreeBSD/", 0, 0 },
+ { "Israel", "orgchem.weizmann.ac.il",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://orgchem.weizmann.ac.il/pub/FreeBSD/", 0, 0 },
+ { "Japan", "ftp.tokyonet.ad.jp",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.tokyonet.ad.jp/pub/FreeBSD/", 0, 0 },
+ { "Japan #2", "ftp.nisiq.net",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.nisiq.net/pub/os/FreeBSD/", 0, 0 },
+ { "Japan #3", "ftp.iij.ad.jp",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.iij.ad.jp/pub/FreeBSD/", 0, 0 },
+ { "Japan #4", "ftp.kuis.kyoto-u.ac.jp",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.kuis.kyoto-u.ac.jp/BSD/FreeBSD/", 0, 0 },
+ { "Japan #5", "ftp.ee.uec.ac.jp",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.ee.uec.ac.jp/pub/os/mirror/ftp.freebsd.org/", 0, 0 },
+ { "Japan #6", "ftp.u-aizu.ac.jp",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.u-aizu.ac.jp/pub/os/FreeBSD/", 0, 0 },
+ { "Korea", "ftp.cau.ac.kr",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.cau.ac.kr/pub/FreeBSD/", 0, 0 },
+ { "Netherlands", "ftp.nl.net",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.nl.net/pub/os/FreeBSD/", 0, 0 },
+ { "Poland", "SunSITE.icm.edu.pl",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://SunSITE.icm.edu.pl/pub/FreeBSD/", 0, 0 },
+ { "Russia", "ftp.kiae.su",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.kiae.su/FreeBSD/", 0, 0 },
+ { "Sweden", "ftp.luth.se",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.luth.se/pub/FreeBSD/", 0, 0 },
+ { "Taiwan", "NCTUCCCA.edu.tw",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://NCTUCCCA.edu.tw/Operating-Systems/FreeBSD", 0, 0 },
+ { "Taiwan #2", "netbsd.csie.nctu.edu.tw",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://netbsd.csie.nctu.edu.tw/pub/FreeBSD/", 0, 0 },
+ { "Thailand", "ftp.nectec.or.th",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.nectec.or.th/pub/mirrors/FreeBSD/", 0, 0 },
+ { "UK", "ftp.demon.co.uk",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.demon.co.uk/pub/BSD/FreeBSD/", 0, 0 },
+ { "UK #2", "src.doc.ic.ac.uk",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://src.doc.ic.ac.uk/packages/unix/FreeBSD/", 0, 0 },
+ { "UK #3", "unix.hensa.ac.uk",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://unix.hensa.ac.uk/mirrors/walnut.creek/FreeBSD/", 0, 0 },
+ { "USA", "ref.tfs.com",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ref.tfs.com/pub/FreeBSD/", 0, 0 },
+ { "USA #2", "ftp.dataplex.net",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.dataplex.net/pub/FreeBSD/", 0, 0 },
+ { "USA #3", "kryten.atinc.com",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://kryten.atinc.com/pub/FreeBSD/", 0, 0 },
+ { "USA #4", "ftp.neosoft.com",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.neosoft.com/systems/FreeBSD/", 0, 0 },
+ { "USA #5", "ftp.cybernetics.net",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.cybernetics.net/pub/FreeBSD/", 0, 0 },
+ { "USA #6", "ftp.cps.cmich.edu",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.cps.cmich.edu/pub/ftp.freebsd.org/", 0, 0 },
+ { "USA #7", "ftp.cslab.vt.edu",
+ DMENU_SET_VARIABLE, VAR_FTP_PATH "=ftp://ftp.cslab.vt.edu/pub/FreeBSD/", 0, 0 },
+ { 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\
+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.hlp",
- { { NULL } },
+"Press F1 to read the installation guide",
+"install",
+{ { NULL } },
};
DMenu MenuNetworkDevice = {
- DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
- "Choose a network interface type",
-"FreeBSD can be installed directly over a network, using NFS or FTP.\n
-If you are using PPP over a serial device (cuaa0 or cuaa1) as opposed\n\
+DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
+"Network interface information required",
+"If you are using PPP over a serial device (cuaa0 or cuaa1) as opposed\n\
to a direct ethernet connection, then you may first need to dial your\n\
service provider using the ppp utility we provide for that purpose.\n\
You can also install over a parallel port using a special \"laplink\"\n\
cable, though this only works if you have another FreeBSD machine running\n\
a fairly recent (2.0R or later) release to talk to.\n\n\
-To use PPP select one of the serial devices, otherwise select lp0 for\n\
+To use PPP, select one of the serial devices, otherwise select lp0 for\n\
the parallel port or one of the ethernet controllers (if you have one)\n\
for an ethernet installation.",
- "Press F1 to read network configuration manual",
- "network_device.hlp",
- { { NULL } },
+"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 the Internet. If you're installing\n\
-FreeBSD from a supported CDROM drive then this is generally the best\n\
-media to use, unless you have some overriding reason for using another\n\
+DMENU_NORMAL_TYPE,
+"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.hlp",
- { { "CDROM", "Install from a FreeBSD CDROM",
+"Press F1 for more information on the various media types",
+"media",
+{ { "CDROM", "Install from a FreeBSD CDROM",
DMENU_CALL, mediaSetCDROM, 0, 0 },
- { "DOS", "Install from a DOS partition",
+ { "DOS", "Install from a DOS partition",
DMENU_CALL, mediaSetDOS, 0, 0 },
- { "File System", "Install from a mounted filesystem",
+ { "File System", "Install from an existing filesystem",
DMENU_CALL, mediaSetUFS, 0, 0 },
- { "Floppy", "Install from a floppy disk set",
+ { "Floppy", "Install from a floppy disk set",
DMENU_CALL, mediaSetFloppy, 0, 0 },
- { "FTP Active", "Install from an FTP server in active mode",
+ { "FTP", "Install from an FTP server",
DMENU_CALL, mediaSetFTPActive, 0, 0 },
- { "FTP Passive", "Install from an FTP server in passive mode",
+ { "FTP Passive", "Install from an FTP server through a firewall",
DMENU_CALL, mediaSetFTPPassive, 0, 0 },
- { "NFS", "Install over NFS",
+ { "NFS", "Install over NFS",
DMENU_CALL, mediaSetNFS, 0, 0 },
- { "Tape", "Install from SCSI or QIC tape",
+ { "Tape", "Install from SCSI or QIC tape",
DMENU_CALL, mediaSetTape, 0, 0 },
- { NULL } },
+ { NULL } },
};
-/* The installation type menu */
-DMenu MenuInstallType = {
- DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
- "Choose Installation Type",
- "As a convenience, we provide several \"canned\" installation types.\n\
+/* The distributions menu */
+DMenu MenuDistributions = {
+DMENU_NORMAL_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\n\
-the list of distributions yourself, simply select \"custom\".",
- "Press F1 for more information on these options.",
- "distributions.hlp",
- { { "Developer", "Full sources, binaries and doc but no games [171MB]",
+the list of distributions yourself, simply select \"Custom\".",
+"Press F1 for more information on these options.",
+"distributions",
+{ { "Developer", "Full sources, binaries and doc but no games [180MB]",
DMENU_CALL, distSetDeveloper, 0, 0 },
- { "X-Developer", "Same as above, but includes XFree86 [196MB]",
+ { "X-Developer", "Same as above, but includes XFree86 [201MB]",
DMENU_CALL, distSetXDeveloper, 0, 0 },
- { "Kern-Developer", "Full binaries and doc, kernel sources only [35MB]",
+ { "Kern-Developer", "Full binaries and doc, kernel sources only [70MB]",
DMENU_CALL, distSetKernDeveloper, 0, 0 },
- { "User", "Average user - binaries and doc but no sources [19MB]",
+ { "User", "Average user - binaries and doc but no sources [52MB]",
DMENU_CALL, distSetUser, 0, 0 },
- { "X-User", "Same as above, but includes XFree86 [45MB]",
+ { "X-User", "Same as above, but includes XFree86 [52MB]",
DMENU_CALL, distSetXUser, 0, 0 },
- { "Minimal", "The smallest configuration possible [15MB]",
+ { "Minimal", "The smallest configuration possible [44MB]",
DMENU_CALL, distSetMinimum, 0, 0 },
- { "Everything", "All sources, binaries and XFree86 binaries [203MB]",
+ { "Everything", "All sources, binaries and XFree86 binaries [700MB]",
DMENU_CALL, distSetEverything, 0, 0 },
- { "Custom", "Specify your own distribution set [?]",
- DMENU_SUBMENU, &MenuDistributions, 0, 0 },
- { "Clear", "Reset selected distribution list to None",
+ { "Custom", "Specify your own distribution set [?]",
+ DMENU_SUBMENU, &MenuSubDistributions, 0, 0 },
+ { "Clear", "Reset selected distribution list to None",
DMENU_CALL, distReset, 0, 0 },
- { NULL } },
+ { NULL } },
};
static char *
@@ -332,7 +378,7 @@ x11FlagCheck(DMenuItem *item)
return (Dists & DIST_XF86) ? "ON" : "OFF";
}
-DMenu MenuDistributions = {
+DMenu MenuSubDistributions = {
DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
"Select the distributions you wish to install.",
"Please check off the distributions you wish to install. At the\n\
@@ -340,94 +386,96 @@ very minimum, this should be \"bin\". WARNING: Do not export the\n\
DES distribution out of the U.S.! It is for U.S. customers only.",
NULL,
NULL,
- { { "bin", "Binary base distribution (required) [36MB]",
+{ { "bin", "Binary base distribution (required) [36MB]",
DMENU_SET_FLAG, &Dists, DIST_BIN, 0, dmenuFlagCheck },
- { "commercial", "Commercial demos and shareware [10MB]",
+ { "commercial", "Commercial demos and shareware [10MB]",
DMENU_SET_FLAG, &Dists, DIST_COMMERCIAL, 0, dmenuFlagCheck },
- { "compat1x", "FreeBSD 1.x binary compatibility package [2MB]",
+ { "compat1x", "FreeBSD 1.x binary compatibility package [2MB]",
DMENU_SET_FLAG, &Dists, DIST_COMPAT1X, 0, dmenuFlagCheck },
- { "compat20", "FreeBSD 2.0 binary compatibility package [2MB]",
+ { "compat20", "FreeBSD 2.0 binary compatibility package [2MB]",
DMENU_SET_FLAG, &Dists, DIST_COMPAT20, 0, dmenuFlagCheck },
- { "DES", "DES encryption code - NOT FOR EXPORT! [.3MB]",
+ { "DES", "DES encryption code - NOT FOR EXPORT! [.3MB]",
DMENU_CALL, distSetDES, 0, 0, DESFlagCheck },
- { "dict", "Spelling checker dictionary files [4.2MB]",
+ { "dict", "Spelling checker dictionary files [4.2MB]",
DMENU_SET_FLAG, &Dists, DIST_DICT, 0, dmenuFlagCheck },
- { "games", "Games (non-commercial) [6.4MB]",
+ { "games", "Games (non-commercial) [6.4MB]",
DMENU_SET_FLAG, &Dists, DIST_GAMES, 0, dmenuFlagCheck },
- { "info", "GNU info files [4.1MB]",
+ { "info", "GNU info files [4.1MB]",
DMENU_SET_FLAG, &Dists, DIST_INFO, 0, dmenuFlagCheck },
- { "man", "System manual pages - recommended [3.3MB]",
+ { "man", "System manual pages - recommended [3.3MB]",
DMENU_SET_FLAG, &Dists, DIST_MANPAGES, 0, dmenuFlagCheck },
- { "proflibs", "Profiled versions of the libraries [3.3MB]",
+ { "proflibs", "Profiled versions of the libraries [3.3MB]",
DMENU_SET_FLAG, &Dists, DIST_PROFLIBS, 0, dmenuFlagCheck },
- { "src", "Sources for everything but DES [120MB]",
+ { "src", "Sources for everything but DES [120MB]",
DMENU_CALL, distSetSrc, 0, 0, srcFlagCheck },
- { "XFree86", "The XFree86 3.1.1u1 distribution [?]",
+ { "XFree86", "The XFree86 3.1.2-S distribution",
DMENU_CALL, distSetXF86, 0, 0, x11FlagCheck },
- { "Experimental", "Work in progress!",
+ { "Experimental", "Work in progress!",
DMENU_SET_FLAG, &Dists, DIST_EXPERIMENTAL, 0, dmenuFlagCheck },
- { NULL } },
+ { NULL } },
};
DMenu MenuDESDistributions = {
- DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
- "Select the encryption facilities you wish to install.",
- "Please check off any special DES-based encryption distributions\n\
+DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
+"Select the encryption facilities you wish to install.",
+"Please check off any special DES-based encryption distributions\n\
you would like to install. Please note that these services are NOT FOR\n\
EXPORT from the United States, nor are they available on CDROM (for the\n\
same reason). For information on non-U.S. FTP distributions of this\n\
software, please consult the release notes.",
- NULL,
- NULL,
- { { "des", "Basic DES services (rlogin, init, etc) [1MB]",
+NULL,
+NULL,
+{ { "des", "Basic DES services (rlogin, init, etc) [1MB]",
DMENU_SET_FLAG, &DESDists, DIST_DES_DES, 0, dmenuFlagCheck },
- { "krb", "Kerberos encryption services [2MB]",
+ { "krb", "Kerberos encryption services [2MB]",
DMENU_SET_FLAG, &DESDists, DIST_DES_KERBEROS, 0, dmenuFlagCheck },
- { "sebones", "Sources for eBones (Kerberos) [1MB]",
+ { "sebones", "Sources for eBones (Kerberos) [1MB]",
DMENU_SET_FLAG, &DESDists, DIST_DES_SEBONES, 0, dmenuFlagCheck },
- { "ssecure", "Sources for DES libs and utilities [1MB]",
+ { "ssecure", "Sources for DES libs and utilities [1MB]",
DMENU_SET_FLAG, &DESDists, DIST_DES_SSECURE, 0, dmenuFlagCheck },
- { NULL } },
+ { NULL } },
};
-
+
DMenu MenuSrcDistributions = {
- DMENU_MULTIPLE_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\
+DMENU_MULTIPLE_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.",
- NULL,
- NULL,
- { { "base", "top-level files in /usr/src [300K]",
+NULL,
+NULL,
+{ { "base", "top-level files in /usr/src [300K]",
DMENU_SET_FLAG, &SrcDists, DIST_SRC_BASE, 0, dmenuFlagCheck },
- { "gnu", "/usr/src/gnu (software from the GNU Project) [42MB]",
+ { "gnu", "/usr/src/gnu (software from the GNU Project) [42MB]",
DMENU_SET_FLAG, &SrcDists, DIST_SRC_GNU, 0, dmenuFlagCheck },
- { "etc", "/usr/src/etc (miscellaneous system files) [460K]",
+ { "etc", "/usr/src/etc (miscellaneous system files) [460K]",
DMENU_SET_FLAG, &SrcDists, DIST_SRC_ETC, 0, dmenuFlagCheck },
- { "games", "/usr/src/games (diversions) [7.8MB]",
+ { "games", "/usr/src/games (diversions) [7.8MB]",
DMENU_SET_FLAG, &SrcDists, DIST_SRC_GAMES, 0, dmenuFlagCheck },
- { "include", "/usr/src/include (header files) [467K]",
+ { "include", "/usr/src/include (header files) [467K]",
DMENU_SET_FLAG, &SrcDists, DIST_SRC_INCLUDE, 0, dmenuFlagCheck },
- { "lib", "/usr/src/lib (system libraries) [9.2MB]",
+ { "lib", "/usr/src/lib (system libraries) [9.2MB]",
DMENU_SET_FLAG, &SrcDists, DIST_SRC_LIB, 0, dmenuFlagCheck },
- { "libexec", "/usr/src/libexec (system programs) [1.2MB]",
+ { "libexec", "/usr/src/libexec (system programs) [1.2MB]",
DMENU_SET_FLAG, &SrcDists, DIST_SRC_LIBEXEC, 0, dmenuFlagCheck },
- { "lkm", "/usr/src/lkm (Loadable Kernel Modules) [193K]",
+ { "lkm", "/usr/src/lkm (Loadable Kernel Modules) [193K]",
DMENU_SET_FLAG, &SrcDists, DIST_SRC_LKM, 0, dmenuFlagCheck },
- { "release", "/usr/src/release (release-generation tools) [533K]",
+ { "release", "/usr/src/release (release-generation tools) [533K]",
DMENU_SET_FLAG, &SrcDists, DIST_SRC_RELEASE, 0, dmenuFlagCheck },
- { "bin", "/usr/src/bin (system binaries) [2.5MB]",
+ { "bin", "/usr/src/bin (system binaries) [2.5MB]",
DMENU_SET_FLAG, &SrcDists, DIST_SRC_BIN, 0, dmenuFlagCheck },
- { "sbin", "/usr/src/sbin (system binaries) [1.3MB]",
+ { "sbin", "/usr/src/sbin (system binaries) [1.3MB]",
DMENU_SET_FLAG, &SrcDists, DIST_SRC_SBIN, 0, dmenuFlagCheck },
- { "share", "/usr/src/share (documents and shared files) [10MB]",
+ { "share", "/usr/src/share (documents and shared files) [10MB]",
DMENU_SET_FLAG, &SrcDists, DIST_SRC_SHARE, 0, dmenuFlagCheck },
- { "sys", "/usr/src/sys (FreeBSD kernel) [13MB]",
+ { "sys", "/usr/src/sys (FreeBSD kernel) [13MB]",
DMENU_SET_FLAG, &SrcDists, DIST_SRC_SYS, 0, dmenuFlagCheck },
- { "ubin", "/usr/src/usr.bin (user binaries) [13MB]",
+ { "ubin", "/usr/src/usr.bin (user binaries) [13MB]",
DMENU_SET_FLAG, &SrcDists, DIST_SRC_UBIN, 0, dmenuFlagCheck },
- { "usbin", "/usr/src/usr.sbin (aux system binaries) [14MB]",
+ { "usbin", "/usr/src/usr.sbin (aux system binaries) [14MB]",
DMENU_SET_FLAG, &SrcDists, DIST_SRC_USBIN, 0, dmenuFlagCheck },
- { NULL } },
+ { "smailcf", "/usr/src/usr.sbin (sendmail config macros) [341K]",
+ DMENU_SET_FLAG, &SrcDists, DIST_SRC_SMAILCF, 0, dmenuFlagCheck },
+ { NULL } },
};
static int
@@ -442,67 +490,76 @@ clearx11(char *str)
DMenu MenuXF86Select = {
DMENU_NORMAL_TYPE,
- "XFree86 3.1.1u1 Distribution",
- "Please select the components you need from the XFree86 3.1.1u1\n\
+ "XFree86 3.1.2-S Distribution",
+ "Please select the components you need from the XFree86 3.1.2-S\n\
distribution. We recommend that you select what you need from the basic\n\
-components set and at least one entry from the Server and Font set menus.",
+component set and at least one entry from the Server and Font set menus.",
"Press F1 to read the XFree86 release notes for FreeBSD",
- "XF86.hlp",
- { { "Basic", "Basic component menu (required)",
+ "XF86",
+{ { "Basic", "Basic component menu (required)",
DMENU_SUBMENU, &MenuXF86SelectCore, 0, 0 },
- { "Server", "X server menu",
+ { "Server", "X server menu",
DMENU_SUBMENU, &MenuXF86SelectServer, 0, 0 },
- { "Fonts", "Font set menu",
+ { "Fonts", "Font set menu",
DMENU_SUBMENU, &MenuXF86SelectFonts, 0, 0 },
- { "Clear", "Reset XFree86 distribution list",
- DMENU_CALL, clearx11, 0, 0, 0 },
- { "Exit", "Exit this menu (returning to previous)",
+ { "Exit", "Exit this menu (returning to previous)",
DMENU_CANCEL, NULL, 0, 0 },
- { NULL } },
+ { "Clear", "Reset XFree86 distribution list",
+ DMENU_CALL, clearx11, 0, 0, 0 },
+ { NULL } },
};
DMenu MenuXF86SelectCore = {
DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
- "XFree86 3.1.1 base distribution types",
- "Please check off the basic XFree86 components you wish to install.",
- "Press F1 to read the XFree86 release notes for FreeBSD",
- "XF86.hlp",
- { { "bin", "X client applications and shared libs [4MB].",
+"XFree86 3.1.2-S base distribution types",
+"Please check off the basic XFree86 components you wish to install.\n\
+Bin, lib, xicf, and xdcf are recommended for a minimum installaion.",
+"Press F1 to read the XFree86 release notes for FreeBSD",
+"XF86",
+{ { "bin", "Client applications and shared libs [4.1MB].",
DMENU_SET_FLAG, &XF86Dists, DIST_XF86_BIN, 0, dmenuFlagCheck },
- { "lib", "Data files needed at runtime [600K]",
+ { "lib", "Data files needed at runtime [750K]",
DMENU_SET_FLAG, &XF86Dists, DIST_XF86_LIB, 0, dmenuFlagCheck },
- { "xicf", "Customizable xinit runtime configuration file [100K]",
+ { "xicf", "Customizable xinit runtime configuration file [10K]",
DMENU_SET_FLAG, &XF86Dists, DIST_XF86_XINIT, 0, dmenuFlagCheck },
- { "xdcf", "Customizable xdm runtime configuration file [100K]",
+ { "xdcf", "Customizable xdm runtime configuration file [20K]",
DMENU_SET_FLAG, &XF86Dists, DIST_XF86_XDMCF, 0, dmenuFlagCheck },
- { "doc", "READMEs and XFree86 specific man pages [500K]",
+ { "etc", "Clock setting and diagnostic source codes [70K]",
+ DMENU_SET_FLAG, &XF86Dists, DIST_XF86_ETC, 0, dmenuFlagCheck },
+ { "doc", "READMEs and release notes [600K]",
DMENU_SET_FLAG, &XF86Dists, DIST_XF86_DOC, 0, dmenuFlagCheck },
- { "man", "Man pages (except XFree86 specific ones) [1.2MB]",
+ { "man", "Man pages [1.7MB]",
DMENU_SET_FLAG, &XF86Dists, DIST_XF86_MAN, 0, dmenuFlagCheck },
- { "prog", "Programmer's header and library files [4MB]",
+ { "ctrb", "Various contributed binaries (ico, xman, etc) [550K]",
+ DMENU_SET_FLAG, &XF86Dists, DIST_XF86_CTRB, 0, dmenuFlagCheck },
+ { "prog", "Programmer's header and library files [4.1MB]",
DMENU_SET_FLAG, &XF86Dists, DIST_XF86_PROG, 0, dmenuFlagCheck },
- { "link", "X Server reconfiguration kit [7.8MB]",
+ { "link", "Kit to reconfigure/rebuild X Servers [8.8MB]",
DMENU_SET_FLAG, &XF86Dists, DIST_XF86_LINK, 0, dmenuFlagCheck },
- { "pex", "PEX fonts and libs needed by PEX apps [500K]",
+ { "ubin", "rstart daemon [2K]",
+ DMENU_SET_FLAG, &XF86Dists, DIST_XF86_UBIN, 0, dmenuFlagCheck },
+ { "pex", "PEX fonts and libs needed by PEX apps [290K]",
DMENU_SET_FLAG, &XF86Dists, DIST_XF86_PEX, 0, dmenuFlagCheck },
- { "sources", "XFree86 3.1.1u1 standard + contrib sources [200MB]",
+ { "sources", "XFree86 3.1.2-S standard + contrib sources [200MB]",
DMENU_SET_FLAG, &XF86Dists, DIST_XF86_SRC, 0, dmenuFlagCheck },
- { NULL } },
+ { NULL } },
};
DMenu MenuXF86SelectFonts = {
- DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
- "Font distribution selection.",
- "Please check off the individual font distributions you wish to\n\
+DMENU_MULTIPLE_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).",
"Press F1 to read the XFree86 release notes for FreeBSD",
- "XF86.hlp",
+ "XF86",
{ { "fnts", "Standard 75 DPI and miscellaneous fonts [3.6MB]",
DMENU_SET_FLAG, &XF86FontDists, DIST_XF86_FONTS_MISC, 0, dmenuFlagCheck },
{ "f100", "100 DPI fonts [1.8MB]",
DMENU_SET_FLAG, &XF86FontDists, DIST_XF86_FONTS_100, 0, dmenuFlagCheck },
+ { "fcyr", "Cyrillic Fonts [1.8MB]",
+ DMENU_SET_FLAG, &XF86FontDists, DIST_XF86_FONTS_CYR, 0, dmenuFlagCheck },
{ "fscl", "Speedo and Type scalable fonts [1.6MB]",
DMENU_SET_FLAG, &XF86FontDists, DIST_XF86_FONTS_SCALE, 0, dmenuFlagCheck },
{ "non", "Japanese, Chinese and other non-english fonts [3.3MB]",
@@ -520,30 +577,30 @@ 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).",
"Press F1 to read the XFree86 release notes for FreeBSD",
- "XF86.hlp",
- { { "SVGA", "Standard VGA or Super VGA display [1MB]",
+ "XF86",
+ { { "SVGA", "Standard VGA or Super VGA display [2.8MB]",
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_SVGA, 0, dmenuFlagCheck },
- { "VGA16", "Standard 16 color VGA display [1MB]",
+ { "VGA16", "Standard 16 color VGA display [1.3MB]",
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_VGA16, 0, dmenuFlagCheck },
- { "Mono", "Standard Monochrome display [1MB]",
+ { "Mono", "Standard Monochrome display [1.3MB]",
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_MONO, 0, dmenuFlagCheck },
- { "8514", "8-bit (256 color) IBM 8514 or compatible card [1MB]",
+ { "8514", "8-bit (256 color) IBM 8514 or compatible card [2.2MB]",
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_8514, 0, dmenuFlagCheck },
- { "AGX", "8-bit AGX card [1MB]",
+ { "AGX", "8-bit AGX card [2.4MB]",
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_AGX, 0, dmenuFlagCheck },
- { "Ma8", "8-bit ATI Mach8 card [1MB]",
+ { "Ma8", "8-bit ATI Mach8 card [2.3MB]",
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_MACH8, 0, dmenuFlagCheck },
- { "Ma32", "8 and 16-bit (65K color) for ATI Mach32 card [1MB]",
+ { "Ma32", "8 and 16-bit (65K color) for ATI Mach32 card [2.4MB]",
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_MACH32, 0, dmenuFlagCheck },
- { "Ma64", "8 and 16-bit (65K color) for ATI Mach64 card [1MB]",
+ { "Ma64", "8 and 16-bit (65K color) for ATI Mach64 card [2.5MB]",
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_MACH64, 0, dmenuFlagCheck },
- { "P9K", "8, 16, and 24-bit color for Weitek P9000 based boards [1MB]",
+ { "P9K", "8, 16, and 24-bit color for Weitek P9000 based boards [2.5MB]",
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_P9000, 0, dmenuFlagCheck },
- { "S3", "8, 16 and 24-bit color for S3 based boards [1MB]",
+ { "S3", "8, 16 and 24-bit color for S3 based boards [2.7MB]",
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_S3, 0, dmenuFlagCheck },
- { "W32", "8-bit Color for ET4000/W32, /W32i and /W32p cards [1MB]",
+ { "W32", "8-bit Color for ET4000/W32, /W32i and /W32p cards [2.3MB]",
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_W32, 0, dmenuFlagCheck },
- { "nest", "A nested server for testing purposes [1MB]",
+ { "nest", "A nested server for testing purposes [1.8MB]",
DMENU_SET_FLAG, &XF86ServerDists, DIST_XF86_SERVER_NEST, 0, dmenuFlagCheck },
{ NULL } },
};
@@ -551,88 +608,33 @@ Mono servers are particularly well-suited to most LCD displays).",
DMenu MenuDiskDevices = {
DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
"Select Drive(s)",
- "Please select the drive, or drives, on which you wish to install\n\
-FreeBSD. You need to select at least one drive containing some free\n\
-space, though FreeBSD can be installed across several drives if you do\n\
-not have the required space on a single drive. If you wish to boot\n\
-off a drive that's not a `zero drive', or have multiple operating\n\
+ "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].",
- "Press F1 for important information regarding geometry!",
- "drives.hlp",
+ "Press F1 for important information regarding disk geometry!",
+ "drives",
{ { NULL } },
};
-/* Local work func for MenuOptions */
-static int
-clearFlags(char *str)
-{
- OptFlags = 0;
- return 1; /* Gross, but forces menu rebuild */
-}
-
-static char *
-userPassCheck(DMenuItem *item)
-{
- char *cp = getenv(FTP_USER);
-
- return (cp && *cp) ? "ON" : "OFF";
-}
-
-static char *
-ftpFlagCheck(DMenuItem *item)
-{
- /* Verify that everything's sane */
- if ((OptFlags & (OPT_FTP_ABORT + OPT_FTP_RESELECT)) == (OPT_FTP_ABORT + OPT_FTP_RESELECT))
- OptFlags &= ~OPT_FTP_RESELECT;
- if (!(OptFlags & (OPT_FTP_ABORT + OPT_FTP_RESELECT)))
- OptFlags |= OPT_FTP_ABORT;
- if (*((unsigned int *)item->ptr) & item->parm)
- return "ON";
- return "OFF";
-}
-
-/* The installation options menu */
-DMenu MenuOptions = {
- DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
- "Choose Installation Options",
- "The following options control how this utility will deal\n\
-with various possible error conditions and how verbose it will\n\
-be at various stages.",
- "Press F1 for more help on these options",
- "options.hlp",
- { { "FTP Options", "Set FTP specific options",
- DMENU_SUBMENU, &MenuFTPOptions, 0, 0, 0 },
- { "NFS Secure", "NFS server talks only on a secure port",
- DMENU_SET_FLAG, &OptFlags, OPT_NFS_SECURE, 0, dmenuFlagCheck },
- { "NFS Slow", "User is using a slow PC or ethernet card",
- DMENU_SET_FLAG, &OptFlags, OPT_SLOW_ETHER, 0, dmenuFlagCheck },
- { "Debugging", "Turn on the extra debugging flag",
- DMENU_SET_FLAG, &OptFlags, OPT_DEBUG, 0, dmenuFlagCheck },
- { "Yes To All", "Assume \"Yes\" answers to all non-critical dialogs",
- DMENU_SET_FLAG, &OptFlags, OPT_NO_CONFIRM, 0, dmenuFlagCheck },
- { "Clear", "Clear All Option Flags",
- DMENU_CALL, clearFlags, 0, 0 },
- { "Exit", "Exit this menu (returning to previous)",
- DMENU_CANCEL, NULL, 0, 0 },
- { NULL } },
-};
-
-DMenu MenuFTPOptions = {
- DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
- "Choose FTP Options",
- "This menu allows you to customize the behavior of FTP transfers\n\
-for an FTP installation. To select \"Active\" or \"Passive\" mode\n\
-FTP, see the Media menu.",
- NULL,
- NULL,
- { { "FTP Abort", "On transfer failure, abort",
- DMENU_SET_FLAG, &OptFlags, OPT_FTP_ABORT, 0, ftpFlagCheck },
- { "FTP Reselect", "On transfer failure, ask for another host",
- DMENU_SET_FLAG, &OptFlags, OPT_FTP_RESELECT, 0, ftpFlagCheck },
- { "FTP userpass", "Specify username and password instead of anonymous",
- DMENU_CALL, mediaSetFtpUserPass, 0, 0, userPassCheck },
+DMenu MenuHTMLDoc = {
+ DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
+ "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 chose \"other\"\n\
+to enter an arbitrary URL for browsing.",
+ "Press F1 for more help on what you see here.",
+ "html",
+ { { "Handbook", "The FreeBSD Handbook.",
+ DMENU_CALL, docShowDocument, 0, 0 },
+ { "FAQ", "The Frequently Asked Questions guide.",
+ DMENU_CALL, docShowDocument, 0, 0 },
+ { "Home", "The Home Pages for the FreeBSD Project (requires net)",
+ DMENU_CALL, docShowDocument, 0, 0 },
+ { "Other", "Enter a URL.",
+ DMENU_CALL, docShowDocument, 0, 0 },
{ NULL } },
};
@@ -644,23 +646,21 @@ DMenu MenuInstallCustom = {
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.hlp",
- { { "Partition", "Allocate disk space for FreeBSD",
- DMENU_CALL, diskPartitionEditor, 0, 0 },
+ "install",
+ { { "Options", "Go to Options editor",
+ DMENU_CALL, optionsEditor, 0, 0 },
+ { "Partition", "Allocate disk space for FreeBSD",
+ DMENU_CALL, diskPartitionEditor, 0, 0 },
{ "Label", "Label allocated disk partitions",
DMENU_CALL, diskLabelEditor, 0, 0 },
- { "Distributions", "Choose the type of installation you want",
- DMENU_SUBMENU, &MenuInstallType, 0, 0 },
+ { "Distributions", "Select distribution(s) to extract",
+ DMENU_SUBMENU, &MenuDistributions, 0, 0 },
{ "Media", "Choose the installation media type",
DMENU_SUBMENU, &MenuMedia, 0, 0 },
- { "Extract", "Extract distributions from selected media",
- DMENU_CALL, distExtractAll, 0, 0 },
- { "Options", "Go to Options submenu",
- DMENU_SUBMENU, &MenuOptions, 0, 0 },
- { "Commit", "Do Write/Make/Extract options in one step",
+ { "Commit", "Perform any pending Partition/Label/Extract actions",
DMENU_CALL, installCommit, 0, 0 },
- { "Configure", "Do post-install configuration of FreeBSD",
- DMENU_SUBMENU, &MenuConfigure, 0, 0 },
+ { "Extract", "Just do distribution extract step",
+ DMENU_CALL, distExtractAll, 0, 0 },
{ "Exit", "Exit this menu (returning to previous)",
DMENU_CANCEL, NULL, 0, 0 },
{ NULL } },
@@ -669,20 +669,21 @@ to install it from and how you wish to allocate disk storage to FreeBSD.",
/* MBR type menu */
DMenu MenuMBRType = {
DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
- "Chose boot manager type", /* title */
- "FreeBSD comes with a boot selector that allows you to easily\n\
-select between FreeBSD and other operating systems on your machine\n\
-at boot time. If you have more than one drive and wish to boot\n\
-from other than the first, the boot selector will also allow you\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\".",
+ "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\". NOTE: PC-DOS users\n"
+"will almost certainly NOT want to select one!",
"Press F1 to read the installation guide",
- "install.hlp",
+ "install",
{ { "BootMgr", "Install the FreeBSD Boot Manager (\"Booteasy\")",
DMENU_SET_VALUE, &BootMgr, 0, 0, dmenuRadioCheck },
- { "Standard", "Use a standard MBR (no boot manager)",
+ { "Standard", "Install a standard MBR (no boot manager)",
DMENU_SET_VALUE, &BootMgr, 1, 0, dmenuRadioCheck },
{ "None", "Leave the Master Boot Record untouched",
DMENU_SET_VALUE, &BootMgr, 2, 0, dmenuRadioCheck },
@@ -693,26 +694,34 @@ Record to remain untouched, then select \"none\".",
DMenu MenuConfigure = {
DMENU_NORMAL_TYPE,
"FreeBSD Configuration Menu", /* title */
- "If you've already installed FreeBSD, you may use this menu to\n\
-customize it somewhat to suit your particular configuration. Most\n\
-importantly, you can use the Packages utility to load extra \"3rd party\"\n\
+"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.hlp",
+ "configure",
{ { "Add User", "Add users to the system",
- DMENU_SYSTEM_COMMAND, "adduser -silent", 0, 0 },
+ DMENU_SYSTEM_COMMAND, "adduser -config_create ; adduser -s", 0, 0 },
{ "Console", "Customize system console behavior",
DMENU_SUBMENU, &MenuSyscons, 0, 0 },
- { "Networking", "Configure additional network services",
- DMENU_SUBMENU, &MenuNetworking, 0, 0 },
{ "Time Zone", "Set which time zone you're in",
DMENU_SYSTEM_COMMAND, "rm -f /etc/wall_cmos_clock /etc/localtime; tzsetup", 0, 0 },
- { "Packages", "Install extra FreeBSD packaged software",
+ { "Media", "Change the installation media type",
+ DMENU_SUBMENU, &MenuMedia, 0, 0 },
+ { "Mouse", "Select the type of mouse you have",
+ DMENU_SUBMENU, &MenuMouse, 0, 0 },
+ { "Networking", "Configure additional network services",
+ DMENU_SUBMENU, &MenuNetworking, 0, 0 },
+ { "Options", "Go to options editor.",
+ DMENU_CALL, optionsEditor, 0, 0 },
+ { "Packages", "Install pre-packaged software for FreeBSD",
DMENU_CALL, configPackages, 0, 0 },
- { "Ports", "Enable the FreeBSD Ports Collection from CD",
+ { "Ports", "Link to FreeBSD Ports Collection on CD/NFS",
DMENU_CALL, configPorts, 0, 1 },
{ "Root Password", "Set the system manager's password",
DMENU_SYSTEM_COMMAND, "passwd root", 0, 0 },
+ { "HTML Docs", "Go to the HTML documentation menu (post-install).",
+ DMENU_CALL, docBrowser, 0, 0 },
{ "XFree86", "Configure XFree86 (if installed)",
DMENU_SYSTEM_COMMAND, "/usr/X11R6/bin/xf86config", 0, 0 },
{ "Exit", "Exit this menu (returning to previous)",
@@ -720,119 +729,117 @@ software not provided in the base distributions.",
{ NULL } },
};
-static char *
-menuCheckNTP(DMenuItem *item)
-{
- return getenv("ntpdate") ? "ON" : "OFF";
-}
-
-static char *
-menuCheckRouted(DMenuItem *item)
-{
- return getenv("routedflags") ? "ON" : "OFF";
-}
-
DMenu MenuNetworking = {
- DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
+ DMENU_NORMAL_TYPE,
"Network Services Menu",
- "You may have already configured one network device (and the\n\
-other various hostname/gateway/name server parameters) in the process\n\
+"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,
- { { "NFS client", "This machine will be an NFS client",
- DMENU_SET_VARIABLE, "nfs_client=YES", 0, 0, dmenuVarCheck },
- { "NFS server", "This machine will be an NFS server",
- DMENU_SET_VARIABLE, "nfs_server=YES", 0, 0, dmenuVarCheck },
- { "Interfaces", "Configure network interfaces",
- DMENU_CALL, tcpMenuSelect, 0, 0 },
- { "ntpdate", "Select a clock-syncronization server",
- DMENU_SUBMENU, &MenuNTP, 0, 0, menuCheckNTP },
- { "routed", "Set flags for routed (default: -q)",
- DMENU_CALL, configRoutedFlags, 0, 0, menuCheckRouted },
- { "rwhod", "This machine wants to run the rwho daemon",
- DMENU_SET_VARIABLE, "rwhod=YES", 0, 0, dmenuVarCheck },
- { "Exit", "Exit this menu (returning to previous)",
- DMENU_CANCEL, NULL, 0, 0 },
- { NULL } },
+{ { "Interfaces", "Configure additional network interfaces",
+ DMENU_CALL, tcpMenuSelect, 0, 0 },
+ { "NFS client", "This machine will be an NFS client",
+ DMENU_SET_VARIABLE, "nfs_client=YES", 0, 0, 0 },
+ { "NFS server", "This machine will be an NFS server",
+ DMENU_CALL, configNFSServer, 0, 0, 0 },
+ { "Gateway", "This machine will route packets between interfaces",
+ DMENU_SET_VARIABLE, "gateway=YES", 0, 0, 0 },
+ { "Gated", "This machine wants to run gated",
+ DMENU_CALL, configGated, 0, 0, 0 },
+ { "Ntpdate", "Select a clock-syncronization server",
+ DMENU_SUBMENU, &MenuNTP, (int)"ntpdate", 0, dmenuVarCheck },
+ { "Routed", "Set flags for routed (default: -q)",
+ DMENU_CALL, configRoutedFlags, (int)"routed", 0, dmenuVarCheck },
+ { "Rwhod", "This machine wants to run the rwho daemon",
+ DMENU_SET_VARIABLE, "rwhod=YES", 0, 0, dmenuVarCheck },
+ { "Anon FTP", "This machine wishes to allow anonymous FTP.",
+ DMENU_CALL, configAnonFTP, 0, 0, 0 },
+ { "WEB Server", "This machine wishes to be a WWW server.",
+ DMENU_CALL, configApache, 0, 0, 0 },
+ { "Samba", "Install Samba for LanManager (NETBUI) access.",
+ DMENU_CALL, configSamba, 0, 0, 0 },
+ { "PCNFSD", "Run authentication server for clients with PC-NFS.",
+ DMENU_CALL, configPCNFSD, 0, 0, 0 },
+ { NULL } },
};
DMenu MenuNTP = {
- DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
- "NTPDATE Server Selection",
- "There are a number of time syncronization servers available\n\
+DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
+"NTPDATE Server Selection",
+"There are a number of time syncronization servers available\n\
for public use around the Internet. Please select one reasonably\n\
close to you to have your system time syncronized accordingly.",
- "These are the primary open-access NTP servers",
- NULL,
- { { "Other", "Select a site not on this list",
+"These are the primary open-access NTP servers",
+NULL,
+{ { "Other", "Select a site not on this list",
DMENU_CALL, configNTP, 0, 0 },
- { "Australia", "ntp.syd.dms.csiro.au (HP 5061 Cesium Beam)",
+ { "Australia", "ntp.syd.dms.csiro.au (HP 5061 Cesium Beam)",
DMENU_SET_VARIABLE, "ntpdate=ntp.syd.dms.csiro.au", 0, 0 },
- { "Canada", "tick.usask.ca (GOES clock)",
+ { "Canada", "tick.usask.ca (GOES clock)",
DMENU_SET_VARIABLE, "ntpdate=tick.usask.ca", 0, 0 },
- { "France", "canon.inria.fr (TDF clock)",
+ { "France", "canon.inria.fr (TDF clock)",
DMENU_SET_VARIABLE, "ntpdate=canon.inria.fr", 0, 0 },
- { "Germany", "ntps1-{0,1,2}.uni-erlangen.de (GPS)",
+ { "Germany", "ntps1-{0,1,2}.uni-erlangen.de (GPS)",
DMENU_SET_VARIABLE, "ntpdate=ntps1-0.uni-erlangen.de", 0, 0 },
- { "Germany #2", "ntps1-0.cs.tu-berlin.de (GPS)",
+ { "Germany #2", "ntps1-0.cs.tu-berlin.de (GPS)",
DMENU_SET_VARIABLE, "ntpdate=ntps1-0.cs.tu-berlin.de", 0, 0 },
- { "Japan", "clock.nc.fukuoka-u.ac.jp (GPS clock)",
+ { "Japan", "clock.nc.fukuoka-u.ac.jp (GPS clock)",
DMENU_SET_VARIABLE, "ntpdate=clock.nc.fukuoka-u.ac.jp", 0, 0},
- { "Japan #2", "clock.tl.fukuoka-u.ac.jp (GPS clock)",
+ { "Japan #2", "clock.tl.fukuoka-u.ac.jp (GPS clock)",
DMENU_SET_VARIABLE, "ntpdate=clock.tl.fukuoka-u.ac.jp", 0, 0},
- { "Netherlands", "ntp0.nl.net (GPS clock)",
+ { "Netherlands", "ntp0.nl.net (GPS clock)",
DMENU_SET_VARIABLE, "ntpdate=ntp0.nl.net", 0, 0 },
- { "Norway", "timer.unik.no (NTP clock)",
+ { "Norway", "timer.unik.no (NTP clock)",
DMENU_SET_VARIABLE, "ntpdate=timer.unik.no", 0, 0 },
- { "Sweden", "Time1.Stupi.SE (Cesium/GPS)",
+ { "Sweden", "Time1.Stupi.SE (Cesium/GPS)",
DMENU_SET_VARIABLE, "ntpdate=Time1.Stupi.SE", 0, 0 },
- { "Switzerland", "swisstime.ethz.ch (DCF77 clock)",
+ { "Switzerland", "swisstime.ethz.ch (DCF77 clock)",
DMENU_SET_VARIABLE, "ntpdate=swisstime.ethz.ch", 0, 0 },
- { "U.S. East Coast", "bitsy.mit.edu (WWV clock)",
+ { "U.S. East Coast", "bitsy.mit.edu (WWV clock)",
DMENU_SET_VARIABLE, "ntpdate=bitsy.mit.edu", 0, 0 },
- { "U.S. East Coast #2", "otc1.psu.edu (WWV clock)",
+ { "U.S. East Coast #2", "otc1.psu.edu (WWV clock)",
DMENU_SET_VARIABLE, "ntpdate=otc1.psu.edu", 0, 0 },
- { "U.S. West Coast", "apple.com (WWV clock)",
+ { "U.S. West Coast", "apple.com (WWV clock)",
DMENU_SET_VARIABLE, "ntpdate=apple.com", 0, 0 },
- { "U.S. West Coast #2", "clepsydra.dec.com (GOES clock)",
+ { "U.S. West Coast #2", "clepsydra.dec.com (GOES clock)",
DMENU_SET_VARIABLE, "ntpdate=clepsydra.dec.com", 0, 0 },
- { "U.S. West Coast #3", "clock.llnl.gov (WWVB clock)",
+ { "U.S. West Coast #3", "clock.llnl.gov (WWVB clock)",
DMENU_SET_VARIABLE, "ntpdate=clock.llnl.gov", 0, 0 },
- { "U.S. Midwest", "ncar.ucar.edu (WWVB clock)",
+ { "U.S. Midwest", "ncar.ucar.edu (WWVB clock)",
DMENU_SET_VARIABLE, "ntpdate=ncar.ucar.edu", 0, 0 },
- { "U.S. Pacific", "chantry.hawaii.net (WWV/H clock)",
+ { "U.S. Pacific", "chantry.hawaii.net (WWV/H clock)",
DMENU_SET_VARIABLE, "ntpdate=chantry.hawaii.net", 0, 0 },
- { "U.S. Southwest", "shorty.chpc.utexas.edu (WWV clock)",
+ { "U.S. Southwest", "shorty.chpc.utexas.edu (WWV clock)",
DMENU_SET_VARIABLE, "ntpdate=shorty.chpc.utexas.edu", 0, 0 },
- { NULL } },
+ { NULL } },
};
DMenu MenuSyscons = {
- DMENU_NORMAL_TYPE,
- "System Console Configuration",
- "The default system console driver for FreeBSD (syscons) has a\n\
+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,
- { { "Keymap", "Choose an alternate keyboard map",
+"Configure your system console settings",
+NULL,
+{ { "Keymap", "Choose an alternate keyboard map",
DMENU_SUBMENU, &MenuSysconsKeymap, 0, 0 },
- { "Repeat", "Set the rate at which keys repeat",
+ { "Repeat", "Set the rate at which keys repeat",
DMENU_SUBMENU, &MenuSysconsKeyrate, 0, 0 },
- { "Saver", "Configure the screen saver",
+ { "Saver", "Configure the screen saver",
DMENU_SUBMENU, &MenuSysconsSaver, 0, 0 },
- { "Exit", "Exit this menu (returning to previous)",
+ { "Exit", "Exit this menu (returning to previous)",
DMENU_CANCEL, NULL, 0, 0 },
- { NULL } },
+ { NULL } },
};
DMenu MenuSysconsKeymap = {
- DMENU_RADIO_TYPE | DMENU_SELECTION_RETURNS,
- "System Console Keymap",
- "The default system console driver for FreeBSD (syscons) defaults\n\
+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.",
@@ -885,12 +892,6 @@ when held down.",
{ NULL } },
};
-static char *
-menuSaverTimeoutCheck(DMenuItem *item)
-{
- return getenv("blanktime") ? "ON" : "OFF";
-}
-
DMenu MenuSysconsSaver = {
DMENU_MULTIPLE_TYPE | DMENU_SELECTION_RETURNS,
"System Console Screen Saver",
@@ -900,17 +901,15 @@ 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,
- { { "blank", "Simply blank the screen",
+{ { "blank", "Simply blank the screen",
DMENU_SET_VARIABLE, "saver=blank", 0, 0, dmenuVarCheck },
- { "Green", "\"Green\" power saving mode (if supported by monitor)",
+ { "Green", "\"Green\" power saving mode (if supported by monitor)",
DMENU_SET_VARIABLE, "saver=green", 0, 0, dmenuVarCheck },
- { "Snake", "Draw a FreeBSD \"snake\" on your screen",
+ { "Snake", "Draw a FreeBSD \"snake\" on your screen",
DMENU_SET_VARIABLE, "saver=snake", 0, 0, dmenuVarCheck },
- { "Star", "A \"twinkling stars\" effect",
+ { "Star", "A \"twinkling stars\" effect",
DMENU_SET_VARIABLE, "saver=star", 0, 0, dmenuVarCheck },
- { "Timeout", "Set the screen saver timeout interval",
- DMENU_CALL, configSaverTimeout, 0, 0, menuSaverTimeoutCheck },
- { "Exit", "Exit this menu (returning to previous)",
- DMENU_CANCEL, NULL, 0, 0 },
- { NULL } },
+ { "Timeout", "Set the screen saver timeout interval",
+ DMENU_CALL, configSaverTimeout, (int)"blanktime", 0, dmenuVarCheck },
+ { NULL } },
};
diff --git a/release/sysinstall/misc.c b/release/sysinstall/misc.c
index 4a93b9e..b4dd63b 100644
--- a/release/sysinstall/misc.c
+++ b/release/sysinstall/misc.c
@@ -1,7 +1,7 @@
/*
* Miscellaneous support routines..
*
- * $Id: misc.c,v 1.11.2.2 1995/06/01 22:32:06 jkh Exp $
+ * $Id: misc.c,v 1.12.2.8 1995/11/04 15:08:21 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -45,6 +45,7 @@
#include <sys/errno.h>
#include <sys/file.h>
#include <sys/types.h>
+#include <dirent.h>
#include <sys/wait.h>
#include <sys/param.h>
#include <sys/mount.h>
@@ -76,11 +77,25 @@ string_concat(char *one, char *two)
{
static char tmp[FILENAME_MAX];
+ /* Yes, we're deliberately cavalier about not checking for overflow */
strcpy(tmp, one);
strcat(tmp, two);
return tmp;
}
+/* Concatenate three strings into static storage */
+char *
+string_concat3(char *one, char *two, char *three)
+{
+ static char tmp[FILENAME_MAX];
+
+ /* Yes, we're deliberately cavalier about not checking for overflow */
+ strcpy(tmp, one);
+ strcat(tmp, two);
+ strcat(tmp, three);
+ return tmp;
+}
+
/* Clip the whitespace off the end of a string */
char *
string_prune(char *str)
@@ -101,6 +116,53 @@ string_skipwhite(char *str)
return str;
}
+/* copy optionally and allow second arg to be null */
+char *
+string_copy(char *s1, char *s2)
+{
+ if (!s1)
+ return NULL;
+ if (!s2)
+ s1[0] = '\0';
+ else
+ strcpy(s1, s2);
+ return s1;
+}
+
+Boolean
+directoryExists(const char *dirname)
+{
+ DIR *tptr;
+
+ if (!dirname)
+ return FALSE;
+ if (!strlen(dirname))
+ return FALSE;
+
+ tptr = opendir(dirname);
+ if (!tptr)
+ return (FALSE);
+
+ closedir(tptr);
+ return (TRUE);
+}
+
+char *
+pathBaseName(const char *path)
+{
+ char *pt;
+ char *ret = (char *)path;
+
+ pt = strrchr(path,(int)'/');
+
+ if (pt != 0) /* if there is a slash */
+ {
+ ret = ++pt; /* start the file after it */
+ }
+
+ return(ret);
+}
+
/* A free guaranteed to take NULL ptrs */
void
safe_free(void *ptr)
@@ -120,6 +182,7 @@ safe_malloc(size_t size)
ptr = malloc(size);
if (!ptr)
msgFatal("Out of memory!");
+ bzero(ptr, size);
return ptr;
}
@@ -179,8 +242,8 @@ Mkdir(char *ipath, void *data)
int final=0;
char *p, *path;
- if (access(ipath, R_OK) == 0)
- return 0;
+ if (file_readable(ipath))
+ return RET_SUCCESS;
path = strdup(ipath);
if (isDebug())
@@ -196,20 +259,22 @@ Mkdir(char *ipath, void *data)
*p = '\0';
if (stat(path, &sb)) {
if (errno != ENOENT) {
+ dialog_clear();
msgConfirm("Couldn't stat directory %s: %s", path, strerror(errno));
- return 1;
+ return RET_FAIL;
}
if (isDebug())
msgDebug("mkdir(%s..)\n", path);
if (mkdir(path, S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
+ dialog_clear();
msgConfirm("Couldn't create directory %s: %s", path,strerror(errno));
- return 1;
+ return RET_FAIL;
}
}
*p = '/';
}
free(path);
- return 0;
+ return RET_SUCCESS;
}
int
@@ -230,16 +295,18 @@ Mount(char *mountp, void *dev)
memset(&ufsargs,0,sizeof ufsargs);
if (Mkdir(mountpoint, NULL)) {
+ dialog_clear();
msgConfirm("Unable to make directory mountpoint for %s!", mountpoint);
- return 1;
+ return RET_FAIL;
}
if (isDebug())
msgDebug("mount %s %s\n", device, mountpoint);
bzero(&ufsargs, sizeof(ufsargs));
ufsargs.fspec = device;
if (mount(MOUNT_UFS, mountpoint, 0, (caddr_t)&ufsargs) == -1) {
- msgConfirm("Error mounting %s on %s : %s\n", device, mountpoint, strerror(errno));
- return 1;
+ dialog_clear();
+ msgConfirm("Error mounting %s on %s : %s", device, mountpoint, strerror(errno));
+ return RET_FAIL;
}
- return 0;
+ return RET_SUCCESS;
}
diff --git a/release/sysinstall/msg.c b/release/sysinstall/msg.c
index 088da89..ae5e3f3 100644
--- a/release/sysinstall/msg.c
+++ b/release/sysinstall/msg.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: msg.c,v 1.28.2.2 1995/06/02 15:31:31 jkh Exp $
+ * $Id: msg.c,v 1.29.2.8 1995/10/22 21:38:17 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -52,9 +52,9 @@
Boolean
isDebug(void)
{
- if (OptFlags & OPT_DEBUG)
- return TRUE;
- return FALSE;
+ char *cp;
+
+ return (cp = variable_get(VAR_DEBUG)) && strcmp(cp, "no");
}
/* Whack up an informational message on the status line, in stand-out */
@@ -216,7 +216,7 @@ msgConfirm(char *fmt, ...)
use_helpfile(NULL);
w = dupwin(newscr);
if (OnVTY) {
- msgDebug("Switching back to VTY 0\n");
+ msgDebug("Switching back to VTY1\n");
ioctl(0, VT_ACTIVATE, 1);
msgInfo(NULL);
}
@@ -264,7 +264,7 @@ msgYesNo(char *fmt, ...)
use_helpfile(NULL);
w = dupwin(newscr);
if (OnVTY) {
- msgDebug("Switching back to VTY 0\n");
+ msgDebug("Switching back to VTY1\n");
ioctl(0, VT_ACTIVATE, 1); /* Switch back */
msgInfo(NULL);
}
@@ -298,7 +298,7 @@ msgGetInput(char *buf, char *fmt, ...)
input_buffer[0] = '\0';
w = dupwin(newscr);
if (OnVTY) {
- msgDebug("Switching back to VTY 0\n");
+ msgDebug("Switching back to VTY1\n");
ioctl(0, VT_ACTIVATE, 1); /* Switch back */
msgInfo(NULL);
}
@@ -349,5 +349,20 @@ msgWeHaveOutput(char *fmt, ...)
dialog_msgbox("Information Dialog", errstr, -1, -1, 0);
free(errstr);
if (OnVTY)
- msgInfo("Command output is on debugging screen - type ALT-F2 to see it");
+ msgInfo("Command output is on VTY2 - type ALT-F2 to see it");
+}
+
+/* Simple versions of msgConfirm() and msgNotify() for calling from scripts */
+int
+msgSimpleConfirm(char *str)
+{
+ msgConfirm(str);
+ return RET_SUCCESS;
+}
+
+int
+msgSimpleNotify(char *str)
+{
+ msgNotify(str);
+ return RET_SUCCESS;
}
diff --git a/release/sysinstall/network.c b/release/sysinstall/network.c
index 821e57a..3340d1c 100644
--- a/release/sysinstall/network.c
+++ b/release/sysinstall/network.c
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
- * $Id: network.c,v 1.7.2.2 1995/07/21 10:57:33 rgrimes Exp $
+ * $Id: network.c,v 1.8 1995/09/18 16:52:33 peter Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -44,12 +44,12 @@
/* These routines deal with getting things off of network media */
#include "sysinstall.h"
-#include <sys/fcntl.h>
#include <signal.h>
+#include <sys/fcntl.h>
+#include <sys/ioctl.h>
#include <sys/stat.h>
static Boolean networkInitialized;
-static pid_t pppPid;
static pid_t startPPP(Device *devp);
Boolean
@@ -58,15 +58,27 @@ mediaInitNetwork(Device *dev)
int i;
char *rp;
char *cp, ifconfig[64];
+ char ifname[255];
- if (!RunningAsInit || networkInitialized || (dev->flags & OPT_LEAVE_NETWORK_UP))
+ if (!RunningAsInit || networkInitialized)
return TRUE;
- configResolv();
+ msgDebug("Init routine called for network device %s.\n", dev->name);
+ if (!file_readable("/etc/resolv.conf"))
+ configResolv();
+
+ /* Old process lying around? */
+ if (dev->private) {
+ kill((pid_t)dev->private, SIGTERM);
+ dev->private = NULL;
+ }
if (!strncmp("cuaa", dev->name, 4)) {
- if (!msgYesNo("You have selected a serial-line network interface.\nDo you want to use PPP with it?")) {
+ dialog_clear();
+ if (!msgYesNo("You have selected a serial-line network interface.\n"
+ "Do you want to use PPP with it?")) {
if (!(dev->private = (void *)startPPP(dev))) {
- msgConfirm("Unable to start PPP! This installation method\ncannot be used.");
+ dialog_clear();
+ msgConfirm("Unable to start PPP! This installation method cannot be used.");
return FALSE;
}
networkInitialized = TRUE;
@@ -78,37 +90,59 @@ mediaInitNetwork(Device *dev)
/* Cheesy slip attach */
snprintf(attach, 256, "slattach -a -h -l -s 9600 %s", dev->devname);
- val = msgGetInput(attach, "Warning: SLIP is rather poorly supported in this revision\nof the installation due to the lack of a dialing utility.\nIf you can use PPP for this instead then you're much better\noff doing so, otherwise SLIP works fairly well for *hardwired*\nlinks. Please edit the following slattach command for\ncorrectness (default here is VJ compression, Hardware flow-control,\nignore carrier and 9600 baud data rate) and hit return to execute it.");
+ val = msgGetInput(attach,
+ "Warning: SLIP is rather poorly supported in this revision\n"
+ "of the installation due to the lack of a dialing utility.\n"
+ "If you can use PPP for this instead then you're much better\n"
+ "off doing so, otherwise SLIP works fairly well for *hardwired*\n"
+ "links. Please edit the following slattach command for\n"
+ "correctness (default here is: VJ compression, Hardware flow-\n"
+ "control, ignore carrier and 9600 baud data rate). When you're\n"
+ "ready, press [ENTER] to execute it.");
if (!val)
return FALSE;
else
strcpy(attach, val);
- if (!vsystem(attach))
- dev->private = NULL;
- else {
- msgConfirm("slattach returned a bad status! Please verify that\nthe command is correct and try again.");
+ if (vsystem(attach)) {
+ dialog_clear();
+ msgConfirm("slattach returned a bad status! Please verify that\n"
+ "the command is correct and try again.");
return FALSE;
}
}
+ strcpy(ifname, "sl0");
}
+ else
+ strcpy(ifname, dev->name);
- snprintf(ifconfig, 64, "%s%s", VAR_IFCONFIG, dev->name);
- cp = getenv(ifconfig);
+ snprintf(ifconfig, 255, "%s%s", VAR_IFCONFIG, dev->name);
+ cp = variable_get(ifconfig);
if (!cp) {
- msgConfirm("The %s device is not configured. You will need to do so\nin the Networking configuration menu before proceeding.");
+ dialog_clear();
+ msgConfirm("The %s device is not configured. You will need to do so\n"
+ "in the Networking configuration menu before proceeding.", ifname);
return FALSE;
}
- i = vsystem("ifconfig %s %s", "sl0", cp);
+ msgNotify("Configuring network device %s.", ifname);
+ i = vsystem("ifconfig %s %s", ifname, cp);
if (i) {
- msgConfirm("Unable to configure the %s interface!\nThis installation method cannot be used.", dev->name);
+ dialog_clear();
+ msgConfirm("Unable to configure the %s interface!\n"
+ "This installation method cannot be used.", ifname);
return FALSE;
}
- rp = getenv(VAR_GATEWAY);
- if (!rp || *rp == '0')
- msgConfirm("No gateway has been set. You may be unable to access hosts\nnot on your local network\n");
- else
+ rp = variable_get(VAR_GATEWAY);
+ if (!rp || *rp == '0') {
+ dialog_clear();
+ msgConfirm("No gateway has been set. You may be unable to access hosts\n"
+ "not on your local network");
+ }
+ else {
+ msgNotify("Adding default route to %s.", rp);
vsystem("route add default %s", rp);
+ }
+ msgDebug("Network initialized successfully.\n");
networkInitialized = TRUE;
return TRUE;
}
@@ -118,28 +152,36 @@ mediaShutdownNetwork(Device *dev)
{
char *cp;
- if (!RunningAsInit || !networkInitialized || (dev->flags & OPT_LEAVE_NETWORK_UP))
+ if (!RunningAsInit || !networkInitialized)
return;
+ msgDebug("Shutdown called for network device %s\n", dev->name);
if (strncmp("cuaa", dev->name, 4)) {
int i;
- char ifconfig[64];
+ char ifconfig[255];
- snprintf(ifconfig, 64, "%s%s", VAR_IFCONFIG, dev->name);
- cp = getenv(ifconfig);
+ snprintf(ifconfig, 255, "%s%s", VAR_IFCONFIG, dev->name);
+ cp = variable_get(ifconfig);
if (!cp)
return;
+ msgNotify("Shutting interface %s down.", dev->name);
i = vsystem("ifconfig %s down", dev->name);
- if (i)
+ if (i) {
+ dialog_clear();
msgConfirm("Warning: Unable to down the %s interface properly", dev->name);
- cp = getenv(VAR_GATEWAY);
- if (cp)
+ }
+ cp = variable_get(VAR_GATEWAY);
+ if (cp) {
+ msgNotify("Deleting default route.");
vsystem("route delete default");
+ }
networkInitialized = FALSE;
}
- else if (pppPid != 0) {
- kill(pppPid, SIGTERM);
- pppPid = 0;
+ else if (dev->private) {
+ msgNotify("Killing PPP process %d.", (int)dev->private);
+ kill((pid_t)dev->private, SIGTERM);
+ dev->private = NULL;
+ networkInitialized = FALSE;
}
}
@@ -147,29 +189,30 @@ mediaShutdownNetwork(Device *dev)
static pid_t
startPPP(Device *devp)
{
- int vfd, fd2;
+ int fd2;
FILE *fp;
char *val;
pid_t pid;
char myaddr[16], provider[16], speed[16];
- /* We're going over to VTY2 */
- vfd = open("/dev/ttyv2", O_RDWR);
- if (vfd == -1)
- return 0;
-
/* These are needed to make ppp work */
Mkdir("/var/log", NULL);
Mkdir("/var/spool/lock", NULL);
Mkdir("/etc/ppp", NULL);
+ if (!variable_get(VAR_SERIAL_SPEED))
+ variable_set2(VAR_SERIAL_SPEED, "115200");
/* Get any important user values */
- val = msgGetInput("115200",
-"Enter the baud rate for your modem - this can be higher than the actual\nmaximum data rate since most modems can talk at one speed to the\ncomputer and at another speed to the remote end.\n\nIf you're not sure what to put here, just select the default.");
- strcpy(speed, val ? val : "115200");
+ val = variable_get_value(VAR_SERIAL_SPEED,
+ "Enter the baud rate for your modem - this can be higher than the actual\n"
+ "maximum data rate since most modems can talk at one speed to the\n"
+ "computer and at another speed to the remote end.\n\n"
+ "If you're not sure what to put here, just select the default.");
+ strcpy(speed, (val && *val) ? val : "115200");
- strcpy(provider, getenv(VAR_GATEWAY) ? getenv(VAR_GATEWAY) : "0");
- val = msgGetInput(provider, "Enter the IP address of your service provider or 0 if you\ndon't know it and would prefer to negotiate it dynamically.");
+ strcpy(provider, variable_get(VAR_GATEWAY) ? variable_get(VAR_GATEWAY) : "0");
+ val = msgGetInput(provider, "Enter the IP address of your service provider or 0 if you\n"
+ "don't know it and would prefer to negotiate it dynamically.");
strcpy(provider, val ? val : "0");
if (devp->private && ((DevInfo *)devp->private)->ipaddr[0])
@@ -187,11 +230,12 @@ startPPP(Device *devp)
}
fd2 = open("/etc/ppp/ppp.secret", O_CREAT);
if (fd2 != -1) {
- fchmod(fd2, 0755);
+ fchmod(fd2, 0700);
close(fd2);
}
fp = fopen("/etc/ppp/ppp.conf", "w");
if (!fp) {
+ dialog_clear();
msgConfirm("Couldn't open /etc/ppp/ppp.conf file! This isn't going to work");
return 0;
}
@@ -201,19 +245,47 @@ startPPP(Device *devp)
fprintf(fp, " set ifaddr %s %s\n", myaddr, provider);
fclose(fp);
- if (isDebug())
- msgDebug("Creating /dev/tun0 device.\n");
if (!file_readable("/dev/tun0") && mknod("/dev/tun0", 0600 | S_IFCHR, makedev(52, 0))) {
+ dialog_clear();
msgConfirm("Warning: No /dev/tun0 device. PPP will not work!");
return 0;
}
if (!(pid = fork())) {
- dup2(vfd, 0);
- dup2(vfd, 1);
- dup2(vfd, 2);
- execl("/stand/ppp", "/stand/ppp", (char *)NULL);
+ int i, fd;
+ struct termios foo;
+ extern int login_tty(int);
+
+ for (i = 0; i < 64; i++)
+ close(i);
+
+ /* We're going over to VTY2 */
+ DebugFD = fd = open("/dev/ttyv2", O_RDWR);
+ ioctl(0, TIOCSCTTY, &fd);
+ dup2(0, 1);
+ dup2(0, 2);
+ if (login_tty(fd) == -1)
+ msgDebug("ppp: Can't set the controlling terminal.\n");
+ signal(SIGTTOU, SIG_IGN);
+ if (tcgetattr(fd, &foo) != -1) {
+ foo.c_cc[VERASE] = '\010';
+ if (tcsetattr(fd, TCSANOW, &foo) == -1)
+ msgDebug("ppp: Unable to set the erase character.\n");
+ }
+ else
+ msgDebug("ppp: Unable to get the terminal attributes!\n");
+ execlp("ppp", "ppp", (char *)NULL);
+ msgDebug("PPP process failed to exec!\n");
exit(1);
}
- msgConfirm("The PPP command is now started on screen 3 (type ALT-F3 to\ninteract with it, ALT-F1 to switch back here). The only command\nyou'll probably want or need to use is the \"term\" command\nwhich starts a terminal emulator you can use to talk to your\nmodem and dial the service provider. Once you're connected,\ncome back to this screen and press return. DO NOT PRESS RETURN\nHERE UNTIL THE CONNECTION IS FULLY ESTABLISHED!");
+ else {
+ dialog_clear();
+ msgConfirm("The PPP command is now started on VTY3 (type ALT-F3 to\n"
+ "interact with it, ALT-F1 to switch back here). The only command\n"
+ "you'll probably want or need to use is the \"term\" command\n"
+ "which starts a terminal emulator you can use to talk to your\n"
+ "modem and dial the service provider. Once you're connected,\n"
+ "come back to this screen and press return. DO NOT PRESS [ENTER]\n"
+ "HERE UNTIL THE CONNECTION IS FULLY ESTABLISHED!");
+ }
return pid;
}
diff --git a/release/sysinstall/nfs.c b/release/sysinstall/nfs.c
index cf04e5e..4dc2b97 100644
--- a/release/sysinstall/nfs.c
+++ b/release/sysinstall/nfs.c
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
- * $Id: nfs.c,v 1.4.2.6 1995/06/10 02:21:40 jkh Exp $
+ * $Id: nfs.c,v 1.5.2.15 1995/11/04 11:09:16 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -58,46 +58,59 @@ mediaInitNFS(Device *dev)
if (NFSMounted)
return TRUE;
- if (!(*netDevice->init)(netDevice))
+ if (!netDevice->init(netDevice))
return FALSE;
- if (Mkdir("/nfs", NULL))
+ if (Mkdir("/dist", NULL))
return FALSE;
- if (vsystem("mount_nfs %s %s %s /nfs", (OptFlags & OPT_SLOW_ETHER) ? "-r 1024 -w 1024" : "",
- (OptFlags & OPT_NFS_SECURE) ? "-P" : "", dev->name)) {
- msgConfirm("Error mounting %s on /nfs: %s (%u)\n", dev->name, strerror(errno), errno);
+ msgNotify("Mounting %s over NFS.", dev->name);
+ if (vsystem("mount_nfs %s %s %s /dist",
+ variable_get(VAR_SLOW_ETHER) ? "-r 1024 -w 1024" : "",
+ variable_get(VAR_NFS_SECURE) ? "-P" : "", dev->name)) {
+ dialog_clear();
+ msgConfirm("Error mounting %s on /dist: %s (%u)", dev->name, strerror(errno), errno);
+ netDevice->shutdown(netDevice);
return FALSE;
}
NFSMounted = TRUE;
+ msgDebug("Mounted NFS device %s onto /dist\n", dev->name);
return TRUE;
}
int
-mediaGetNFS(Device *dev, char *file, Attribs *dist_attrs)
+mediaGetNFS(Device *dev, char *file, Boolean tentative)
{
- char buf[PATH_MAX];
+ char buf[PATH_MAX];
- snprintf(buf, PATH_MAX, "/nfs/%s", file);
- if (!access(buf, R_OK))
+ msgDebug("Request for %s from NFS\n", file);
+ snprintf(buf, PATH_MAX, "/dist/%s", file);
+ if (file_readable(buf))
return open(buf, O_RDONLY);
- snprintf(buf, PATH_MAX, "/nfs/dists/%s", file);
+ snprintf(buf, PATH_MAX, "/dist/dists/%s", file);
+ if (file_readable(buf))
+ return open(buf, O_RDONLY);
+ snprintf(buf, PATH_MAX, "/dist/%s/%s", variable_get(VAR_RELNAME), file);
+ if (file_readable(buf))
+ return open(buf, O_RDONLY);
+ snprintf(buf, PATH_MAX, "/dist/%s/dists/%s", variable_get(VAR_RELNAME), file);
return open(buf, O_RDONLY);
}
void
mediaShutdownNFS(Device *dev)
{
- Device *netdev = (Device *)dev->private;
+ /* Device *netdev = (Device *)dev->private; */
if (!NFSMounted)
return;
- msgDebug("Unmounting /nfs\n");
- if (unmount("/nfs", MNT_FORCE) != 0)
- msgConfirm("Could not unmount the NFS partition: %s\n", strerror(errno));
- if (isDebug())
- msgDebug("Unmount returned\n");
- (*netdev->shutdown)(netdev);
+ msgNotify("Unmounting NFS partition on /dist");
+ if (unmount("/dist", MNT_FORCE) != 0) {
+ dialog_clear();
+ msgConfirm("Could not unmount the NFS partition: %s", strerror(errno));
+ }
+ msgDebug("Unmount of NFS partition successful\n");
+ /* (*netdev->shutdown)(netdev); */
NFSMounted = FALSE;
return;
}
diff --git a/release/sysinstall/sysinstall.h b/release/sysinstall/sysinstall.h
index b1b1ba3..b8e1f43 100644
--- a/release/sysinstall/sysinstall.h
+++ b/release/sysinstall/sysinstall.h
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
- * $Id: sysinstall.h,v 1.42.2.1 1995/07/21 10:54:06 rgrimes Exp $
+ * $Id: sysinstall.h,v 1.43 1995/09/18 16:52:35 peter Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -49,8 +49,11 @@
#include <string.h>
#include <unistd.h>
#include <dialog.h>
+#include <sys/types.h>
+#include <sys/wait.h>
#include "libdisk.h"
#include "dist.h"
+#include "version.h"
/*** Defines ***/
@@ -66,10 +69,14 @@
#define VAR_VALUE_MAX 1024
/* device limits */
-#define DEV_NAME_MAX 128 /* The maximum length of a device name */
-#define DEV_MAX 200 /* The maximum number of devices we'll deal with */
+#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 MAX_FTP_RETRIES 3 /* How many times to beat our heads against the wall */
+#define MAX_FTP_RETRIES "4" /* How many times to beat our heads against the wall */
+
+#define RET_FAIL -1
+#define RET_SUCCESS 0
+#define RET_DONE 1
/*
* I make some pretty gross assumptions about having a max of 50 chunks
@@ -79,36 +86,65 @@
* 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 50
+#define MAX_CHUNKS 40
-/* Internal flag variables */
+/* 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"
-#define FTP_USER "_ftpUser"
-#define FTP_PASS "_ftpPass"
-
-#define OPT_NO_CONFIRM 0x0001
-#define OPT_NFS_SECURE 0x0002
-#define OPT_DEBUG 0x0004
-#define OPT_FTP_ACTIVE 0x0008
-#define OPT_FTP_PASSIVE 0x0010
-#define OPT_FTP_RESELECT 0x0020
-#define OPT_FTP_ABORT 0x0040
-#define OPT_SLOW_ETHER 0x0080
-#define OPT_EXPLORATORY_GET 0x0100
-#define OPT_LEAVE_NETWORK_UP 0x0200
-
-#define VAR_HOSTNAME "hostname"
-#define VAR_DOMAINNAME "domainname"
-#define VAR_NAMESERVER "nameserver"
-#define VAR_GATEWAY "defaultrouter"
-#define VAR_IPADDR "ipaddr"
-
-#define VAR_IFCONFIG "ifconfig_"
-#define VAR_INTERFACES "network_interfaces"
+/* 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_CONFIG_FILE "configFile"
+#define VAR_CPIO_VERBOSITY "cpioVerbose"
+#define VAR_DEBUG "debug"
+#define VAR_DISK "disk"
+#define VAR_DISKSPACE "diskSpace"
+#define VAR_DOMAINNAME "domainname"
+#define VAR_EXTRAS "ifconfig_"
+#define VAR_FTP_ONERROR "ftpOnError"
+#define VAR_FTP_PASS "ftpPass"
+#define VAR_FTP_PATH "ftp"
+#define VAR_FTP_RETRIES "ftpRetryCount"
+#define VAR_FTP_STATE "ftpState"
+#define VAR_FTP_USER "ftpUser"
+#define VAR_GATEWAY "defaultrouter"
+#define VAR_GEOMETRY "geometry"
+#define VAR_HOSTNAME "hostname"
+#define VAR_IFCONFIG "ifconfig_"
+#define VAR_INTERFACES "network_interfaces"
+#define VAR_IPADDR "ipaddr"
+#define VAR_LABEL "label"
+#define VAR_LABEL_COUNT "labelCount"
+#define VAR_MEDIA_TYPE "mediaType"
+#define VAR_NAMESERVER "nameserver"
+#define VAR_NETMASK "netmask"
+#define VAR_NFS_PATH "nfs"
+#define VAR_NFS_SECURE "nfsSecure"
+#define VAR_NO_CONFIRM "noConfirm"
+#define VAR_NTPDATE "ntpDate"
+#define VAR_PORTS_PATH "ports"
+#define VAR_RELNAME "releaseName"
+#define VAR_ROOT_SIZE "rootSize"
+#define VAR_ROUTEDFLAGS "routedflags"
+#define VAR_SLOW_ETHER "slowEthernetCard"
+#define VAR_SWAP_SIZE "swapSize"
+#define VAR_TAPE_BLOCKSIZE "tapeBlocksize"
+#define VAR_UFS_PATH "ufs"
+#define VAR_USR_SIZE "usrSize"
+#define VAR_VAR_SIZE "varSize"
+#define VAR_SERIAL_SPEED "serialSpeed"
+
+#define DEFAULT_TAPE_BLOCKSIZE "20"
+
+/* One MB worth of blocks */
+#define ONE_MEG 2048
/* The help file for the TCP/IP setup screen */
#define TCP_HELPFILE "tcp"
@@ -136,7 +172,7 @@ typedef struct _dmenuItem {
char *prompt; /* Our prompt */
DMenuItemType type; /* What type of item we are */
void *ptr; /* Generic data ptr */
- u_long parm; /* Parameter for above */
+ int parm; /* Parameter for above */
Boolean disabled; /* Are we temporarily disabled? */
char * (*check)(struct _dmenuItem *); /* Our state */
} DMenuItem;
@@ -157,13 +193,14 @@ typedef struct _variable {
char value[VAR_VALUE_MAX];
} Variable;
+/* For attribs */
#define MAX_ATTRIBS 200
-#define MAX_NAME 511
-#define MAX_VALUE 4095
+#define MAX_NAME 64
+#define MAX_VALUE 256
typedef struct _attribs {
- char *name;
- char *value;
+ char name[MAX_NAME];
+ char value[MAX_VALUE];
} Attribs;
typedef enum {
@@ -188,7 +225,7 @@ typedef struct _device {
DeviceType type;
Boolean enabled;
Boolean (*init)(struct _device *dev);
- int (*get)(struct _device *dev, char *file, Attribs *dist_attrs);
+ int (*get)(struct _device *dev, char *file, Boolean tentative);
Boolean (*close)(struct _device *dev, int fd);
void (*shutdown)(struct _device *dev);
void *private;
@@ -213,11 +250,49 @@ typedef struct _part_info {
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 *maintainer; /* maintainer */
+} IndexEntry;
+typedef IndexEntry *IndexEntryPtr;
+
typedef int (*commandFunc)(char *key, void *data);
-#define HOSTNAME_FIELD_LEN 256
+#define HOSTNAME_FIELD_LEN 128
#define IPADDR_FIELD_LEN 16
-#define EXTRAS_FIELD_LEN 256
+#define EXTRAS_FIELD_LEN 128
+
+/* Verbosity levels for CPIO as expressed by cpio arguments - yuck */
+#define CPIO_VERBOSITY (!strcmp(variable_get(CPIO_VERBOSITY_LEVEL), "low") ? "" : \
+ !strcmp(variable_get(CPIO_VERBOSITY_LEVEL), "medium") ? "-V" : "-v")
/* This is the structure that Network devices carry around in their private, erm, structures */
typedef struct _devPriv {
@@ -242,9 +317,7 @@ 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 unsigned int OptFlags; /* Global options */
extern int BootMgr; /* Which boot manager to use */
-extern char *InstallPrefix; /* A location bias */
extern DMenu MenuInitial; /* Initial installation menu */
@@ -255,6 +328,7 @@ extern DMenu MenuFTPOptions; /* FTP Installation options */
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 */
@@ -268,8 +342,8 @@ extern DMenu MenuSysconsKeyrate; /* System console keyrate configuration menu *
extern DMenu MenuSysconsSaver; /* System console saver configuration menu */
extern DMenu MenuNetworking; /* Network configuration menu */
extern DMenu MenuInstallCustom; /* Custom Installation menu */
-extern DMenu MenuInstallType; /* Installation type menu */
extern DMenu MenuDistributions; /* Distribution menu */
+extern DMenu MenuSubDistributions; /* Custom distribution menu */
extern DMenu MenuDESDistributions; /* DES distribution menu */
extern DMenu MenuSrcDistributions; /* Source distribution menu */
extern DMenu MenuXF86; /* XFree86 main menu */
@@ -278,17 +352,25 @@ extern DMenu MenuXF86SelectCore; /* XFree86 core distribution menu */
extern DMenu MenuXF86SelectServer; /* XFree86 server distribution menu */
extern DMenu MenuXF86SelectFonts; /* XFree86 font selection menu */
extern DMenu MenuDiskDevices; /* Disk devices menu */
+extern DMenu MenuHTMLDoc; /* HTML Documentation menu */
/*** Prototypes ***/
+/* apache.c */
+extern int configApache(char *str);
+
+/* anonFTP.c */
+extern int configAnonFTP(char *unused);
+
/* attrs.c */
-extern const char *attr_match(Attribs *attr, char *name);
-extern int attr_parse(Attribs **attr, char *file);
+extern char *attr_match(Attribs *attr, char *name);
+extern int attr_parse_file(Attribs *attr, char *file);
+extern int attr_parse(Attribs *attr, int fd);
/* cdrom.c */
extern Boolean mediaInitCDROM(Device *dev);
-extern int mediaGetCDROM(Device *dev, char *file, Attribs *dist_attrs);
+extern int mediaGetCDROM(Device *dev, char *file, Boolean tentative);
extern void mediaShutdownCDROM(Device *dev);
/* command.c */
@@ -299,7 +381,7 @@ extern void command_shell_add(char *key, char *fmt, ...);
extern void command_func_add(char *key, commandFunc func, void *data);
/* config.c */
-extern void configFstab(void);
+extern int configFstab(void);
extern void configSysconfig(void);
extern void configResolv(void);
extern int configPorts(char *str);
@@ -313,8 +395,8 @@ extern int crc(int, unsigned long *, unsigned long *);
/* decode.c */
extern DMenuItem *decode(DMenu *menu, char *name);
-extern Boolean dispatch(DMenuItem *tmp, char *name);
-extern Boolean decode_and_dispatch_multiple(DMenu *menu, char *names);
+extern int dispatch(DMenuItem *tmp, char *name);
+extern int decode_and_dispatch_multiple(DMenu *menu, char *names);
/* devices.c */
extern DMenu *deviceCreateMenu(DMenu *menu, DeviceType type, int (*hook)());
@@ -323,11 +405,11 @@ extern Device **deviceFind(char *name, DeviceType type);
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), int (*get)(Device *dev, char *file, Attribs *dist_attrs),
+ Boolean (*init)(Device *mediadev), int (*get)(Device *dev, char *file, Boolean tentative),
Boolean (*close)(Device *mediadev, int fd), void (*shutDown)(Device *mediadev),
void *private);
extern Boolean dummyInit(Device *dev);
-extern int dummyGet(Device *dev, char *dist, Attribs *dist_attrs);
+extern int dummyGet(Device *dev, char *dist, Boolean tentative);
extern Boolean dummyClose(Device *dev, int fd);
extern void dummyShutdown(Device *dev);
@@ -337,6 +419,7 @@ extern int diskPartitionWrite(char *unused);
/* dist.c */
extern int distReset(char *str);
+extern int distSetCustom(char *str);
extern int distSetDeveloper(char *str);
extern int distSetXDeveloper(char *str);
extern int distSetKernDeveloper(char *str);
@@ -356,49 +439,66 @@ extern char *dmenuVarCheck(DMenuItem *item);
extern char *dmenuFlagCheck(DMenuItem *item);
extern char *dmenuRadioCheck(DMenuItem *item);
+/* doc.c */
+extern int docBrowser(char *junk);
+extern int docShowDocument(char *str);
+
/* dos.c */
extern Boolean mediaInitDOS(Device *dev);
-extern int mediaGetDOS(Device *dev, char *file, Attribs *dist_attrs);
+extern int mediaGetDOS(Device *dev, char *file, Boolean tentative);
extern void mediaShutdownDOS(Device *dev);
/* floppy.c */
extern int getRootFloppy(void);
extern Boolean mediaInitFloppy(Device *dev);
-extern int mediaGetFloppy(Device *dev, char *file, Attribs *dist_attrs);
+extern int mediaGetFloppy(Device *dev, char *file, Boolean tentative);
extern void mediaShutdownFloppy(Device *dev);
/* ftp_strat.c */
extern Boolean mediaCloseFTP(Device *dev, int fd);
extern Boolean mediaInitFTP(Device *dev);
-extern int mediaGetFTP(Device *dev, char *file, Attribs *dist_attrs);
+extern int mediaGetFTP(Device *dev, char *file, Boolean tentative);
extern void mediaShutdownFTP(Device *dev);
-extern int mediaSetFtpUserPass(char *str);
/* globals.c */
extern void globalsInit(void);
+/* index.c */
+int index_get(char *fname, PkgNodePtr papa);
+int index_read(int fd, PkgNodePtr papa);
+int index_menu(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 plist);
+
/* install.c */
extern int installCommit(char *str);
extern int installExpress(char *str);
-extern Boolean installFilesystems(void);
-
-/* lang.c */
-extern void lang_set_Danish(char *str);
-extern void lang_set_Dutch(char *str);
-extern void lang_set_English(char *str);
-extern void lang_set_French(char *str);
-extern void lang_set_German(char *str);
-extern void lang_set_Italian(char *str);
-extern void lang_set_Japanese(char *str);
-extern void lang_set_Norwegian(char *str);
-extern void lang_set_Russian(char *str);
-extern void lang_set_Spanish(char *str);
-extern void lang_set_Swedish(char *str);
+extern int installNovice(char *str);
+extern int installFixit(char *str);
+extern int installFixup(char *str);
+extern int installUpgrade(char *str);
+extern int installPreconfig(char *str);
+extern int installFilesystems(char *str);
+extern int installVarDefaults(char *str);
+extern Boolean copySelf(void);
+extern Boolean rootExtract(void);
+
+/* installFinal.c */
+extern int configGated(char *unused);
+extern int configSamba(char *unused);
+extern int configPCNFSD(char *unused);
+extern int configNFSServer(char *unused);
/* label.c */
extern int diskLabelEditor(char *str);
extern int diskLabelCommit(char *str);
+/* lndir.c */
+extern int lndir(char *from, char *to);
+
/* makedevs.c (auto-generated) */
extern const char termcap_vt100[];
extern const char termcap_cons25[];
@@ -414,6 +514,7 @@ extern const u_char koi8_r2cp866[];
extern u_char default_scrnmap[];
/* media.c */
+extern char *cpioVerbosity(void);
extern int mediaSetCDROM(char *str);
extern int mediaSetFloppy(char *str);
extern int mediaSetDOS(char *str);
@@ -423,7 +524,10 @@ extern int mediaSetFTPActive(char *str);
extern int mediaSetFTPPassive(char *str);
extern int mediaSetUFS(char *str);
extern int mediaSetNFS(char *str);
-extern Boolean mediaGetType(void);
+extern int mediaSetFtpOnError(char *str);
+extern int mediaSetFtpUserPass(char *str);
+extern int mediaSetCPIOVerbosity(char *str);
+extern int mediaGetType(char *str);
extern Boolean mediaExtractDist(char *dir, int fd);
extern Boolean mediaExtractDistBegin(char *dir, int *fd, int *zpid, int *cpic);
extern Boolean mediaExtractDistEnd(int zpid, int cpid);
@@ -432,9 +536,13 @@ extern Boolean mediaVerify(void);
/* misc.c */
extern Boolean file_readable(char *fname);
extern Boolean file_executable(char *fname);
+extern Boolean directoryExists(const char *dirname);
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);
@@ -458,6 +566,8 @@ 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);
@@ -465,30 +575,42 @@ extern void mediaShutdownNetwork(Device *dev);
/* nfs.c */
extern Boolean mediaInitNFS(Device *dev);
-extern int mediaGetNFS(Device *dev, char *file, Attribs *dist_attrs);
+extern int mediaGetNFS(Device *dev, char *file, Boolean tentative);
extern void mediaShutdownNFS(Device *dev);
+/* options.c */
+extern int optionsEditor(char *str);
+
+/* package.c */
+extern int package_add(char *name);
+extern int package_extract(Device *dev, char *name);
+
/* system.c */
extern void systemInitialize(int argc, char **argv);
extern void systemShutdown(void);
+extern int execExecute(char *cmd, char *name);
extern int systemExecute(char *cmd);
-extern int systemDisplayFile(char *file);
+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 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, ...);
+extern int docBrowser(char *junk);
+extern int docShowDocument(char *str);
/* tape.c */
+extern char *mediaTapeBlocksize(void);
extern Boolean mediaInitTape(Device *dev);
-extern int mediaGetTape(Device *dev, char *file, Attribs *dist_attrs);
+extern int mediaGetTape(Device *dev, char *file, Boolean tentative);
extern void mediaShutdownTape(Device *dev);
/* tcpip.c */
extern int tcpOpenDialog(Device *dev);
extern int tcpMenuSelect(char *str);
+extern int tcpInstallDevice(char *str);
extern Boolean tcpDeviceSelect(void);
/* termcap.c */
@@ -497,11 +619,14 @@ extern int set_termcap(void);
/* ufs.c */
extern void mediaShutdownUFS(Device *dev);
extern Boolean mediaInitUFS(Device *dev);
-extern int mediaGetUFS(Device *dev, char *file, Attribs *dist_attrs);
+extern int mediaGetUFS(Device *dev, char *file, Boolean tentative);
-/* variables.c */
+/* variable.c */
extern void variable_set(char *var);
extern void variable_set2(char *name, char *value);
+extern char *variable_get(char *var);
+extern void variable_unset(char *var);
+extern char *variable_get_value(char *var, char *prompt);
/* wizard.c */
extern void slice_wizard(Disk *d);
diff --git a/release/sysinstall/system.c b/release/sysinstall/system.c
index 880dff9..d9003cb 100644
--- a/release/sysinstall/system.c
+++ b/release/sysinstall/system.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: system.c,v 1.44 1995/06/11 19:30:10 rgrimes Exp $
+ * $Id: system.c,v 1.45 1995/09/18 16:52:36 peter Exp $
*
* Jordan Hubbard
*
@@ -70,6 +70,9 @@ systemInitialize(int argc, char **argv)
/* If we haven't crashed I guess dialog is running ! */
DialogActive = TRUE;
+ /* Make sure HOME is set for those utilities that need it */
+ if (!getenv("HOME"))
+ setenv("HOME", "/", 1);
signal(SIGINT, handle_intr);
}
@@ -85,7 +88,7 @@ systemShutdown(void)
if (RunningAsInit) {
/* Put the console back */
ioctl(0, VT_ACTIVATE, 2);
- reboot(RB_HALT);
+ reboot(0);
}
else
exit(1);
@@ -96,11 +99,16 @@ int
systemExecute(char *command)
{
int status;
+ struct termios foo;
dialog_clear();
dialog_update();
end_dialog();
DialogActive = FALSE;
+ if (tcgetattr(0, &foo) != -1) {
+ foo.c_cc[VERASE] = '\010';
+ tcsetattr(0, TCSANOW, &foo);
+ }
status = system(command);
DialogActive = TRUE;
dialog_clear();
@@ -108,9 +116,9 @@ systemExecute(char *command)
return status;
}
-/* Display a file in a filebox */
+/* Display a help file in a filebox */
int
-systemDisplayFile(char *file)
+systemDisplayHelp(char *file)
{
char *fname = NULL;
char buf[FILENAME_MAX];
@@ -189,8 +197,8 @@ vsystem(char *fmt, ...)
pid_t pid;
int omask;
sig_t intsave, quitsave;
- char *cmd,*p;
- int i,magic=0;
+ char *cmd;
+ int i;
cmd = (char *)malloc(FILENAME_MAX);
cmd[0] = '\0';
@@ -198,67 +206,72 @@ vsystem(char *fmt, ...)
vsnprintf(cmd, FILENAME_MAX, fmt, args);
va_end(args);
- /* Find out if this command needs the wizardry of the shell */
- for (p="<>|'`=\"()" ; *p; p++)
- if (strchr(cmd, *p))
- magic++;
omask = sigblock(sigmask(SIGCHLD));
if (isDebug())
- msgDebug("Executing command `%s' (Magic=%d)\n", cmd, magic);
- switch(pid = fork()) {
- case -1: /* error */
+ msgDebug("Executing command `%s'\n", cmd);
+ pid = fork();
+ if (pid == -1) {
(void)sigsetmask(omask);
i = 127;
-
- case 0: /* child */
+ }
+ else if (!pid) { /* Junior */
(void)sigsetmask(omask);
if (DebugFD != -1) {
if (OnVTY && isDebug())
- msgInfo("Command output is on debugging screen - type ALT-F2 to see it");
+ msgInfo("Command output is on VTY2 - type ALT-F2 to see it");
dup2(DebugFD, 0);
dup2(DebugFD, 1);
dup2(DebugFD, 2);
}
-#ifdef NOT_A_GOOD_IDEA_CRUNCHED_BINARY
- if (magic) {
- char *argv[100];
- i = 0;
- argv[i++] = "crunch";
- argv[i++] = "sh";
- argv[i++] = "-c";
- argv[i++] = cmd;
- argv[i] = 0;
- exit(crunched_main(i,argv));
- } else {
- char *argv[100];
- i = 0;
- argv[i++] = "crunch";
- while (cmd && *cmd) {
- argv[i] = strsep(&cmd," \t");
- if (*argv[i])
- i++;
+ execl("/stand/sh", "sh", "-c", cmd, (char *)NULL);
+ exit(1);
+ }
+ else {
+ intsave = signal(SIGINT, SIG_IGN);
+ quitsave = signal(SIGQUIT, SIG_IGN);
+ pid = waitpid(pid, &pstat, 0);
+ (void)sigsetmask(omask);
+ (void)signal(SIGINT, intsave);
+ (void)signal(SIGQUIT, quitsave);
+ i = (pid == -1) ? -1 : WEXITSTATUS(pstat);
+ if (isDebug())
+ msgDebug("Command `%s' returns status of %d\n", cmd, i);
+ free(cmd);
+ }
+ return i;
+}
+
+void
+systemCreateHoloshell(void)
+{
+ if (OnVTY) {
+ if (!fork()) {
+ int i, fd;
+ struct termios foo;
+ extern int login_tty(int);
+
+ for (i = 0; i < 64; i++)
+ close(i);
+ DebugFD = fd = open("/dev/ttyv3", O_RDWR);
+ ioctl(0, TIOCSCTTY, &fd);
+ dup2(0, 1);
+ dup2(0, 2);
+ if (login_tty(fd) == -1)
+ msgDebug("Doctor: I can't set the controlling terminal.\n");
+ signal(SIGTTOU, SIG_IGN);
+ if (tcgetattr(fd, &foo) != -1) {
+ foo.c_cc[VERASE] = '\010';
+ if (tcsetattr(fd, TCSANOW, &foo) == -1)
+ msgDebug("Doctor: I'm unable to set the erase character.\n");
}
- argv[i] = 0;
- if (crunched_here(argv[1]))
- exit(crunched_main(i,argv));
else
- execvp(argv[1],argv+1);
- kill(getpid(),9);
+ msgDebug("Doctor: I'm unable to get the terminal attributes!\n");
+ printf("Warning: This shell is chroot()'d to /mnt\n");
+ execlp("sh", "-sh", 0);
+ msgDebug("Was unable to execute sh for Holographic shell!\n");
+ exit(1);
}
-#else /* !CRUNCHED_BINARY */
- execl("/stand/sh", "sh", "-c", cmd, (char *)NULL);
- kill(getpid(),9);
-#endif /* CRUNCHED_BINARY */
+ else
+ msgNotify("Starting an emergency holographic shell on VTY4");
}
- intsave = signal(SIGINT, SIG_IGN);
- quitsave = signal(SIGQUIT, SIG_IGN);
- pid = waitpid(pid, &pstat, 0);
- (void)sigsetmask(omask);
- (void)signal(SIGINT, intsave);
- (void)signal(SIGQUIT, quitsave);
- i = (pid == -1) ? -1 : WEXITSTATUS(pstat);
- if (isDebug())
- msgDebug("Command `%s' returns status of %d\n", cmd, i);
- free(cmd);
- return i;
}
diff --git a/release/sysinstall/tape.c b/release/sysinstall/tape.c
index bf72d8b..7cc92dd1a 100644
--- a/release/sysinstall/tape.c
+++ b/release/sysinstall/tape.c
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
- * $Id: tape.c,v 1.6 1995/06/11 19:30:11 rgrimes Exp $
+ * $Id: tape.c,v 1.6.2.11 1995/11/15 06:59:52 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -49,42 +49,61 @@
static Boolean tapeInitted;
+char *
+mediaTapeBlocksize(void)
+{
+ char *cp = variable_get(VAR_TAPE_BLOCKSIZE);
+
+ return cp ? cp : DEFAULT_TAPE_BLOCKSIZE;
+}
+
Boolean
mediaInitTape(Device *dev)
{
int i;
-
if (tapeInitted)
return TRUE;
+ msgDebug("Tape init routine called for %s (private dir is %s)\n", dev->name, dev->private);
Mkdir(dev->private, NULL);
if (chdir(dev->private))
- return FALSE;
- msgConfirm("Insert tape into %s and press return", dev->description);
+ return FALSE;
+ /* We know the tape is already in the drive, so go for it */
msgNotify("Attempting to extract from %s...", dev->description);
- if (!strcmp(dev->name, "ft0"))
- i = vsystem("ft | cpio -iduVm -H tar");
+ if (!strcmp(dev->name, "rft0"))
+ i = vsystem("ft | cpio -idum %s --block-size %s", cpioVerbosity(), mediaTapeBlocksize());
else
- i = vsystem("cpio -iduVm -H tar -I %s", dev->devname);
+ i = vsystem("cpio -idum %s --block-size %s -I %s", cpioVerbosity(), mediaTapeBlocksize(), dev->devname);
if (!i) {
tapeInitted = TRUE;
+ msgDebug("Tape initialized successfully.\n");
return TRUE;
}
- else
+ else {
+ dialog_clear();
msgConfirm("Tape extract command failed with status %d!", i);
+ }
return FALSE;
}
int
-mediaGetTape(Device *dev, char *file, Attribs *dist_attrs)
+mediaGetTape(Device *dev, char *file, Boolean tentative)
{
char buf[PATH_MAX];
+ int fd;
sprintf(buf, "%s/%s", (char *)dev->private, file);
+ msgDebug("Request for %s from tape (looking in %s)\n", file, buf);
if (file_readable(buf))
- return open(buf, O_RDONLY);
- sprintf(buf, "%s/dists/%s", (char *)dev->private, file);
- return open(buf, O_RDONLY);
+ fd = open(buf, O_RDONLY);
+ else {
+ sprintf(buf, "%s/dists/%s", (char *)dev->private, file);
+ fd = open(buf, O_RDONLY);
+ }
+ /* Nuke the files behind us to save space */
+ if (fd != -1)
+ unlink(buf);
+ return fd;
}
void
@@ -92,7 +111,8 @@ mediaShutdownTape(Device *dev)
{
if (!tapeInitted)
return;
- if (!access(dev->private, X_OK)) {
+ msgDebug("Shutdown of tape device - %s will be cleaned\n", dev->private);
+ if (file_readable(dev->private)) {
msgNotify("Cleaning up results of tape extract..");
(void)vsystem("rm -rf %s", (char *)dev->private);
}
diff --git a/release/sysinstall/tcpip.c b/release/sysinstall/tcpip.c
index eaab392..29499c4 100644
--- a/release/sysinstall/tcpip.c
+++ b/release/sysinstall/tcpip.c
@@ -1,5 +1,5 @@
/*
- * $Id: tcpip.c,v 1.30.2.1 1995/07/21 10:02:59 rgrimes Exp $
+ * $Id: tcpip.c,v 1.31 1995/09/18 16:52:38 peter Exp $
*
* Copyright (c) 1995
* Gary J Palmer. All rights reserved.
@@ -52,15 +52,14 @@
#include "dir.h"
#include "dialog.priv.h"
#include "colors.h"
-#include "rc.h"
#include "sysinstall.h"
/* These are nasty, but they make the layout structure a lot easier ... */
-static char hostname[HOSTNAME_FIELD_LEN], domainname[HOSTNAME_FIELD_LEN],
- gateway[IPADDR_FIELD_LEN], nameserver[IPADDR_FIELD_LEN];
-static int okbutton, cancelbutton;
-static char ipaddr[IPADDR_FIELD_LEN], netmask[IPADDR_FIELD_LEN], extras[EXTRAS_FIELD_LEN];
+static char hostname[HOSTNAME_FIELD_LEN], domainname[HOSTNAME_FIELD_LEN],
+ gateway[IPADDR_FIELD_LEN], nameserver[IPADDR_FIELD_LEN];
+static int okbutton, cancelbutton;
+static char ipaddr[IPADDR_FIELD_LEN], netmask[IPADDR_FIELD_LEN], extras[EXTRAS_FIELD_LEN];
/* What the screen size is meant to be */
#define TCP_DIALOG_Y 0
@@ -104,25 +103,25 @@ static Layout layout[] = {
"IP Address:",
"The IP address to be used for this interface",
ipaddr, STRINGOBJ, NULL },
-#define LAYOUT_IPADDR 5
+#define LAYOUT_IPADDR 4
{ 10, 35, 18, IPADDR_FIELD_LEN - 1,
"Netmask:",
- "The netmask for this interfaace, e.g. 0xffffff00 for a class C network",
+ "The netmask for this interface, e.g. 0xffffff00 for a class C network",
netmask, STRINGOBJ, NULL },
-#define LAYOUT_NETMASK 6
+#define LAYOUT_NETMASK 5
{ 14, 10, 37, HOSTNAME_FIELD_LEN - 1,
"Extra options to ifconfig:",
"Any interface-specific options to ifconfig you would like to use",
extras, STRINGOBJ, NULL },
-#define LAYOUT_EXTRAS 7
+#define LAYOUT_EXTRAS 6
{ 19, 15, 0, 0,
"OK", "Select this if you are happy with these settings",
&okbutton, BUTTONOBJ, NULL },
-#define LAYOUT_OKBUTTON 8
+#define LAYOUT_OKBUTTON 7
{ 19, 35, 0, 0,
"CANCEL", "Select this if you wish to cancel this screen",
&cancelbutton, BUTTONOBJ, NULL },
-#define LAYOUT_CANCELBUTTON 9
+#define LAYOUT_CANCELBUTTON 8
{ NULL },
};
@@ -171,6 +170,61 @@ verifySettings(void)
return 0;
}
+int
+tcpInstallDevice(char *str)
+{
+ Device **devs;
+ Device *dp = NULL;
+
+ /* Clip garbage off the ends */
+ string_prune(str);
+ str = string_skipwhite(str);
+ if (!*str)
+ return RET_FAIL;
+ devs = deviceFind(str, DEVICE_TYPE_NETWORK);
+ if (devs && (dp = devs[0])) {
+ char temp[512], ifn[255];
+
+ if (!dp->private) {
+ DevInfo *di;
+ char *ipaddr, *netmask, *extras;
+
+ di = dp->private = (DevInfo *)malloc(sizeof(DevInfo));
+
+ if ((ipaddr = variable_get(string_concat3(VAR_IPADDR, "_", dp->name))) == NULL)
+ ipaddr = variable_get(VAR_IPADDR);
+
+ if ((netmask = variable_get(string_concat3(VAR_NETMASK, "_", dp->name))) == NULL)
+ netmask = variable_get(VAR_NETMASK);
+
+ if ((extras = variable_get(string_concat3(VAR_EXTRAS, "_", dp->name))) == NULL)
+ extras = variable_get(VAR_EXTRAS);
+
+ string_copy(di->ipaddr, ipaddr);
+ string_copy(di->netmask, netmask);
+ string_copy(di->extras, extras);
+
+ if (ipaddr) {
+ char *ifaces;
+
+ sprintf(temp, "inet %s %s netmask %s", ipaddr, extras ? extras : "", netmask);
+ sprintf(ifn, "%s%s", VAR_IFCONFIG, dp->name);
+ variable_set2(ifn, temp);
+ ifaces = variable_get(VAR_INTERFACES);
+ if (!ifaces)
+ variable_set2(VAR_INTERFACES, ifaces = "lo0");
+ /* Only add it if it's not there already */
+ if (!strstr(ifaces, dp->name)) {
+ sprintf(ifn, "%s %s", dp->name, ifaces);
+ variable_set2(VAR_INTERFACES, ifn);
+ }
+ }
+ }
+ mediaDevice = dp;
+ }
+ return dp ? RET_SUCCESS : RET_FAIL;
+}
+
/* This is it - how to get TCP setup values */
int
tcpOpenDialog(Device *devp)
@@ -211,26 +265,45 @@ tcpOpenDialog(Device *devp)
strcpy(netmask, di->netmask);
strcpy(extras, di->extras);
}
- else
- ipaddr[0] = netmask[0] = extras[0] = '\0';
-
+ else { /* See if there are any defaults */
+ char *cp;
+
+ if (!ipaddr[0]) {
+ if ((cp = variable_get(VAR_IPADDR)) != NULL)
+ strcpy(ipaddr, cp);
+ else if ((cp = variable_get(string_concat3(devp->name, "_", VAR_IPADDR))) != NULL)
+ strcpy(ipaddr, cp);
+ }
+ if (!netmask[0]) {
+ if ((cp = variable_get(VAR_NETMASK)) != NULL)
+ strcpy(netmask, cp);
+ else if ((cp = variable_get(string_concat3(devp->name, "_", VAR_NETMASK))) != NULL)
+ strcpy(netmask, cp);
+ }
+ if (!extras[0]) {
+ if ((cp = variable_get(VAR_EXTRAS)) != NULL)
+ strcpy(extras, cp);
+ else if ((cp = variable_get(string_concat3(devp->name, "_", VAR_EXTRAS))) != NULL)
+ strcpy(extras, cp);
+ }
+ }
/* Look up values already recorded with the system, or blank the string variables ready to accept some new data */
- tmp = getenv(VAR_HOSTNAME);
+ tmp = variable_get(VAR_HOSTNAME);
if (tmp)
strcpy(hostname, tmp);
else
bzero(hostname, sizeof(hostname));
- tmp = getenv(VAR_DOMAINNAME);
+ tmp = variable_get(VAR_DOMAINNAME);
if (tmp)
strcpy(domainname, tmp);
else
bzero(domainname, sizeof(domainname));
- tmp = getenv(VAR_GATEWAY);
+ tmp = variable_get(VAR_GATEWAY);
if (tmp)
strcpy(gateway, tmp);
else
bzero(gateway, sizeof(gateway));
- tmp = getenv(VAR_NAMESERVER);
+ tmp = variable_get(VAR_NAMESERVER);
if (tmp)
strcpy(nameserver, tmp);
else
@@ -268,8 +341,7 @@ tcpOpenDialog(Device *devp)
/* Find the first object in the list */
first = obj;
- while (first->prev)
- first = first->prev;
+ for (first = obj; first->prev; first = first->prev);
/* Some more initialisation before we go into the main input loop */
n = 0;
@@ -290,15 +362,30 @@ tcpOpenDialog(Device *devp)
/* Ask for libdialog to do its stuff */
ret = PollObj(&obj);
- /* We are in the Hostname field - calculate the domainname */
- if (n == 0) {
+ if (n == LAYOUT_HOSTNAME) {
+ /* We are in the Hostname field - calculate the domainname */
if ((tmp = index(hostname, '.')) != NULL) {
strncpy(domainname, tmp + 1, strlen(tmp + 1));
domainname[strlen(tmp+1)] = '\0';
- RefreshStringObj(layout[1].obj);
+ RefreshStringObj(layout[LAYOUT_DOMAINNAME].obj);
+ }
+ }
+ else if (n == LAYOUT_IPADDR) {
+ /* Insert a default value for the netmask, 0xffffff00 is
+ the most appropriate one (entire class C, or subnetted
+ class A/B network). */
+ if(netmask[0] == '\0') {
+ strcpy(netmask, "255.255.255.0");
+ RefreshStringObj(layout[LAYOUT_NETMASK].obj);
+ }
+ }
+ else if (n == LAYOUT_DOMAINNAME) {
+ if (!index(hostname, '.') && domainname[0]) {
+ strcat(hostname, ".");
+ strcat(hostname, domainname);
+ RefreshStringObj(layout[LAYOUT_HOSTNAME].obj);
}
}
-
/* Handle special case stuff that libdialog misses. Sigh */
switch (ret) {
/* Bail out */
@@ -391,7 +478,7 @@ tcpOpenDialog(Device *devp)
if (!cancel) {
DevInfo *di;
- char temp[512], ifn[64];
+ char temp[512], ifn[255];
char *ifaces;
variable_set2(VAR_HOSTNAME, hostname);
@@ -412,7 +499,7 @@ tcpOpenDialog(Device *devp)
sprintf(temp, "inet %s %s netmask %s", ipaddr, extras, netmask);
sprintf(ifn, "%s%s", VAR_IFCONFIG, devp->name);
variable_set2(ifn, temp);
- ifaces = getenv(VAR_INTERFACES);
+ ifaces = variable_get(VAR_INTERFACES);
if (!ifaces)
variable_set2(VAR_INTERFACES, ifaces = "lo0");
/* Only add it if it's not there already */
@@ -422,9 +509,9 @@ tcpOpenDialog(Device *devp)
}
if (ipaddr[0])
variable_set2(VAR_IPADDR, ipaddr);
- return 0;
+ return RET_SUCCESS;
}
- return 1;
+ return RET_FAIL;
}
static int
@@ -436,13 +523,13 @@ netHook(char *str)
string_prune(str);
str = string_skipwhite(str);
if (!*str)
- return 0;
+ return RET_FAIL;
devs = deviceFind(str, DEVICE_TYPE_NETWORK);
if (devs) {
tcpOpenDialog(devs[0]);
mediaDevice = devs[0];
}
- return devs ? 1 : 0;
+ return devs ? RET_DONE : RET_FAIL;
}
/* Get a network device */
@@ -460,13 +547,14 @@ tcpDeviceSelect(void)
msgConfirm("No network devices available!");
status = FALSE;
}
- else if (cnt == 1) {
- tcpOpenDialog(devs[0]);
+ else if (cnt == 1 || !RunningAsInit) {
+ /* If we're running in user mode, assume network already up */
+ if (RunningAsInit)
+ tcpOpenDialog(devs[0]);
mediaDevice = devs[0];
status = TRUE;
}
else {
-
menu = deviceCreateMenu(&MenuNetworkDevice, DEVICE_TYPE_NETWORK, netHook);
if (!menu)
msgFatal("Unable to create network device menu! Argh!");
@@ -482,5 +570,5 @@ tcpMenuSelect(char *str)
{
(void)tcpDeviceSelect();
configResolv();
- return 0;
+ return RET_SUCCESS;
}
diff --git a/release/sysinstall/ufs.c b/release/sysinstall/ufs.c
index 5f68366..0176bac 100644
--- a/release/sysinstall/ufs.c
+++ b/release/sysinstall/ufs.c
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
- * $Id: ufs.c,v 1.4.2.2 1995/06/05 12:04:09 jkh Exp $
+ * $Id: ufs.c,v 1.5.2.4 1995/10/22 01:33:02 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -50,13 +50,20 @@
/* No init or shutdown routines necessary - all done in mediaSetUFS() */
int
-mediaGetUFS(Device *dev, char *file, Attribs *dist_attrs)
+mediaGetUFS(Device *dev, char *file, Boolean tentative)
{
char buf[PATH_MAX];
+ msgDebug("Request for %s from UFS\n", file);
snprintf(buf, PATH_MAX, "%s/%s", dev->private, file);
- if (!access(buf, R_OK))
+ if (file_readable(buf))
return open(buf, O_RDONLY);
snprintf(buf, PATH_MAX, "%s/dists/%s", dev->private, file);
+ if (file_readable(buf))
+ return open(buf, O_RDONLY);
+ snprintf(buf, PATH_MAX, "%s/%s/%s", dev->private, variable_get(VAR_RELNAME), file);
+ if (file_readable(buf))
+ return open(buf, O_RDONLY);
+ snprintf(buf, PATH_MAX, "%s/%s/dists/%s", dev->private, variable_get(VAR_RELNAME), file);
return open(buf, O_RDONLY);
}
diff --git a/release/sysinstall/variable.c b/release/sysinstall/variable.c
index 9cf6742..5cbaa84 100644
--- a/release/sysinstall/variable.c
+++ b/release/sysinstall/variable.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: variable.c,v 1.5.2.2 1995/06/01 21:04:03 jkh Exp $
+ * $Id: variable.c,v 1.6.2.7 1995/10/26 08:56:18 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -50,21 +50,23 @@ make_variable(char *var, char *value)
{
Variable *newvar;
- /* First search to see if it's already there */
+ /* Put it in the environment in any case */
+ setenv(var, value, 1);
+
+ /* Now search to see if it's already in the list */
for (newvar = VarHead; newvar; newvar = newvar->next) {
if (!strcmp(newvar->name, var)) {
strncpy(newvar->value, value, VAR_VALUE_MAX);
- setenv(var, value, 1);
return;
}
}
- setenv(var, value, 1);
+
+ /* No? Create a new one */
newvar = (Variable *)safe_malloc(sizeof(Variable));
strncpy(newvar->name, var, VAR_NAME_MAX);
strncpy(newvar->value, value, VAR_VALUE_MAX);
newvar->next = VarHead;
VarHead = newvar;
- setenv(newvar->name, newvar->value, 1);
if (isDebug())
msgDebug("Setting variable %s to %s\n", newvar->name, newvar->value);
}
@@ -74,6 +76,10 @@ variable_set(char *var)
{
char tmp[VAR_NAME_MAX + VAR_VALUE_MAX], *cp;
+ if (!var)
+ msgFatal("NULL variable name & value passed.");
+ else if (!*var)
+ msgDebug("Warning: Zero length name & value passed to variable_set()\n");
strncpy(tmp, var, VAR_NAME_MAX + VAR_VALUE_MAX);
if ((cp = index(tmp, '=')) == NULL)
msgFatal("Invalid variable format: %s", var);
@@ -86,5 +92,55 @@ variable_set2(char *var, char *value)
{
if (!var || !value)
msgFatal("Null name or value passed to set_variable2!");
+ else if (!*var || !*value)
+ msgDebug("Warning: Zero length name or value passed to variable_set2()\n");
make_variable(var, value);
}
+
+char *
+variable_get(char *var)
+{
+ return getenv(var);
+}
+
+void
+variable_unset(char *var)
+{
+ Variable *vp;
+
+ unsetenv(var);
+
+ /* Now search to see if it's in our list, if we have one.. */
+ if (!VarHead)
+ return;
+ else if (!VarHead->next && !strcmp(VarHead->name, var)) {
+ free(VarHead);
+ VarHead = NULL;
+ }
+ else {
+ for (vp = VarHead; vp; vp = vp->next) {
+ if (!strcmp(vp->name, var)) {
+ Variable *save = vp->next;
+
+ *vp = *save;
+ safe_free(save);
+ break;
+ }
+ }
+ }
+}
+
+/* Prompt user for the name of a variable */
+char *
+variable_get_value(char *var, char *prompt)
+{
+ char *cp;
+
+ dialog_clear();
+ if ((cp = msgGetInput(variable_get(var), prompt)) != NULL)
+ variable_set2(var, cp);
+ else
+ cp = NULL;
+ dialog_clear();
+ return cp;
+}
diff --git a/release/sysinstall/wizard.c b/release/sysinstall/wizard.c
index be6f9ee..66e2233 100644
--- a/release/sysinstall/wizard.c
+++ b/release/sysinstall/wizard.c
@@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
- * $Id: wizard.c,v 1.5.2.1 1995/06/05 02:25:27 jkh Exp $
+ * $Id: wizard.c,v 1.6.2.1 1995/09/20 10:43:13 jkh Exp $
*
*/
@@ -155,7 +155,11 @@ slice_wizard(Disk *d)
continue;
}
if (!strcasecmp(*cmds,"allfreebsd")) {
- All_FreeBSD(d);
+ All_FreeBSD(d, 0);
+ continue;
+ }
+ if (!strcasecmp(*cmds,"dedicate")) {
+ All_FreeBSD(d, 1);
continue;
}
if (!strcasecmp(*cmds,"bios") && ncmd == 4) {
@@ -213,6 +217,7 @@ slice_wizard(Disk *d)
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");
printf("create offset size enum subtype flags\n");
OpenPOWER on IntegriCloud