#!/bin/sh
#ident "$Header: bootflags 1.12 90/04/25 $"
#
# $Copyright:	$
# Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 
# Sequent Computer Systems, Inc.   All rights reserved.
#  
# This software is furnished under a license and may be used
# only in accordance with the terms of that license and with the
# inclusion of the above copyright notice.   This software may not
# be provided or otherwise made available to, or used by, any
# other person.  No title to or ownership of the software is
# hereby transferred.
#
# THIS FILE CAN BE AUTOMATICALLY OVERWRITTEN by the
#	ptx/ADMIN menu system.
#
# WARNING:
# Any changes to this file may be overwritten!
#

# If the ptx/ADMIN menu system is installed, overwrite
# this file with the proper bootstring settings.
if [ -f /etc/tfenv ]; then
	. /etc/tfenv
	if [ -x ${TFBIN}/edc ]; then
		[ -n "$HOME" ] || HOME=/ export HOME
		exec ${TFBIN}/edc -d bootflags
		exit 1
	fi
fi

# If no menu system is found, issue warning that bootflags
# may have incorrect values and should be set manually.

echo "\nWARNING: The bootflags may have incorrect values and should be set"
echo "         manually or by editing the /etc/init.d/bootflags program.\n"

# Save the original boot strings before they get reset
# to document the actual method of bootup.
/etc/bootflags > /etc/.bootstring

f=0
n0="zd(0,0)unix -r zd0s0 -s zd0s1"
n1="zd(0,0)stand/dump zd(0,1) 8000 /dev/rdsk/zd0s1"

# /bin/size is part of an optional install tape
if [ -x /bin/size ]; then
	ra1=`/bin/size /unix | /usr/bin/cut -f1 -d" "`
else
	ra1=566000
fi

/etc/bootflags -p -c f=$f n0="$n0" n1="$n1" ra1=$ra1
