dot.profile revision 1.1
11.1Stsubai# $NetBSD: dot.profile,v 1.1 1998/07/29 05:52:19 tsubai 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.1Stsubai# This product includes software developed by Christopher G. Demetriou. 181.1Stsubai# 4. The name of the author may not be used to endorse or promote products 191.1Stsubai# derived from this software without specific prior written permission 201.1Stsubai# 211.1Stsubai# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 221.1Stsubai# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 231.1Stsubai# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 241.1Stsubai# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 251.1Stsubai# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 261.1Stsubai# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 271.1Stsubai# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 281.1Stsubai# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 291.1Stsubai# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 301.1Stsubai# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 311.1Stsubai# 321.1Stsubai 331.1StsubaiPATH=/sbin:/bin:/usr/bin:/usr/sbin:/ 341.1Stsubaiexport PATH 351.1StsubaiTERM=sun 361.1Stsubaiexport TERM 371.1StsubaiHOME=/ 381.1Stsubaiexport HOME 391.1Stsubai 401.1Stsubaiumask 022 411.1Stsubai 421.1Stsubaiif [ "X${DONEPROFILE}" = "X" ]; then 431.1Stsubai DONEPROFILE=YES 441.1Stsubai 451.1Stsubai # set up some sane defaults 461.1Stsubai echo 'erase ^H, werase ^W, kill ^U, intr ^C, status ^T' 471.1Stsubai stty newcrt werase ^W intr ^C kill ^U erase ^H status ^T 38400 481.1Stsubai 491.1Stsubai # mount root read-write 501.1Stsubai mount -u /dev/md0a / 511.1Stsubai 521.1Stsubai # run update, so that installed software is written as it goes. 531.1Stsubai update 541.1Stsubai 551.1Stsubai # get the terminal type 561.1Stsubai _forceloop="" 571.1Stsubai while [ "X${_forceloop}" = X"" ]; do 581.1Stsubai eval `tset -s -m ":?$TERM"` 591.1Stsubai if [ "X${TERM}" != X"unknown" ]; then 601.1Stsubai _forceloop="done" 611.1Stsubai fi 621.1Stsubai done 631.1Stsubai 641.1Stsubai exec /bin/sh # XXX 651.1Stsubai 661.1Stsubai # Installing or upgrading? 671.1Stsubai _forceloop="" 681.1Stsubai while [ "X${_forceloop}" = X"" ]; do 691.1Stsubai echo -n '(I)nstall, (S)hell or (H)alt ? ' 701.1Stsubai read _forceloop 711.1Stsubai case "$_forceloop" in 721.1Stsubai i*|I*) 731.1Stsubai /sysinst 741.1Stsubai ;; 751.1Stsubai 761.1Stsubai s*|S*) 771.1Stsubai /bin/sh 781.1Stsubai ;; 791.1Stsubai 801.1Stsubai h*|H*) 811.1Stsubai /sbin/halt 821.1Stsubai ;; 831.1Stsubai 841.1Stsubai *) 851.1Stsubai _forceloop="" 861.1Stsubai ;; 871.1Stsubai esac 881.1Stsubai done 891.1Stsubaifi 90