File: 50-misc

package info (click to toggle)
fai 4.3.1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 1,740 kB
  • sloc: perl: 5,115; sh: 4,272; makefile: 157
file content (39 lines) | stat: -rwxr-xr-x 1,096 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#! /bin/bash

# copyright Thomas Lange 2001-2011, lange@debian.org

error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error code

# remove backup files from cfengine, but only if cfengine is installed
if [ -x /usr/sbin/cfagent ] || [ -x $target/usr/sbin/cfagent ] ; then
    dirs="root etc var"
    for path in $dirs; do
        find $target/$path -maxdepth 20 -name \*.cfedited -o -name \*.cfsaved | xargs -r rm
    done
fi

[ "$FAI_DEBMIRROR" ] &&
  ainsl /etc/fstab "#$FAI_DEBMIRROR $MNTPOINT nfs ro 0 0"

# set bios clock
if [ $do_init_tasks -eq 1 ] ; then
    case "$UTC" in
       no|"") hwopt="--localtime" ;;
       yes)   hwopt="--utc"       ;;
    esac
    hwclock $hwopt --systohc || true
fi

# Make sure everything is configured properly
if ifclass DEBIAN ; then
        echo "Running \"apt-get -f install\" for the last time."
        $ROOTCMD apt-get -f install
fi

lskernels=$(echo $target/boot/vmlinu*)
[ -f ${lskernels%% *} ] || echo "ERROR: No kernel was installed. Have a look at shell.log" >&2
# copy sources.list
fcopy -iM /etc/apt/sources.list

exit $error