#!/bin/bash # create a new minimal fedora install # suitable for use on a router box. # Where we are building the system # Warning: everything under this directory will # be removed. BUILDDIR=/extra_disk/wansys # Where the complete collection of Fedora Core 1 # RPMs resides. # Copy these from the Fedora Core 1 install CDs. FEDORADIR=/extra_disk/fedora-rpms # Some setup parameters HOSTNAME=wan-router GATEWAY=192.168.1.1 IPADDR=192.168.1.2 NAMESERVER1=192.168.1.1 NAMESERVER2=192.168.2.1 DOMAIN=some-company.com # Initialize rpm db rpm --root $BUILDDIR --dbpath /var/lib/rpm \ --initdb || exit 1 # The rpm directory has to be available under the # build directory. ln -s $FEDORADIR $BUILDDIR || exit 1 # Need /etc/fstab for some of the rpm installs. mkdir $BUILDDIR/etc cat >>$BUILDDIR/etc/fstab </tmp/pkglist.$$ </tmp/config-keep.txt.$$ <$BUILDDIR/etc/sysconfig/network <\ $BUILDDIR/etc/sysconfig/network-scripts/ifcfg-eth0\ <$BUILDDIR/etc/resolv.conf <$BUILDDIR/etc/hosts <$BUILDDIR/etc/sysctl.conf <