dot.profile revision 1.3
11.3Scgd# $NetBSD: dot.profile,v 1.3 2000/06/14 22:52:46 cgd 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.3Scgd# 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 # mount the kern_fs so that we can examine the dmesg state 601.1Stsubai mount -t kernfs kern /kern 611.1Stsubai 621.1Stsubai # get the terminal type 631.1Stsubai _forceloop="" 641.1Stsubai while [ "X${_forceloop}" = X"" ]; do 651.1Stsubai eval `tset -s -m ":?$TERM"` 661.1Stsubai if [ "X${TERM}" != X"unknown" ]; then 671.1Stsubai _forceloop="done" 681.1Stsubai fi 691.1Stsubai done 701.1Stsubai 711.1Stsubai /bin/sh # XXX for now 721.1Stsubai 731.1Stsubai # Installing or upgrading? 741.1Stsubai _forceloop="" 751.1Stsubai while [ "X${_forceloop}" = X"" ]; do 761.1Stsubai echo -n '(I)nstall, (S)hell or (H)alt ? ' 771.1Stsubai read _forceloop 781.1Stsubai case "$_forceloop" in 791.1Stsubai i*|I*) 801.1Stsubai /sysinst 811.1Stsubai ;; 821.1Stsubai 831.1Stsubai s*|S*) 841.1Stsubai /bin/sh 851.1Stsubai ;; 861.1Stsubai 871.1Stsubai h*|H*) 881.1Stsubai /sbin/halt 891.1Stsubai ;; 901.1Stsubai 911.1Stsubai *) 921.1Stsubai _forceloop="" 931.1Stsubai ;; 941.1Stsubai esac 951.1Stsubai done 961.1Stsubaifi 97