#! /bin/sh
#
# |-----------------------------------------------------------|
# | Copyright (c) 1991, 1990 MIPS Computer Systems, Inc.      |
# | All Rights Reserved                                       |
# |-----------------------------------------------------------|
# |          Restricted Rights Legend                         |
# | Use, duplication, or disclosure by the Government is      |
# | subject to restrictions as set forth in                   |
# | subparagraph (c)(1)(ii) of the Rights in Technical        |
# | Data and Computer Software Clause of DFARS 252.227-7013.  |
# |         MIPS Computer Systems, Inc.                       |
# |         950 DeGuigne Avenue                               |
# |         Sunnyvale, California 94088-3650, USA             |
# |-----------------------------------------------------------|
#
# $Header: brc,v 1.19.1.1 92/06/24 13:35:45 marker Exp $

#
# This script runs at boot time, so nothing is mounted except "/".
# Save old mtab in case someone wants to check the state at a crash.
#
[ -f /etc/mtab ] && { mv /etc/mtab /etc/mtab.old; }

# So /etc/mtab will not be world writable
umask 002

cat /dev/null > /etc/mtab
mount -f /
mount /proc
mount /dev/fd
rm -f /etc/ypbind.pid /etc/rpcbind.pid
if mount | grep "on \/ type nfs "  >/dev/null 2>&1
then
  # root is mounted over nfs, mount /usr and /var now
  mount /usr
  mount /var
fi
