dot.profile revision 1.2
11.2Sperry# $NetBSD: dot.profile,v 1.2 1998/01/09 21:51:48 perry Exp $ 21.1Sscw# 31.1Sscw# Copyright (c) 1995 Jason R. Thorpe 41.1Sscw# Copyright (c) 1994 Christopher G. Demetriou 51.1Sscw# All rights reserved. 61.1Sscw# 71.1Sscw# Redistribution and use in source and binary forms, with or without 81.1Sscw# modification, are permitted provided that the following conditions 91.1Sscw# are met: 101.1Sscw# 1. Redistributions of source code must retain the above copyright 111.1Sscw# notice, this list of conditions and the following disclaimer. 121.1Sscw# 2. Redistributions in binary form must reproduce the above copyright 131.1Sscw# notice, this list of conditions and the following disclaimer in the 141.1Sscw# documentation and/or other materials provided with the distribution. 151.1Sscw# 3. All advertising materials mentioning features or use of this software 161.1Sscw# must display the following acknowledgement: 171.1Sscw# This product includes software developed by Christopher G. Demetriou. 181.1Sscw# 4. The name of the author may not be used to endorse or promote products 191.1Sscw# derived from this software without specific prior written permission 201.1Sscw# 211.1Sscw# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 221.1Sscw# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 231.1Sscw# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 241.1Sscw# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 251.1Sscw# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 261.1Sscw# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 271.1Sscw# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 281.1Sscw# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 291.1Sscw# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 301.1Sscw# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 311.1Sscw# 321.1Sscw 331.1SscwPATH=/sbin:/bin:/usr/bin:/usr/sbin:/ 341.1Sscwexport PATH 351.1SscwTERM=vt100 361.1Sscwexport TERM 371.2SperryHOME=/ 381.2Sperryexport HOME 391.1Sscw 401.1Sscwumask 022 411.1Sscw 421.1Sscwif [ "X${DONEPROFILE}" = "X" ]; then 431.1Sscw DONEPROFILE=YES 441.1Sscw 451.1Sscw # set up some sane defaults 461.1Sscw echo 'erase ^H, werase ^W, kill ^U, intr ^C' 471.1Sscw stty newcrt werase ^W intr ^C kill ^U erase ^H 9600 481.1Sscw 491.1Sscw # run update, so that installed software is written as it goes. 501.1Sscw update 511.1Sscw 521.1Sscw # get the terminal type 531.1Sscw _forceloop="" 541.1Sscw while [ "X${_forceloop}" = X"" ]; do 551.1Sscw eval `tset -s -m ":?$TERM"` 561.1Sscw if [ "X${TERM}" != X"unknown" ]; then 571.1Sscw _forceloop="done" 581.1Sscw fi 591.1Sscw done 601.1Sscw 611.1Sscw # Installing or upgrading? 621.1Sscw again="true" 631.1Sscw echo "Welcome to the NetBSD/mvme68k installation miniroot." 641.1Sscw echo 651.1Sscw while [ $again = "true" ]; do 661.1Sscw 671.1Sscw echo 'enter "install" to install NetBSD,' 681.1Sscw echo ' "upgrade" to upgrade an existing NetBSD system,' 691.1Sscw echo ' or "shell" for a shell prompt.' 701.1Sscw echo 711.1Sscw echo -n "your choice? " 721.1Sscw read resp 731.1Sscw 741.1Sscw case "$resp" in 751.1Sscw install|upgrade|shell) 761.1Sscw again="false" 771.1Sscw ;; 781.1Sscw "") 791.1Sscw echo 801.1Sscw ;; 811.1Sscw *) 821.1Sscw echo "Sorry, $resp isn't valid." 831.1Sscw echo 841.1Sscw ;; 851.1Sscw esac 861.1Sscw done 871.1Sscw 881.1Sscw case "$resp" in 891.1Sscw install) 901.1Sscw install 911.1Sscw ;; 921.1Sscw upgrade) 931.1Sscw upgrade 941.1Sscw ;; 951.1Sscw shell) 961.1Sscw echo 'If you want to run install or upgrade later,' 971.1Sscw echo 'simply type "install" or "upgrade" at the' 981.1Sscw echo 'shell prompt. Good luck!' 991.1Sscw ;; 1001.1Sscw esac 1011.1Sscwfi 102