dot.upgrutils revision 1.3
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.3Sis# $Id: dot.upgrutils,v 1.3 1997/05/14 22:19:51 is 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 chroot $upgrade_dir /usr/sbin/pwd_mkdb -p /etc/master.passwd 461.1Schopps chroot $upgrade_dir /bin/rm /etc/sendmail.fc > /dev/null 2>&1 471.1Schopps sync 481.1Schopps echo "Done." 491.1Schopps 501.1Schopps echo "" 511.3Sis echo -n "Copying the kernel..." 521.3Sis cp /netbsd $upgrade_dir/netbsd 531.3Sis echo "Done." 541.3Sis echo -n "Installing boot block..." 551.3Sis read rdev rest < /mnt/etc/fstab 561.3Sis /mnt/usr/sbin/installboot /mnt/usr/mdec/xxboot `echo $rdev | sed -e 's^/dev/^/dev/r^'` 571.3Sis echo " done." 581.3Sis 591.3Sis echo "" 601.3Sis echo "You should now halt your machine using the 'halt' command." 611.3Sis echo "Once the machine is halted, reboot it." 621.3Sis 631.1Schopps} 64