11.9Smartin# $NetBSD: dot.profile,v 1.9 2020/01/09 19:17:43 martin 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.6Scgd# This product includes software developed for the 181.8Ssalo# NetBSD Project. See http://www.NetBSD.org/ for 191.6Scgd# information about NetBSD. 201.1Sscw# 4. The name of the author may not be used to endorse or promote products 211.6Scgd# derived from this software without specific prior written permission. 221.6Scgd# 231.1Sscw# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 241.1Sscw# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 251.1Sscw# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 261.1Sscw# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 271.1Sscw# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 281.1Sscw# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 291.1Sscw# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 301.1Sscw# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 311.1Sscw# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 321.1Sscw# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 331.6Scgd# 341.6Scgd# <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>> 351.1Sscw 361.1SscwPATH=/sbin:/bin:/usr/bin:/usr/sbin:/ 371.1Sscwexport PATH 381.1SscwTERM=vt100 391.1Sscwexport TERM 401.2SperryHOME=/ 411.2Sperryexport HOME 421.1Sscw 431.1Sscwumask 022 441.1Sscw 451.1Sscwif [ "X${DONEPROFILE}" = "X" ]; then 461.1Sscw DONEPROFILE=YES 471.3Scgd export DONEPROFILE 481.1Sscw 491.1Sscw # set up some sane defaults 501.1Sscw echo 'erase ^H, werase ^W, kill ^U, intr ^C' 511.1Sscw stty newcrt werase ^W intr ^C kill ^U erase ^H 9600 521.1Sscw 531.1Sscw # get the terminal type 541.1Sscw _forceloop="" 551.1Sscw while [ "X${_forceloop}" = X"" ]; do 561.1Sscw eval `tset -s -m ":?$TERM"` 571.1Sscw if [ "X${TERM}" != X"unknown" ]; then 581.1Sscw _forceloop="done" 591.1Sscw fi 601.1Sscw done 611.1Sscw 621.7Sscw mount -t kernfs /kern /kern 631.7Sscw 641.1Sscw # Installing or upgrading? 651.1Sscw echo "Welcome to the NetBSD/mvme68k installation miniroot." 661.1Sscw echo 671.1Sscw 681.7Sscw _forceloop="" 691.7Sscw while [ "X${_forceloop}" = X"" ]; do 701.7Sscw cat <<'EOF' 711.7Sscw 721.7SscwThis installer now uses the new `sysinst' installer tool by default. To 731.7Sscwuse the old install or upgrade shell scripts instead, enter the options 741.7Sscw(OI) for Old Install or (OU) for Old Upgrade. 751.7Sscw 761.7SscwThe script-based installers may be removed in a future release. 771.7Sscw 781.7SscwEOF 791.7Sscw echo -n '(I)nstall/Upgrade, (H)alt or (S)hell? ' 801.7Sscw read _forceloop 811.7Sscw case "$_forceloop" in 821.7Sscw i*|I*|u*|U*) 831.7Sscw # setup a writable /tmp directory 841.7Sscw mount_mfs swap /tmp || continue 851.9Smartin /sysinst || stty sane 861.1Sscw ;; 871.7Sscw 881.7Sscw oi*|OI*) 891.7Sscw /install 901.7Sscw ;; 911.7Sscw 921.7Sscw ou*|OU*) 931.7Sscw /upgrade 941.1Sscw ;; 951.7Sscw 961.7Sscw h*|H*) 971.7Sscw # 981.7Sscw # XXX - if we're piggybacking a microroot, then 991.7Sscw # exit from this (chroot) environment: the 1001.7Sscw # microroot's .profile will halt the machine. 1011.7Sscw # 1021.7Sscw if [ "$BOOTFS_DONEPROFILE" = YES ]; then 1031.7Sscw exit 1041.7Sscw else 1051.7Sscw /sbin/halt 1061.7Sscw fi 1071.7Sscw ;; 1081.7Sscw 1091.7Sscw s*|S*) 1101.7Sscw /bin/sh 1111.7Sscw continue 1121.7Sscw ;; 1131.7Sscw 1141.1Sscw *) 1151.7Sscw _forceloop="" 1161.1Sscw ;; 1171.1Sscw esac 1181.1Sscw done 1191.1Sscwfi 120