cleaning class
[fai-configs.git] / scripts / LAST / 50-misc
CommitLineData
2d1f8014 1#! /bin/bash
2
3# copyright Thomas Lange 2001-2007, lange@debian.org
4
5error=0 ; trap "error=$((error|1))" ERR
6
7# remove backup files from cfengine
8dirs="root etc var"
9for path in $dirs; do
10 find $target/$path -maxdepth 20 -name \*.cfedited -o -name \*.cfsaved | xargs -r rm
11done
12
13[ "$FAI_DEBMIRROR" ] &&
14 ainsl $target/etc/fstab "#$FAI_DEBMIRROR $MNTPOINT nfs ro 0 0"
15
16# set bios clock
17if [ $do_init_tasks -eq 1 ] ; then
18 case "$UTC" in
19 no|"") hwopt="--localtime" ;;
20 yes) hwopt="--utc" ;;
21 esac
22 $ROOTCMD hwclock $hwopt --systohc || true
23fi
24
25# Make sure everything is configured properly
26echo "Running \"apt-get -f install\" for the last time."
025ba1f7
RR
27export DEBIAN_FRONTEND=noninteractive
28$ROOTCMD apt-get -y --force-yes -f install
2d1f8014 29
30lskernels=$(echo $target/boot/vmlinu*)
31[ -f ${lskernels%% *} ] || echo "ERROR: No kernel was installed. Have a look at shell.log"
32# copy sources.list
33fcopy -i /etc/apt/sources.list
34
35exit $error
36