11.7Smartin# $NetBSD: dot.profile,v 1.7 2020/01/09 19:17:42 martin Exp $ 21.1Sgmcgarry# 31.1Sgmcgarry# Copyright (c) 1997 Perry E. Metzger 41.1Sgmcgarry# Copyright (c) 1994 Christopher G. Demetriou 51.1Sgmcgarry# All rights reserved. 61.1Sgmcgarry# 71.1Sgmcgarry# Redistribution and use in source and binary forms, with or without 81.1Sgmcgarry# modification, are permitted provided that the following conditions 91.1Sgmcgarry# are met: 101.1Sgmcgarry# 1. Redistributions of source code must retain the above copyright 111.1Sgmcgarry# notice, this list of conditions and the following disclaimer. 121.1Sgmcgarry# 2. Redistributions in binary form must reproduce the above copyright 131.1Sgmcgarry# notice, this list of conditions and the following disclaimer in the 141.1Sgmcgarry# documentation and/or other materials provided with the distribution. 151.1Sgmcgarry# 3. All advertising materials mentioning features or use of this software 161.1Sgmcgarry# must display the following acknowledgement: 171.1Sgmcgarry# This product includes software developed for the 181.4Ssalo# NetBSD Project. See http://www.NetBSD.org/ for 191.1Sgmcgarry# information about NetBSD. 201.1Sgmcgarry# 4. The name of the author may not be used to endorse or promote products 211.1Sgmcgarry# derived from this software without specific prior written permission. 221.1Sgmcgarry# 231.1Sgmcgarry# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 241.1Sgmcgarry# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 251.1Sgmcgarry# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 261.1Sgmcgarry# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 271.1Sgmcgarry# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 281.1Sgmcgarry# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 291.1Sgmcgarry# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 301.1Sgmcgarry# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 311.1Sgmcgarry# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 321.1Sgmcgarry# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 331.1Sgmcgarry# 341.1Sgmcgarry# <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>> 351.1Sgmcgarry 361.1SgmcgarryPATH=/sbin:/bin:/usr/bin:/usr/sbin:/ 371.1Sgmcgarryexport PATH 381.1SgmcgarryHOME=/ 391.1Sgmcgarryexport HOME 401.2SgmcgarryBLOCKSIZE=1k 411.2Sgmcgarryexport BLOCKSIZE 421.2SgmcgarryEDITOR=ed 431.2Sgmcgarryexport EDITOR 441.1Sgmcgarry 451.1Sgmcgarryumask 022 461.1Sgmcgarry 471.1SgmcgarryROOTDEV=/dev/md0a 481.1Sgmcgarry 491.1Sgmcgarryif [ "X${DONEPROFILE}" = "X" ]; then 501.1Sgmcgarry DONEPROFILE=YES 511.1Sgmcgarry export DONEPROFILE 521.3Sgmcgarry 531.3Sgmcgarry # get the terminal type 541.3Sgmcgarry _loop="" 551.3Sgmcgarry while [ "X${_loop}" = X"" ]; do 561.3Sgmcgarry echo "" >& 2 571.3Sgmcgarry echo "Setting terminal type. Options:" >& 2 581.3Sgmcgarry echo "" >& 2 591.3Sgmcgarry echo " vt100 for dumb serial terminal" >& 2 601.3Sgmcgarry echo " xterm for xterm." >& 2 611.3Sgmcgarry echo "" >& 2 621.3Sgmcgarry eval `tset -s -m ":?$TERM"` 631.3Sgmcgarry if [ "X${TERM}" != X"unknown" ]; then 641.3Sgmcgarry _loop="done" 651.3Sgmcgarry fi 661.3Sgmcgarry done 671.1Sgmcgarry 681.1Sgmcgarry # set up some sane defaults 691.1Sgmcgarry echo 'erase ^?, werase ^W, kill ^U, intr ^C' 701.1Sgmcgarry stty newcrt werase ^W intr ^C kill ^U erase ^? 9600 711.1Sgmcgarry echo '' 721.1Sgmcgarry 731.1Sgmcgarry # mount the ramdisk read write 741.1Sgmcgarry mount -u $ROOTDEV / 751.1Sgmcgarry 761.2Sgmcgarry # pull in the functions that people will use from the shell prompt. 771.2Sgmcgarry # . /.commonutils 781.2Sgmcgarry # . /.instutils 791.2Sgmcgarry grep() sed -n "/$1/p" 801.2Sgmcgarry 811.2Sgmcgarry if [ -x /sysinst ]; then 821.2Sgmcgarry # run the installation or upgrade script. 831.7Smartin sysinst || stty sane 841.2Sgmcgarry else 851.2Sgmcgarry echo "This image contains utilities which may be needed" 861.2Sgmcgarry echo "to get you out of a pinch." 871.2Sgmcgarry fi 881.1Sgmcgarryfi 89