dot.profile revision 1.4
11.4Sjmmv# $NetBSD: dot.profile,v 1.4 2007/07/31 19:51:58 jmmv Exp $ 21.1Sthorpej# 31.1Sthorpej# Copyright (c) 1997 Perry E. Metzger 41.1Sthorpej# Copyright (c) 1994 Christopher G. Demetriou 51.1Sthorpej# All rights reserved. 61.1Sthorpej# 71.1Sthorpej# Redistribution and use in source and binary forms, with or without 81.1Sthorpej# modification, are permitted provided that the following conditions 91.1Sthorpej# are met: 101.1Sthorpej# 1. Redistributions of source code must retain the above copyright 111.1Sthorpej# notice, this list of conditions and the following disclaimer. 121.1Sthorpej# 2. Redistributions in binary form must reproduce the above copyright 131.1Sthorpej# notice, this list of conditions and the following disclaimer in the 141.1Sthorpej# documentation and/or other materials provided with the distribution. 151.1Sthorpej# 3. All advertising materials mentioning features or use of this software 161.1Sthorpej# must display the following acknowledgement: 171.1Sthorpej# This product includes software developed for the 181.2Ssalo# NetBSD Project. See http://www.NetBSD.org/ for 191.1Sthorpej# information about NetBSD. 201.1Sthorpej# 4. The name of the author may not be used to endorse or promote products 211.1Sthorpej# derived from this software without specific prior written permission. 221.1Sthorpej# 231.1Sthorpej# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 241.1Sthorpej# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 251.1Sthorpej# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 261.1Sthorpej# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 271.1Sthorpej# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 281.1Sthorpej# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 291.1Sthorpej# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 301.1Sthorpej# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 311.1Sthorpej# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 321.1Sthorpej# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 331.1Sthorpej# 341.1Sthorpej# <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>> 351.1Sthorpej 361.1SthorpejPATH=/sbin:/bin:/usr/bin:/usr/sbin:/ 371.1Sthorpejexport PATH 381.1SthorpejHOME=/ 391.1Sthorpejexport HOME 401.1Sthorpej 411.1Sthorpejumask 022 421.1Sthorpej 431.1SthorpejROOTDEV=/dev/md0a 441.1Sthorpej 451.1Sthorpejif [ "X${DONEPROFILE}" = "X" ]; then 461.1Sthorpej DONEPROFILE=YES 471.1Sthorpej export DONEPROFILE 481.1Sthorpej 491.3Sjmmv # get the console device name 501.3Sjmmv mount -t mfs swap /var/run 511.3Sjmmv dev_mkdb 521.3Sjmmv _consdev=`sysctl -n kern.consdev` 531.3Sjmmv umount /var/run 541.3Sjmmv 551.3Sjmmv # get the terminal type 561.3Sjmmv case ${_consdev} in 571.3Sjmmv tty[Ev]*) 581.4Sjmmv TERM=wsvt25 591.3Sjmmv ;; 601.3Sjmmv 611.3Sjmmv *) 621.3Sjmmv _loop="" 631.3Sjmmv while [ "X${_loop}" = X"" ]; do 641.3Sjmmv echo "" >& 2 651.3Sjmmv echo "Setting terminal type. Options:" >& 2 661.3Sjmmv echo "" >& 2 671.4Sjmmv echo " vt100 for dumb serial terminal" >& 2 681.4Sjmmv echo " wsvt25 for graphics console" >& 2 691.4Sjmmv echo " xterm for xterm" >& 2 701.3Sjmmv echo "" >& 2 711.3Sjmmv eval `tset -s -m ":?$TERM"` 721.3Sjmmv if [ "X${TERM}" != X"unknown" ]; then 731.3Sjmmv _loop="done" 741.3Sjmmv fi 751.3Sjmmv done 761.3Sjmmv unset _loop 771.3Sjmmv ;; 781.3Sjmmv esac 791.3Sjmmv export TERM 801.3Sjmmv 811.1Sthorpej # set up some sane defaults 821.1Sthorpej echo 'erase ^?, werase ^W, kill ^U, intr ^C' 831.1Sthorpej stty newcrt werase ^W intr ^C kill ^U erase ^? 9600 841.1Sthorpej echo '' 851.1Sthorpej 861.1Sthorpej # mount the ramdisk read write 871.1Sthorpej mount -u $ROOTDEV / 881.1Sthorpej 891.1Sthorpej # mount the kern_fs so that we can examine the dmesg state 901.1Sthorpej mount -t kernfs /kern /kern 911.1Sthorpej 921.1Sthorpej # run the installation or upgrade script. 931.1Sthorpej sysinst 941.1Sthorpejfi 95