#!/bin/sh
#
#  Configure the new image to be a minimal image, by removing
# a packages I don't care about - and installing some alternatives.
#
# Steve
# --
# http://www.steve.org.uk/
#
# $Id: minimal,v 1.2 2006/01/07 23:21:14 steve Exp $


prefix=$1



#
#  This function installs a single package into the chroot, forcing
# the installation to be non-interactive.
#
function install_package
{
    package=$1
    
    DEBIAN_FRONTEND=noninteractive chroot ${prefix} /usr/bin/apt-get --yes --force-yes install $package

}



#
#  Install some new packages - do this first to avoid dependency errors.
#
install_package syslog-ng 
install_package deborphan
install_package less
install_package screen
install_package sudo
install_package vim


#
#  Remove some standard packages.
#
chroot ${prefix} /usr/bin/dpkg --purge ppp pppconfig pppoe pppoeconf 
chroot ${prefix} /usr/bin/dpkg --purge nano ed nvi klogd sysklogd info