dot.profile revision 1.10.2.1 1 1.10.2.1 tv # $NetBSD: dot.profile,v 1.10.2.1 2000/10/19 14:24:22 tv Exp $
2 1.1 mrg #
3 1.10.2.1 tv # Copyright (c) 2000 The NetBSD Foundation, Inc.
4 1.1 mrg # All rights reserved.
5 1.10.2.1 tv #
6 1.10.2.1 tv # This code is derived from software contributed to The NetBSD Foundation
7 1.10.2.1 tv # by Paul Kranenburg.
8 1.10.2.1 tv #
9 1.1 mrg # Redistribution and use in source and binary forms, with or without
10 1.1 mrg # modification, are permitted provided that the following conditions
11 1.1 mrg # are met:
12 1.1 mrg # 1. Redistributions of source code must retain the above copyright
13 1.1 mrg # notice, this list of conditions and the following disclaimer.
14 1.1 mrg # 2. Redistributions in binary form must reproduce the above copyright
15 1.1 mrg # notice, this list of conditions and the following disclaimer in the
16 1.1 mrg # documentation and/or other materials provided with the distribution.
17 1.1 mrg # 3. All advertising materials mentioning features or use of this software
18 1.1 mrg # must display the following acknowledgement:
19 1.10.2.1 tv # This product includes software developed by the NetBSD
20 1.10.2.1 tv # Foundation, Inc. and its contributors.
21 1.10.2.1 tv # 4. Neither the name of The NetBSD Foundation nor the names of its
22 1.10.2.1 tv # contributors may be used to endorse or promote products derived
23 1.10.2.1 tv # from this software without specific prior written permission.
24 1.10.2.1 tv #
25 1.10.2.1 tv # THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
26 1.10.2.1 tv # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
27 1.10.2.1 tv # TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 1.10.2.1 tv # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
29 1.10.2.1 tv # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30 1.10.2.1 tv # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31 1.10.2.1 tv # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 1.10.2.1 tv # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 1.10.2.1 tv # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 1.10.2.1 tv # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 1.10.2.1 tv # POSSIBILITY OF SUCH DAMAGE.
36 1.10.2.1 tv #
37 1.1 mrg
38 1.1 mrg PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
39 1.1 mrg export PATH
40 1.1 mrg HOME=/
41 1.1 mrg export HOME
42 1.1 mrg
43 1.1 mrg umask 022
44 1.1 mrg
45 1.10.2.1 tv if [ "${BOOTFS_DONEPROFILE}" = "YES" ]; then
46 1.10.2.1 tv exit
47 1.1 mrg fi
48 1.10.2.1 tv
49 1.10.2.1 tv BOOTFS_DONEPROFILE=YES
50 1.10.2.1 tv export BOOTFS_DONEPROFILE
51 1.10.2.1 tv
52 1.10.2.1 tv # mount root read-write
53 1.10.2.1 tv mount -u /dev/md0a /
54 1.10.2.1 tv
55 1.10.2.1 tv # mount /instfs
56 1.10.2.1 tv MINIROOT_FSSIZE=10000
57 1.10.2.1 tv mount -t mfs -o -s=$MINIROOT_FSSIZE swap /instfs
58 1.10.2.1 tv
59 1.10.2.1 tv # Load instfs
60 1.10.2.1 tv echo ""
61 1.10.2.1 tv echo "If you booted the system from a floppy you can now remove the disk."
62 1.10.2.1 tv echo ""
63 1.10.2.1 tv echo "Next, insert the floppy disk labeled \`instfs' into the disk drive."
64 1.10.2.1 tv echo "The question below allows you to specify the device name of the floppy"
65 1.10.2.1 tv echo "drive. Usually, the default answer \`floppy' will do just fine."
66 1.10.2.1 tv echo ""
67 1.10.2.1 tv
68 1.10.2.1 tv _dev="floppy"
69 1.10.2.1 tv while :; do
70 1.10.2.1 tv #if [ "$_dev" = "" ] ; then _dev=floppy; fi
71 1.10.2.1 tv echo -n "Device to load the \`instfs' filesystem from [$_dev]: "
72 1.10.2.1 tv read _answer
73 1.10.2.1 tv if [ "$_answer" != "" ]; then _dev=$_answer; fi
74 1.10.2.1 tv if [ "$_dev" = floppy ]; then _dev=/dev/rfd0a; fi
75 1.10.2.1 tv if [ "$_dev" = "none" ]; then continue; fi
76 1.10.2.1 tv (cd /instfs && tar zxvpf $_dev) && break
77 1.10.2.1 tv done
78 1.10.2.1 tv
79 1.10.2.1 tv # switch to /instfs, and pretend we logged in there.
80 1.10.2.1 tv exec chroot /instfs /bin/sh /.profile
81