dot.upgrutils revision 1.1
11.1Schopps#
21.1Schopps# Copyright (c) 1994 Christopher G. Demetriou
31.1Schopps# All rights reserved.
41.1Schopps# 
51.1Schopps# Redistribution and use in source and binary forms, with or without
61.1Schopps# modification, are permitted provided that the following conditions
71.1Schopps# are met:
81.1Schopps# 1. Redistributions of source code must retain the above copyright
91.1Schopps#    notice, this list of conditions and the following disclaimer.
101.1Schopps# 2. Redistributions in binary form must reproduce the above copyright
111.1Schopps#    notice, this list of conditions and the following disclaimer in the
121.1Schopps#    documentation and/or other materials provided with the distribution.
131.1Schopps# 3. All advertising materials mentioning features or use of this software
141.1Schopps#    must display the following acknowledgement:
151.1Schopps#	This product includes software developed by Christopher G. Demetriou.
161.1Schopps# 4. The name of the author may not be used to endorse or promote products
171.1Schopps#    derived from this software without specific prior written permission
181.1Schopps#
191.1Schopps# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
201.1Schopps# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
211.1Schopps# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
221.1Schopps# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
231.1Schopps# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
241.1Schopps# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
251.1Schopps# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
261.1Schopps# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
271.1Schopps# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
281.1Schopps# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
291.1Schopps#
301.1Schopps#	$Id: dot.upgrutils,v 1.1 1995/10/02 12:57:43 chopps Exp $
311.1Schopps
321.1Schopps# Upgrade cleanup utilites (functions), to make sure a recently-upgraded
331.1Schopps# system is safely runnable.  These are meant to be invoked from the shell
341.1Schopps# prompt, by people installing NetBSD.
351.1Schopps
361.1SchoppsCleanup()
371.1Schopps{
381.1Schopps	upgrade_dir=/
391.1Schopps
401.1Schopps	if [ ! -f /etc/fstab ]; then
411.1Schopps		upgrade_dir=/mnt
421.1Schopps	fi
431.1Schopps
441.1Schopps	echo	"Cleaning up miscellaneous files in /etc..."
451.1Schopps	mv $upgrade_dir/etc/rc.bak $upgrade_dir/etc/rc
461.1Schopps	chroot $upgrade_dir /usr/sbin/pwd_mkdb -p /etc/master.passwd
471.1Schopps	chroot $upgrade_dir /bin/rm /etc/sendmail.fc > /dev/null 2>&1
481.1Schopps	sync
491.1Schopps	echo	"Done."
501.1Schopps
511.1Schopps	echo	""
521.1Schopps	echo	"All that's left to do now is to install a new NetBSD kernel"
531.1Schopps	echo	"on your hard disk.  You should now halt your machine using"
541.1Schopps	echo	"the 'halt' command.  Once the machine is halted, replace the"
551.1Schopps	echo	"installation floppy with the kernel-copy floppy and hit any"
561.1Schopps	echo	"key to reboot.  Use the kernel-copy floppy to copy a kernel"
571.1Schopps	echo	"to your hard disk."
581.1Schopps}
59