dot.profile revision 1.11
11.11Spk# $NetBSD: dot.profile,v 1.11 2000/10/20 11:56:58 pk Exp $ 21.1Smrg# 31.11Spk# Copyright (c) 2000 The NetBSD Foundation, Inc. 41.1Smrg# All rights reserved. 51.11Spk# 61.11Spk# This code is derived from software contributed to The NetBSD Foundation 71.11Spk# by Paul Kranenburg. 81.11Spk# 91.1Smrg# Redistribution and use in source and binary forms, with or without 101.1Smrg# modification, are permitted provided that the following conditions 111.1Smrg# are met: 121.1Smrg# 1. Redistributions of source code must retain the above copyright 131.1Smrg# notice, this list of conditions and the following disclaimer. 141.1Smrg# 2. Redistributions in binary form must reproduce the above copyright 151.1Smrg# notice, this list of conditions and the following disclaimer in the 161.1Smrg# documentation and/or other materials provided with the distribution. 171.1Smrg# 3. All advertising materials mentioning features or use of this software 181.1Smrg# must display the following acknowledgement: 191.11Spk# This product includes software developed by the NetBSD 201.11Spk# Foundation, Inc. and its contributors. 211.11Spk# 4. Neither the name of The NetBSD Foundation nor the names of its 221.11Spk# contributors may be used to endorse or promote products derived 231.11Spk# from this software without specific prior written permission. 241.11Spk# 251.11Spk# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 261.11Spk# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 271.11Spk# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 281.11Spk# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 291.11Spk# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 301.11Spk# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 311.11Spk# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 321.11Spk# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 331.11Spk# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 341.11Spk# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 351.11Spk# POSSIBILITY OF SUCH DAMAGE. 361.11Spk# 371.1Smrg 381.1SmrgPATH=/sbin:/bin:/usr/bin:/usr/sbin:/ 391.1Smrgexport PATH 401.1SmrgHOME=/ 411.1Smrgexport HOME 421.1Smrg 431.1Smrgumask 022 441.1Smrg 451.11Spkif [ "${BOOTFS_DONEPROFILE}" = "YES" ]; then 461.11Spk exit 471.1Smrgfi 481.11Spk 491.11SpkBOOTFS_DONEPROFILE=YES 501.11Spkexport BOOTFS_DONEPROFILE 511.11Spk 521.11Spk# mount root read-write 531.11Spkmount -u /dev/md0a / 541.11Spk 551.11Spk# mount /instfs 561.11SpkMINIROOT_FSSIZE=10000 571.11Spkmount -t mfs -o -s=$MINIROOT_FSSIZE swap /instfs 581.11Spk 591.11Spk# Load instfs 601.11Spkecho "" 611.11Spkecho "If you booted the system from a floppy you can now remove the disk." 621.11Spkecho "" 631.11Spkecho "Next, insert the floppy disk labeled \`instfs' into the disk drive." 641.11Spkecho "The question below allows you to specify the device name of the floppy" 651.11Spkecho "drive. Usually, the default answer \`floppy' will do just fine." 661.11Spkecho "" 671.11Spk 681.11Spk_dev="floppy" 691.11Spkwhile :; do 701.11Spk #if [ "$_dev" = "" ] ; then _dev=floppy; fi 711.11Spk echo -n "Device to load the \`instfs' filesystem from [$_dev]: " 721.11Spk read _answer 731.11Spk if [ "$_answer" != "" ]; then _dev=$_answer; fi 741.11Spk if [ "$_dev" = floppy ]; then _dev=/dev/rfd0a; fi 751.11Spk if [ "$_dev" = "none" ]; then continue; fi 761.11Spk (cd /instfs && tar zxvpf $_dev) && break 771.11Spkdone 781.11Spk 791.11Spk# switch to /instfs, and pretend we logged in there. 801.11Spkexec chroot /instfs /bin/sh /.profile 81