diff options
author | peter <peter@FreeBSD.org> | 1995-12-30 19:02:48 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1995-12-30 19:02:48 +0000 |
commit | ab124e78b0271ddb904b761b31e5c9a0cf24e070 (patch) | |
tree | 0cf1447720c45721ed3d214a4eaaa6834bda155d /release/scripts | |
parent | 15748830d0fcd29294a1969a1012655e74908c1e (diff) | |
download | FreeBSD-src-ab124e78b0271ddb904b761b31e5c9a0cf24e070.zip FreeBSD-src-ab124e78b0271ddb904b761b31e5c9a0cf24e070.tar.gz |
recording cvs-1.6 file death
Diffstat (limited to 'release/scripts')
-rwxr-xr-x | release/scripts/adduser.sh | 183 | ||||
-rwxr-xr-x | release/scripts/bininst.sh | 86 | ||||
-rw-r--r-- | release/scripts/extract_DES.sh | 19 | ||||
-rw-r--r-- | release/scripts/extract_bin.sh | 27 | ||||
-rw-r--r-- | release/scripts/extract_compat1x.sh | 9 | ||||
-rw-r--r-- | release/scripts/extract_des.sh | 19 | ||||
-rw-r--r-- | release/scripts/extract_dict.sh | 9 | ||||
-rw-r--r-- | release/scripts/extract_games.sh | 9 | ||||
-rw-r--r-- | release/scripts/extract_info.sh | 9 | ||||
-rw-r--r-- | release/scripts/extract_manpages.sh | 9 | ||||
-rw-r--r-- | release/scripts/extract_proflibs.sh | 9 | ||||
-rw-r--r-- | release/scripts/extract_secure.sh | 19 | ||||
-rw-r--r-- | release/scripts/extract_src.sh | 17 | ||||
-rwxr-xr-x | release/scripts/extract_xf86311.sh | 136 | ||||
-rw-r--r-- | release/scripts/instdist.sh | 565 | ||||
-rw-r--r-- | release/scripts/miscfuncs.sh | 141 | ||||
-rw-r--r-- | release/scripts/mkchecksums.sh | 24 | ||||
-rw-r--r-- | release/scripts/mkxf86extract.sh | 61 | ||||
-rw-r--r-- | release/scripts/netinst.sh | 210 | ||||
-rw-r--r-- | release/scripts/setup.sh | 66 |
20 files changed, 0 insertions, 1627 deletions
diff --git a/release/scripts/adduser.sh b/release/scripts/adduser.sh deleted file mode 100755 index 3e7d92c..0000000 --- a/release/scripts/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/scripts/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/scripts/bininst.sh b/release/scripts/bininst.sh deleted file mode 100755 index daf6b72..0000000 --- a/release/scripts/bininst.sh +++ /dev/null @@ -1,86 +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.sh,v 1.8 1995/02/02 23:39:44 jkh Exp $ - -# Grab the miscellaneous functions. -. /stand/scripts/miscfuncs.sh - -# Grab the installation routines -. /stand/scripts/instdist.sh - -# Grab the network setup routines -. /stand/scripts/netinst.sh - -# Grab the setup script -. /stand/scripts/setup.sh - -# Deal with trigger-happy users. -trap interrupt 1 2 15 - -# set initial defaults -set_defaults() -{ - network_set_defaults - media_set_defaults - mkdir -p ${TMP} - cp /stand/etc/* /etc -} - -# Print welcome banner. -welcome() -{ -} - -goodbye() -{ - 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 with it if you're not careful! - -Further information may be obtained by sending mail to -questions@freebsd.org (though please read the docs first, -we get LOTS of questions! :-) or browsing through our -WEB site: http://www.freebsd.org/ - -If you encounter a bug and can send/receive Internet email, please -use the \`send-pr\' command to submit a report - this will ensure -that the bug is noted and tracked to some sort of resolution. - -Enjoy FreeBSD 2.0! - - The FreeBSD Project Team" -1 -1 -} - -welcome -set_defaults - -if media_select_distribution; then - if media_chose_method; then - for xx in ${MEDIA_DISTRIBUTIONS}; do - MEDIA_DISTRIBUTION=`eval echo \`echo $xx\`` - media_install_set - done - fi - final_configuration - goodbye -fi - -echo; echo "Spawning shell. Exit shell to continue with new system." -echo "Progress <installation completed>" > /dev/ttyv1 -/stand/sh -exit 20 diff --git a/release/scripts/extract_DES.sh b/release/scripts/extract_DES.sh deleted file mode 100644 index a41c472..0000000 --- a/release/scripts/extract_DES.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -# $Id: extract_secure.sh,v 1.7 1995/04/20 06:49:09 phk Exp $ -set -e -PATH=/stand:$PATH -DDIR=/ - -DIST=DES -# You can't write over the running init -if [ -f /sbin/init ]; then mv /sbin/init /sbin/init.insecure; fi - -cat ${DIST}.?? | gzip -c -d | ( cd $DDIR; cpio -H tar -imdu ) - -DDIR=/usr/src -for DIST in sebones sDES ; do - if [ -f ${DIST}.aa ]; then - echo "Extracting ${DIST} sources" - cat ${DIST}.?? | gzip -c -d | ( cd $DDIR; cpio -H tar -imdu ) - fi -done diff --git a/release/scripts/extract_bin.sh b/release/scripts/extract_bin.sh deleted file mode 100644 index d6e7664..0000000 --- a/release/scripts/extract_bin.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -# $Id: extract_bin.sh,v 1.5 1995/04/09 03:44:03 jkh Exp $ -set -e -PATH=/stand:$PATH -DDIR=/ - - -# Temporary kludge for pathological bindist. -if [ -f $DDIR/etc/sysconfig ]; then - mv $DDIR/etc/sysconfig $DDIR/etc/sysconfig.save -fi -cat bin.?? | gzip -c -d | ( cd $DDIR; cpio -H tar -imdu ) -if [ -f $DDIR/etc/sysconfig.save ]; then - mv $DDIR/etc/sysconfig.save $DDIR/etc/sysconfig -fi - -# Save some space in the tarballs by not sending these bloated files... -cd /usr/share/misc -for i in termcap vgrindefs -do - echo "running cap_mkdb $i" - /usr/bin/cap_mkdb $i - /usr/sbin/chown bin.bin $i.db - /bin/chmod 444 $i.db -done - -chmod 1777 /tmp diff --git a/release/scripts/extract_compat1x.sh b/release/scripts/extract_compat1x.sh deleted file mode 100644 index a6af74d..0000000 --- a/release/scripts/extract_compat1x.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -# $Id: extract_compat1x.sh,v 1.1 1995/01/14 07:41:40 jkh Exp $ -set -e -PATH=/stand:$PATH -DDIR=/ - -DIST=compat1x_tgz -echo "Extracting ${DIST}" -cat ${DIST}.?? | gzip -c -d | ( cd $DDIR; cpio -H tar -imdu ) diff --git a/release/scripts/extract_des.sh b/release/scripts/extract_des.sh deleted file mode 100644 index 3eed9d7..0000000 --- a/release/scripts/extract_des.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -# $Id: extract_des.sh,v 1.1 1995/05/09 22:58:42 jkh Exp $ -set -e -PATH=/stand:$PATH -DDIR=/ - -DIST=des -# You can't write over the running init -if [ -f /sbin/init ]; then mv /sbin/init /sbin/init.insecure; fi - -cat ${DIST}.?? | gzip -c -d | ( cd $DDIR; cpio -H tar -imdu ) - -DDIR=/usr/src -for DIST in sebones sdes ; do - if [ -f ${DIST}.aa ]; then - echo "Extracting ${DIST} sources" - cat ${DIST}.?? | gzip -c -d | ( cd $DDIR; cpio -H tar -imdu ) - fi -done diff --git a/release/scripts/extract_dict.sh b/release/scripts/extract_dict.sh deleted file mode 100644 index 74f9259..0000000 --- a/release/scripts/extract_dict.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -# $Id: extract_dict.sh,v 1.1 1995/01/14 07:41:41 jkh Exp $ -set -e -PATH=/stand:$PATH -DDIR=/ - -DIST=dict -echo "Extracting ${DIST}" -cat ${DIST}.?? | gzip -c -d | ( cd $DDIR; cpio -H tar -imdu ) diff --git a/release/scripts/extract_games.sh b/release/scripts/extract_games.sh deleted file mode 100644 index abcc8cf..0000000 --- a/release/scripts/extract_games.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -# $Id: extract_games.sh,v 1.2 1995/01/28 09:07:43 jkh Exp $ -set -e -PATH=/stand:$PATH -DDIR=/ - -DIST=games -echo "Extracting ${DIST} - ignore any errors from cpio" -cat ${DIST}.?? | gzip -c -d | ( cd $DDIR; cpio -H tar -imdu ) diff --git a/release/scripts/extract_info.sh b/release/scripts/extract_info.sh deleted file mode 100644 index f35ed05..0000000 --- a/release/scripts/extract_info.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -# $Id: extract_info.sh,v 1.1 1995/01/14 07:41:42 jkh Exp $ -set -e -PATH=/stand:$PATH -DDIR=/ - -DIST=info -echo "Extracting ${DIST}" -cat ${DIST}.?? | gzip -c -d | ( cd $DDIR; cpio -H tar -imdu ) diff --git a/release/scripts/extract_manpages.sh b/release/scripts/extract_manpages.sh deleted file mode 100644 index 46c046e..0000000 --- a/release/scripts/extract_manpages.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -# $Id: extract_manpages.sh,v 1.1 1995/01/14 07:41:43 jkh Exp $ -set -e -PATH=/stand:$PATH -DDIR=/ - -DIST=manpages -echo "Extracting ${DIST}" -cat ${DIST}.?? | gzip -c -d | ( cd $DDIR; cpio -H tar -imdu ) diff --git a/release/scripts/extract_proflibs.sh b/release/scripts/extract_proflibs.sh deleted file mode 100644 index f9ebf39..0000000 --- a/release/scripts/extract_proflibs.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -# $Id: extract_proflibs.sh,v 1.2 1995/01/28 09:11:36 jkh Exp $ -set -e -PATH=/stand:$PATH -DDIR=/ - -DIST=proflibs -echo "Extracting ${DIST} - ignore any errors from cpio" -cat ${DIST}.?? | gzip -c -d | ( cd $DDIR; cpio -H tar -imdu ) diff --git a/release/scripts/extract_secure.sh b/release/scripts/extract_secure.sh deleted file mode 100644 index 7a1eaff..0000000 --- a/release/scripts/extract_secure.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -# $Id: extract_secure.sh,v 1.6 1995/04/07 01:20:26 phk Exp $ -set -e -PATH=/stand:$PATH -DDIR=/ - -DIST=secure -# You can't write over the running init -if [ -f /sbin/init ]; then mv /sbin/init /sbin/init.insecure; fi - -cat ${DIST}.?? | gzip -c -d | ( cd $DDIR; cpio -H tar -imdu ) - -DDIR=/usr/src -for DIST in sebones ssecure ; do - if [ -f ${DIST}.aa ]; then - echo "Extracting ${DIST} sources" - cat ${DIST}.?? | gzip -c -d | ( cd $DDIR; cpio -H tar -imdu ) - fi -done diff --git a/release/scripts/extract_src.sh b/release/scripts/extract_src.sh deleted file mode 100644 index 9e7f903..0000000 --- a/release/scripts/extract_src.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -# $Id: extract_src.sh,v 1.12 1995/03/28 08:01:47 phk Exp $ -PATH=/stand:$PATH -DDIR=/usr/src - -mkdir -p $DDIR - -for T in s*.aa ; do - DIST=`basename $T .aa` - if [ -f ${DIST}.aa ]; then - echo "Extracting ${DIST} sources" - cat ${DIST}.?? | - gzip -c -d | ( cd $DDIR; cpio -H tar -imdu ) - fi -done -rm -f /sys -ln -fs /usr/src/sys /sys diff --git a/release/scripts/extract_xf86311.sh b/release/scripts/extract_xf86311.sh deleted file mode 100755 index 982c145..0000000 --- a/release/scripts/extract_xf86311.sh +++ /dev/null @@ -1,136 +0,0 @@ -#!/stand/sh -# -# xf86311 - extract XFree86 3.1.1 onto a FreeBSD 2.1 system. -# -# Written: February 2nd, 1995 -# Copyright (C) 1995 by Jordan K. Hubbard -# -# Permission to copy or use this software for any purpose is granted -# under the terms and conditions stated by the XFree86 Project, Inc. -# copyright, which should also be in the file COPYRIGHT in this distribution. -# -# $Id: extract_xf86311.sh,v 1.8 1995/02/16 12:30:31 jkh Exp $ - -PATH=/usr/X11R6/bin:/usr/X386/bin:.:$PATH - -X11PREFIX=/usr/X11R6 -XRELEASE="XFree86 3.1.1" - -# 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 -} - -do_selected_install() -{ - for xx in ${SELECTIONS}; do - DIST=`eval echo \`echo $xx\`` - dialog --infobox "Installing ${XRELEASE} component: ${DIST}" -1 -1 - tar --unlink -zxpf ${DIST}.tgz -C /usr - done -} - -do_configure() -{ - if [ -f ${X11PREFIX}/bin/xf86config ]; then - dialog --clear - ${X11PREFIX}/bin/xf86config - dialog --clear - else - dialog --msgbox "You must first install the X311bin component" -1 -1 - fi -} - -do_select_menu() -{ -dialog --title "Please select components from ${XRELEASE}" --checklist \ -"Please check off each desired component of ${XRELEASE} for subsequent\n\ -unpacking on your system. Most people will typically need only one\n\ -server, and the most reasonable choices have already been set for you by\n\ -default. When everything looks good, select OK to continue.\n\n\ -Server notation: 4 bit = 16 color, 8 bit = 256 color,\n\ -16 bit = 64k colors, 24 bit = true color." \ --1 -1 8 \ -"X311bin" "client applications and shared libs" ON \ -"X311fnts" "the misc and 75 dpi fonts" ON \ -"X311lib" "data files needed at runtime" ON \ -"X311xicf" "xinit runtime configuration file" ON \ -"X311xdcf" "xdm runtime configuration file" ON \ -"X3118514" "IBM 8514 and true compatibles - 8 bit" OFF \ -"X311AGX" "AGX boards - 8 bit" OFF \ -"X311Ma64" "ATI Mach64 boards - 8/16 bit" OFF \ -"X311Ma32" "ATI Mach32 boards - 8/16 bit" OFF \ -"X311Ma8" "ATI Mach8 boards - 8bit" OFF \ -"X311Mono" "VGA, Super-VGA, Hercules, and others - mono" OFF \ -"X311P9K" "Weitek P9000 boards (Diamond Viper) - 8/16/24 bit" OFF \ -"X311S3" "S3 boards: #9GXE, ActixGE32, SPEA Mercury - 8/16/24 bit" OFF \ -"X311SVGA" "Super-VGA cards - 8 bit" ON \ -"X311VG16" "VGA and Super-VGA cards - 4 bit" ON \ -"X311W32" "ET4000/W32, /W32i and /W32p cards - 8 bit" OFF \ -"X311nest" "A nested server running as a client." OFF \ -"X311doc" "READMEs and ${XRELEASE} specific man pages" ON \ -"X311man" "man pages except ${XRELEASE} specific ones in docs" OFF \ -"X311f100" "100dpi fonts" OFF \ -"X311fscl" "Speedo and Type1 fonts" OFF \ -"X311fnon" "Japanese, Chinese and other non-english fonts" OFF \ -"X311fsrv" "the font server and its man page" OFF \ -"X311prog" "config, lib*.a and *.h files needed only for compiling" OFF \ -"X311link" "X server reconfiguration kit" OFF \ -"X311pex" "PEX fonts and shared libs needed by PEX apps" OFF \ -"X311lbx" "low bandwidth X proxy server and libraries." OFF \ - 2> ${TMP}/X-selections.$$ - RETVAL=$? - SELECTIONS=`cat ${TMP}/X-selections.$$` - return ${RETVAL} -} - -INSTALLING=yes -while [ "${INSTALLING}" = "yes" ]; do -dialog --title "${XRELEASE} Installation" --menu \ -"Welcome to the ${XRELEASE} installation menu for FreeBSD 2.x\n\n \ -Please chose one of the following options. It is also\n\ -recommended that choices be followed in order on this menu," \ --1 -1 7 \ - "COPYRIGHT" "Read the XFree86 Project, Inc.'s copyright notice" \ - "README" "General README file on ${XRELEASE} - recommended" \ - "FreeBSD" "General information specific to FreeBSD" \ - "Install" "Install selected components of ${XRELEASE}" \ - "Configure" "Configure XFree86 server for your card/monitor" \ - "startx" "Try to run startx and bring things up all the way" \ - "Exit" "Exit the installation." \ - 2> ${TMP}/menu.tmp.$$ - RETVAL=$? - ANSWER=`cat ${TMP}/menu.tmp.$$` - rm -f ${TMP}/menu.tmp.$$ - if ! handle_rval ${RETVAL}; then continue; fi - case ${ANSWER} in - COPYRIGHT) dialog --title "COPYRIGHT NOTICE" --textbox COPYRIGHT 20 78 ;; - README) dialog --title "${XRELEASE} README" --textbox README 20 78 ;; - FreeBSD) dialog --title "XFree86 and FreeBSD" --textbox README.FreeBSD 20 78 ;; - Install) if do_select_menu; then do_selected_install; fi ;; - Configure) do_configure ;; - startx) - if [ -x ${X11PREFIX}/bin/startx ]; then - dialog --clear - ${X11PREFIX}/bin/startx - echo -n "[press return to continue] " - read junk - else - dialog --title "Error" --msgbox "You must first install ${XRELEASE}." -1 -1 - fi - ;; - Exit) INSTALLING=no ;; - esac -done diff --git a/release/scripts/instdist.sh b/release/scripts/instdist.sh deleted file mode 100644 index 969a690..0000000 --- a/release/scripts/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.18 1995/04/09 09:01:56 jkh Exp $ - -if [ "${_INSTINST_SH_LOADED_}" = "yes" ]; then - return 0 -else - _INSTINST_SH_LOADED_=yes -fi - -# Grab the miscellaneous functions. -. /stand/scripts/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 src distribution 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 [ -d ${TMPDIR}/${MEDIA_DISTRIBUTION} ]; then - _TARGET=${TMPDIR}/${MEDIA_DISTRIBUTION} - else - _TARGET=${TMPDIR}/ - fi - if [ "X${NO_ASK_REMOVE}" != "X" ]; then - rm -rf ${_TARGET} > /dev/null 2>&1 - return - fi - if dialog --title "Delete contents?" --yesno \ - "Do you wish to delete ${_TARGET}?" -1 -1; then - rm -rf ${_TARGET} > /dev/null 2>&1 - 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\n\ -Please use arrow keys to scroll through all items." \ --1 -1 7 \ - "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" \ - "Sweden" "ftp.luth.se" \ - "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}" ;; - Sweden) FTP_PATH="ftp://ftp.luth.se/pub/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 - message "Verifying checksums for ${MEDIA_DISTRIBUTION} 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" --infobox "${MEDIA_DISTRIBUTION} is done" -1 -1 - else - error "No installation script found!" - fi - else - error "Checksum error(s) found. Please check media!" - fi - else - error "Improper ${MEDIA_DISTRIBUTION} distribution. No checksum script!" - 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 - media_rm_tmpdir - 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 - 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 ${MEDIA_DISTRIBUTION} distribution over ftp.\nUse ALT-F2 to see output, ALT-F1 to return." - mkdir -p ${MEDIA_DISTRIBUTION} - cd ${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 - echo "Using manual ftp. Please download the ${MEDIA_DISTRIBUTION} distribution now." - echo "To avoid this kind of manual labor in the future, try to fetch by URL!" - SHELL=/stand/sh 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 "${DISTNAME}: Choose distributions" \ - --checklist \ -"FreeBSD is separated into a number of distributions for ease of\n\ -installation. Please select the distributions you wish to load, any\n\ -distributions already marked being MANDATORY - please do not\n\ -unselect them! Please also note that DES (encryption) code is NOT\n\ -FOR EXPORT from the U.S. Please don't endanger U.S. ftp sites by\n\ -getting it illegally, thanks! When finished, select <OK>." \ --1 -1 10 \ - "bin" "Binary base files (mandatory - ${BINSIZE})" ON \ - "games" "Games and other frivolities (${GAMESIZE})" OFF \ - "info" "GNU info files (${INFOSIZE})" OFF \ - "manpages" "Manual pages (${MANSIZE})" OFF \ - "proflibs" "Profiled libraries (${PROFSIZE})" OFF \ - "dict" "Spelling checker dictionary files (${DICTSIZE})" OFF \ - "src" "Sources for all but DES (${SRCSIZE})" OFF \ - "secure" "DES code (and sources) (${SECRSIZE})" OFF \ - "compat1x" "FreeBSD 1.x binary compatability (${COMPATSIZE})" OFF \ - "XFree86-3.1.1" "The XFree86 3.1.1 distribution (${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 - 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_method() -{ - 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 tape" \ - "CDROM" "Load distribution from CDROM" \ - "DOS" "Load from DOS (floppies or hard disk partition)" \ - "FTP" "Load distribution over FTP" \ - "UFS" "Load distribution from an existing UFS partition" \ - "NFS" "Load 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 4 \ - "SCSI" "SCSI CDROM drive attached to supported SCSI controller" \ - "Sony" "Sony CDU33 or compatible CDROM drive" \ - "SB" "Sound Blaster CDROM (Matsushita/Panasonic)" \ - "Mitsumi" "Mitsumi CDROM (non-IDE) 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 - ;; - - Sony) - MEDIA_DEVICE=/dev/scd0a - ;; - - SB) - MEDIA_DEVICE=/dev/matcd0a - ;; - - 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 \`-P' 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, \`-r 1024 -w 1024' may also prove helpful. -Options, if any, should be separated by spaces."; 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/scripts/miscfuncs.sh b/release/scripts/miscfuncs.sh deleted file mode 100644 index 4db3220..0000000 --- a/release/scripts/miscfuncs.sh +++ /dev/null @@ -1,141 +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.7 1995/02/10 01:12:38 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 - -# Edited by src/release/Makefile -DISTNAME="FOOBAR" - -# 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="52MB" -GAMESIZE="12MB" -MANSIZE="8MB" -INFOSIZE="4MB" -PROFSIZE="4MB" -DICTSIZE="6MB" -SRCSIZE="112MB" -SECRSIZE="2MB" -COMPATSIZE="5MB" -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/scripts/mkchecksums.sh b/release/scripts/mkchecksums.sh deleted file mode 100644 index 92ba52c..0000000 --- a/release/scripts/mkchecksums.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# -# mkchecksums.sh - generate interactive checksum-checking script. -# Author: 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). -# -# $Id: mkchecksums.sh,v 1.1 1995/01/14 07:41:50 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 [ -f %s ]; then if [ \"\`cksum %s%s%s\`\" != \"%s %s %s\" ]; then dialog --title \"Checksum Error\" --msgbox \"Checksum error detected on %s!\" -1 -1; rval=1; fi; fi\n", $3, "\047", $3, "\047", $1, $2, $3, $3);} END {print "exit $rval"}' < CKSUMS > do_cksum.sh -chmod +x do_cksum.sh diff --git a/release/scripts/mkxf86extract.sh b/release/scripts/mkxf86extract.sh deleted file mode 100644 index af3550f..0000000 --- a/release/scripts/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/scripts/netinst.sh b/release/scripts/netinst.sh deleted file mode 100644 index 2a6b445..0000000 --- a/release/scripts/netinst.sh +++ /dev/null @@ -1,210 +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.8 1995/04/08 09:43:54 phk Exp $ - -if [ "${_NETINST_SH_LOADED_}" = "yes" ]; then - return 0 -else - _NETINST_SH_LOADED_=yes -fi - -# Grab the miscellaneous functions. -. /stand/scripts/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 - sed -e "s/hostname=.\*\$/hostname=${HOSTNAME}/" < /etc/sysconfig \ - > /etc/sysconfig.new && mv /etc/sysconfig.new /etc/sysconfig - ${HOSTNAME_CMD} ${HOSTNAME} - - DEFAULT_VALUE=`echo ${HOSTNAME} | sed -e 's/[^.]*\.//'` - 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 11 \ - "ed0" "WD80x3, SMC, Novell NE[21]000 or 3C503 generic NIC" \ - "ed1" "Same as above, but at a different address" \ - "eg0" "3Com 3c505 (Etherlink/+)" \ - "ep0" "3COM 3C509" \ - "de0" "DEC PCI ethernet adapter (or compatible)" \ - "ie0" "AT&T StarLan and EN100 family" \ - "is0" "Isolan 4141-0 or Isolink 4110" \ - "ix0" "Intel EtherExpress" \ - "le0" "DEC Etherworks ethernet adapter" \ - "lnc0" "Ether 32V board (VL ethernet card)" \ - "ze0" "PCMCIA IBM or National card" \ - "zp0" "3Com 3c589 PCMCIA card" \ - 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 - 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 "Any extra flags to ${IFCONFIG_CMD}, put them here"; 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/scripts/setup.sh b/release/scripts/setup.sh deleted file mode 100644 index 81fe02a..0000000 --- a/release/scripts/setup.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/stand/sh -# -# 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: setup.sh,v 1.5 1995/02/03 00:42:27 jkh Exp $ - -# Grab the miscellaneous functions. -. /stand/scripts/miscfuncs.sh - -final_configuration() -{ - DONE="no" - while [ "${DONE}" = "no" ]; do - dialog --title "Configuration Menu" --menu \ -"Configure your system for basic single user, network or\n\ -development workstation usage. Please select one of the\n\ -following options. When you are finished setting up your\n\ -system, select \"done\". To invoke this configuration tool\n\ -again, type \`/stand/scripts/setup.sh\'." -1 -1 5 \ -"tzsetup" "Configure your system's time zone" \ -"network" "Configure basic networking parameters" \ -"user" "Add a user name for yourself to the system" \ -"guest" "Add a default user \"guest\"" \ -"packages" "Install additional optional software on your system." \ -"ports" "Enable use of the ports collection from CD or fileserver." \ -"done" "Exit from setup." 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) - INTERFACE="" - network_setup - ;; - - user) - sh /stand/scripts/adduser.sh -i - ;; - - guest) - sh /stand/scripts/adduser.sh - ;; - - done) - DONE="yes" - ;; - - *) - not_supported - esac - done -} |