11.2Smartin# $NetBSD: dot.profile,v 1.2 2020/01/09 19:17:44 martin Exp $ 21.1Smrg# 31.1Smrg# Copyright (c) 1997 Perry E. Metzger 41.1Smrg# Copyright (c) 1994 Christopher G. Demetriou 51.1Smrg# All rights reserved. 61.1Smrg# 71.1Smrg# Redistribution and use in source and binary forms, with or without 81.1Smrg# modification, are permitted provided that the following conditions 91.1Smrg# are met: 101.1Smrg# 1. Redistributions of source code must retain the above copyright 111.1Smrg# notice, this list of conditions and the following disclaimer. 121.1Smrg# 2. Redistributions in binary form must reproduce the above copyright 131.1Smrg# notice, this list of conditions and the following disclaimer in the 141.1Smrg# documentation and/or other materials provided with the distribution. 151.1Smrg# 3. All advertising materials mentioning features or use of this software 161.1Smrg# must display the following acknowledgement: 171.1Smrg# This product includes software developed for the 181.1Smrg# NetBSD Project. See http://www.NetBSD.org/ for 191.1Smrg# information about NetBSD. 201.1Smrg# 4. The name of the author may not be used to endorse or promote products 211.1Smrg# derived from this software without specific prior written permission. 221.1Smrg# 231.1Smrg# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 241.1Smrg# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 251.1Smrg# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 261.1Smrg# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 271.1Smrg# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 281.1Smrg# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 291.1Smrg# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 301.1Smrg# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 311.1Smrg# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 321.1Smrg# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 331.1Smrg# 341.1Smrg# <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>> 351.1Smrg 361.1Smrgexport PATH=/sbin:/bin:/usr/bin:/usr/sbin:/ 371.1Smrgexport TERM=vt100 381.1Smrgexport HOME=/ 391.1Smrgexport BLOCKSIZE=1k 401.1Smrgexport EDITOR=vi 411.1Smrg 421.1Smrgumask 022 431.1Smrg 441.1SmrgROOTDEV=/dev/md0a 451.1Smrg 461.1Smrgif [ "X${DONEPROFILE}" = "X" ]; then 471.1Smrg DONEPROFILE=YES 481.1Smrg export DONEPROFILE 491.1Smrg 501.1Smrg # set up some sane defaults 511.1Smrg echo 'erase ^?, werase ^W, kill ^U, intr ^C' 521.1Smrg stty newcrt werase ^W intr ^C kill ^U erase ^? 531.1Smrg echo '' 541.1Smrg 551.1Smrg # mount the ramdisk read write 561.1Smrg mount -u $ROOTDEV / 571.1Smrg 581.1Smrg # mount the kern_fs so that we can examine the dmesg state 591.1Smrg mount -t kernfs /kern /kern 601.1Smrg 611.1Smrg # pull in the functions that people will use from the shell prompt. 621.1Smrg # . /.commonutils 631.1Smrg # . /.instutils 641.1Smrg dmesg() cat /kern/msgbuf 651.1Smrg grep() sed -n "/$1/p" 661.1Smrg 671.1Smrg if [ -x /sysinst ]; then 681.1Smrg # run the installation or upgrade script. 691.2Smartin sysinst || stty sane 701.1Smrg else 711.1Smrg echo "This image contains utilities which may be needed" 721.1Smrg echo "to get you out of a pinch." 731.1Smrg fi 741.1Smrgfi 75