dot.profile revision 1.2
11.2Sgmcgarry# $NetBSD: dot.profile,v 1.2 2002/02/23 22:00:28 gmcgarry 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.1Sgmcgarry# 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.1SgmcgarryTERM=hp300h 391.1Sgmcgarryexport TERM 401.1SgmcgarryHOME=/ 411.1Sgmcgarryexport HOME 421.2SgmcgarryBLOCKSIZE=1k 431.2Sgmcgarryexport BLOCKSIZE 441.2SgmcgarryEDITOR=ed 451.2Sgmcgarryexport EDITOR 461.1Sgmcgarry 471.1Sgmcgarryumask 022 481.1Sgmcgarry 491.1SgmcgarryROOTDEV=/dev/md0a 501.1Sgmcgarry 511.1Sgmcgarryif [ "X${DONEPROFILE}" = "X" ]; then 521.1Sgmcgarry DONEPROFILE=YES 531.1Sgmcgarry export DONEPROFILE 541.1Sgmcgarry 551.1Sgmcgarry # set up some sane defaults 561.1Sgmcgarry echo 'erase ^?, werase ^W, kill ^U, intr ^C' 571.1Sgmcgarry stty newcrt werase ^W intr ^C kill ^U erase ^? 9600 581.1Sgmcgarry echo '' 591.1Sgmcgarry 601.1Sgmcgarry # mount the ramdisk read write 611.1Sgmcgarry mount -u $ROOTDEV / 621.1Sgmcgarry 631.1Sgmcgarry # mount the kern_fs so that we can examine the dmesg state 641.1Sgmcgarry mount -t kernfs /kern /kern 651.1Sgmcgarry 661.2Sgmcgarry # pull in the functions that people will use from the shell prompt. 671.2Sgmcgarry # . /.commonutils 681.2Sgmcgarry # . /.instutils 691.2Sgmcgarry dmesg() cat /kern/msgbuf 701.2Sgmcgarry grep() sed -n "/$1/p" 711.2Sgmcgarry 721.2Sgmcgarry if [ -x /sysinst ]; then 731.2Sgmcgarry # run the installation or upgrade script. 741.2Sgmcgarry sysinst 751.2Sgmcgarry else 761.2Sgmcgarry echo "This image contains utilities which may be needed" 771.2Sgmcgarry echo "to get you out of a pinch." 781.2Sgmcgarry fi 791.1Sgmcgarryfi 80