dot.profile revision 1.2
11.2Smartin# $NetBSD: dot.profile,v 1.2 2020/01/09 19:17:44 martin Exp $ 21.1Snisimura# 31.1Snisimura# Copyright (c) 1995 Jason R. Thorpe 41.1Snisimura# Copyright (c) 1994 Christopher G. Demetriou 51.1Snisimura# All rights reserved. 61.1Snisimura# 71.1Snisimura# Redistribution and use in source and binary forms, with or without 81.1Snisimura# modification, are permitted provided that the following conditions 91.1Snisimura# are met: 101.1Snisimura# 1. Redistributions of source code must retain the above copyright 111.1Snisimura# notice, this list of conditions and the following disclaimer. 121.1Snisimura# 2. Redistributions in binary form must reproduce the above copyright 131.1Snisimura# notice, this list of conditions and the following disclaimer in the 141.1Snisimura# documentation and/or other materials provided with the distribution. 151.1Snisimura# 3. All advertising materials mentioning features or use of this software 161.1Snisimura# must display the following acknowledgement: 171.1Snisimura# This product includes software developed for the 181.1Snisimura# NetBSD Project. See http://www.NetBSD.org/ for 191.1Snisimura# information about NetBSD. 201.1Snisimura# 4. The name of the author may not be used to endorse or promote products 211.1Snisimura# derived from this software without specific prior written permission. 221.1Snisimura# 231.1Snisimura# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 241.1Snisimura# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 251.1Snisimura# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 261.1Snisimura# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 271.1Snisimura# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 281.1Snisimura# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 291.1Snisimura# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 301.1Snisimura# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 311.1Snisimura# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 321.1Snisimura# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 331.1Snisimura# 341.1Snisimura# <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>> 351.1Snisimura 361.1SnisimuraPATH=/sbin:/bin:/usr/bin:/usr/sbin:/ 371.1Snisimuraexport PATH 381.1SnisimuraTERM=vt100 391.1Snisimuraexport TERM 401.1SnisimuraHOME=/ 411.1Snisimuraexport HOME 421.1Snisimura 431.1Snisimuraumask 022 441.1Snisimura 451.1Snisimuraif [ "X${DONEPROFILE}" = "X" ]; then 461.1Snisimura DONEPROFILE=YES 471.1Snisimura export DONEPROFILE 481.1Snisimura 491.1Snisimura # set up some sane defaults 501.1Snisimura echo 'erase ^H, werase ^W, kill ^U, intr ^C, status ^T' 511.1Snisimura stty newcrt werase ^W intr ^C kill ^U erase ^H status ^T 521.1Snisimura 531.1Snisimura # mount root read-write 541.1Snisimura mount -u /dev/md0a / 551.1Snisimura 561.1Snisimura # mount a /tmp on mfs, to avoid filling the md 571.1Snisimura mount -t mfs swap /tmp 581.1Snisimura 591.1Snisimura # get the terminal type 601.1Snisimura _forceloop="" 611.1Snisimura while [ "X${_forceloop}" = X"" ]; do 621.1Snisimura eval `tset -s -m ":?$TERM"` 631.1Snisimura if [ "X${TERM}" != X"unknown" ]; then 641.1Snisimura _forceloop="done" 651.1Snisimura fi 661.1Snisimura done 671.1Snisimura 681.1Snisimura # Installing or upgrading? 691.1Snisimura _forceloop="" 701.1Snisimura while [ "X${_forceloop}" = X"" ]; do 711.1Snisimura echo -n '(I)nstall, (S)hell or (H)alt ? ' 721.1Snisimura read _forceloop 731.1Snisimura case "$_forceloop" in 741.1Snisimura i*|I*) 751.2Smartin /sysinst || stty sane 761.1Snisimura ;; 771.1Snisimura 781.1Snisimura s*|S*) 791.1Snisimura /bin/sh 801.1Snisimura ;; 811.1Snisimura 821.1Snisimura h*|H*) 831.1Snisimura /sbin/halt 841.1Snisimura ;; 851.1Snisimura 861.1Snisimura *) 871.1Snisimura _forceloop="" 881.1Snisimura ;; 891.1Snisimura esac 901.1Snisimura done 911.1Snisimurafi 92