dot.profile revision 1.9
11.9Scgd# $NetBSD: dot.profile,v 1.9 2000/06/14 22:52:45 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.9Scgd# This product includes software developed for the 181.9Scgd# NetBSD Project. See http://www.netbsd.org/ for 191.9Scgd# information about NetBSD. 201.1Stsubai# 4. The name of the author may not be used to endorse or promote products 211.9Scgd# derived from this software without specific prior written permission. 221.9Scgd# 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.9Scgd# 341.9Scgd# <<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.2StsubaiTERM=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.4Scgd 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 38400 521.1Stsubai 531.1Stsubai # mount root read-write 541.7Stsutsui mount -u /dev/md0a / 551.3Stsubai 561.3Stsubai # mount a /tmp on mfs, to avoid filling the md 571.3Stsubai mount -t mfs swap /tmp 581.3Stsubai 591.3Stsubai # mount the kern_fs so that we can examine the dmesg state 601.3Stsubai 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 # Installing or upgrading? 721.1Stsubai _forceloop="" 731.1Stsubai while [ "X${_forceloop}" = X"" ]; do 741.1Stsubai echo -n '(I)nstall, (S)hell or (H)alt ? ' 751.1Stsubai read _forceloop 761.1Stsubai case "$_forceloop" in 771.1Stsubai i*|I*) 781.1Stsubai /sysinst 791.1Stsubai ;; 801.1Stsubai 811.1Stsubai s*|S*) 821.1Stsubai /bin/sh 831.1Stsubai ;; 841.1Stsubai 851.1Stsubai h*|H*) 861.1Stsubai /sbin/halt 871.1Stsubai ;; 881.1Stsubai 891.1Stsubai *) 901.1Stsubai _forceloop="" 911.1Stsubai ;; 921.1Stsubai esac 931.1Stsubai done 941.1Stsubaifi 95