#!/bin/sh
#
# installation configuration program
# The initial installation program will have created
# /etc/system_config, with all necessary definitions.
# rc, rc.inet1, rc.inet2 use the config file directly.
# lilo, resolv.conf,fstab need to be built

# for ease of installation, assume we are in etc, and use
# relative paths

. ./system_config

# build lilo config file
echo "compact
install = /boot/boot.b
boot = $BOOTDEV
image = /vmlinuz
  label = linux
  root = $ROOTDEV
  vga = normal
  ramdisk = 0
  read-only" > lilo.conf

# install lilo bootstrap
../sbin/lilo -C /etc/lilo.conf -r `(cd ..; pwd)`

if [ $DONET = yes ]; then
# build resolv.conf
echo "nameserver $NAMESERVER
domain $DOMAIN" > resolv.conf
chmod 444 resolv.conf
# build smail config file
echo "hostname=$MYNAME.$DOMAIN
domains=$DOMAIN" > ../usr/lib/smail/config
chmod 444 ../usr/lib/smail/config
fi

#build fstab
if [ $DOSWAP = yes ]; then
echo "$ROOTDEV	/	ext2	defaults
/swapfile	none	swap	sw
none	/proc	proc	defaults" > fstab
else
echo "$ROOTDEV	/	ext2	defaults
none	/proc	proc	defaults" > fstab
fi
