11.7Smartin# $NetBSD: dot.profile,v 1.7 2020/01/09 19:17:43 martin Exp $ 21.1Stsubai# 31.1Stsubai# Copyright (c) 1995 Jason R. Thorpe 41.1Stsubai# Copyright (c) 1994 Christopher G. Demetriou 51.1Stsubai# All rights reserved. 61.1Stsubai# 71.1Stsubai# Redistribution and use in source and binary forms, with or without 81.1Stsubai# modification, are permitted provided that the following conditions 91.1Stsubai# are met: 101.1Stsubai# 1. Redistributions of source code must retain the above copyright 111.1Stsubai# notice, this list of conditions and the following disclaimer. 121.1Stsubai# 2. Redistributions in binary form must reproduce the above copyright 131.1Stsubai# notice, this list of conditions and the following disclaimer in the 141.1Stsubai# documentation and/or other materials provided with the distribution. 151.1Stsubai# 3. All advertising materials mentioning features or use of this software 161.1Stsubai# must display the following acknowledgement: 171.3Scgd# This product includes software developed for the 181.6Ssalo# NetBSD Project. See http://www.NetBSD.org/ for 191.3Scgd# information about NetBSD. 201.1Stsubai# 4. The name of the author may not be used to endorse or promote products 211.3Scgd# derived from this software without specific prior written permission. 221.3Scgd# 231.1Stsubai# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 241.1Stsubai# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 251.1Stsubai# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 261.1Stsubai# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 271.1Stsubai# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 281.1Stsubai# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 291.1Stsubai# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 301.1Stsubai# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 311.1Stsubai# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 321.1Stsubai# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 331.3Scgd# 341.3Scgd# <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>> 351.1Stsubai 361.1StsubaiPATH=/sbin:/bin:/usr/bin:/usr/sbin:/ 371.1Stsubaiexport PATH 381.1StsubaiTERM=vt100 391.1Stsubaiexport TERM 401.1StsubaiHOME=/ 411.1Stsubaiexport HOME 421.1Stsubai 431.1Stsubaiumask 022 441.1Stsubai 451.1Stsubaiif [ "X${DONEPROFILE}" = "X" ]; then 461.1Stsubai DONEPROFILE=YES 471.1Stsubai export DONEPROFILE 481.1Stsubai 491.1Stsubai # set up some sane defaults 501.1Stsubai echo 'erase ^H, werase ^W, kill ^U, intr ^C, status ^T' 511.1Stsubai stty newcrt werase ^W intr ^C kill ^U erase ^H status ^T 9600 521.1Stsubai 531.1Stsubai # mount root read-write 541.1Stsubai mount -u /dev/md0a / 551.1Stsubai 561.1Stsubai # mount a /tmp on mfs, to avoid filling the md 571.1Stsubai mount -t mfs swap /tmp 581.1Stsubai 591.1Stsubai # get the terminal type 601.1Stsubai _forceloop="" 611.1Stsubai while [ "X${_forceloop}" = X"" ]; do 621.1Stsubai eval `tset -s -m ":?$TERM"` 631.1Stsubai if [ "X${TERM}" != X"unknown" ]; then 641.1Stsubai _forceloop="done" 651.1Stsubai fi 661.1Stsubai done 671.1Stsubai 681.1Stsubai # Installing or upgrading? 691.1Stsubai _forceloop="" 701.1Stsubai while [ "X${_forceloop}" = X"" ]; do 711.1Stsubai echo -n '(I)nstall, (S)hell or (H)alt ? ' 721.1Stsubai read _forceloop 731.1Stsubai case "$_forceloop" in 741.1Stsubai i*|I*) 751.7Smartin /sysinst || stty sane 761.1Stsubai ;; 771.1Stsubai 781.1Stsubai s*|S*) 791.1Stsubai /bin/sh 801.1Stsubai ;; 811.1Stsubai 821.1Stsubai h*|H*) 831.1Stsubai /sbin/halt 841.1Stsubai ;; 851.1Stsubai 861.1Stsubai *) 871.1Stsubai _forceloop="" 881.1Stsubai ;; 891.1Stsubai esac 901.1Stsubai done 911.1Stsubaifi 92