#! /bin/sh

# copyright Thomas Lange 2001, lange@debian.org

# remove backup files from cfeninge
dirs="root etc var"
for path in $dirs; do
    find $target/$path -maxdepth 25 -name \*.cfedited -o -name \*.cfsaved | xargs -r rm
done

# if no separate /tmp partition exists, make link /tmp -> /var/tmp
ifclass TMP_PARTITION || {
    rm -rf $target/tmp
    ln -s  /var/tmp $target/tmp
}

[ "$FAI_DEBMIRROR" ] && 
echo "#$FAI_DEBMIRROR $MNTPOINT nfs ro,rsize=8192,wsize=8192 0 0" >> $target/etc/fstab

# set bios clock
case "$UTC" in
   no|"") hwopt="--localtime" ;;
   yes)   hwopt="--utc"       ;;
esac
$ROOTCMD hwclock $hwopt --systohc

# the system is now configured
rm -f $target/sbin/unconfigured.sh
