#!/bin/sh
#
# This file is subject to the terms and conditions of the GNU General Public
# License.  See the file "COPYING" in the main directory of this archive
# for more details.
#
# Copyright (C) 1995 by Linus Torvalds
#
# Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin
#
# "make install" script for i386 architecture
#
# Arguments:
#   $1 - kernel version
#   $2 - kernel image file
#   $3 - kernel map file
#   $4 - default install path (blank if root directory)
#

[ -f $4/config ] && mv $4/config $4/config.old
cp .config $4/config
[ -f $4/vmlinuz ] && mv $4/vmlinuz $4/vmlinuz.old
cat $2 > $4/vmlinuz
[ -f $4/System.map ] && mv $4/System.map $4/System.old
cp $3 $4/System.map

if [ -x /sbin/lilo -a -f /etc/lilo.conf ] ; then
  /sbin/lilo
else
  sync
fi
