This file is indexed.

/usr/lib/fai/updatebase is in fai-client 5.0.3ubuntu1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 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
40
41
#! /bin/bash

# this script is called after the base.tgz is extract
# update packages (from base.tgz) to their newest version
# is almost Debian specific

echo "Updating base"

# first setup the environment in /target
if [ "$FAI_ACTION" = "install" -o "$FAI_ACTION" = "dirinstall" ]; then
    mount -t proc   proc   $FAI_ROOT/proc
    mount -t sysfs  sysfs  $FAI_ROOT/sys
    [ -f /etc/init.d/udev ] && mount --bind /dev $FAI_ROOT/dev
    mount -t devpts devpts $FAI_ROOT/dev/pts

    # if libc is upgraded init u is called in chroot environment and
    # then init will eat up much cpu time
    # fake some more programs
    fai-divert -a /sbin/init /usr/sbin/liloconfig
    fai-divert -a /usr/sbin/policy-rc.d
    # never start any daemons inside chroot during installtion
    cat > $FAI_ROOT/usr/sbin/policy-rc.d <<EOF
#!/bin/sh
exit 101
EOF
    chmod a+rx $FAI_ROOT/usr/sbin/policy-rc.d
fi

export aptopt="-y -o Dpkg::Options::=--force-confnew"
$ROOTCMD apt-get $aptopt update
$ROOTCMD apt-get $aptopt check
[ $? -ne 0 ] && $ROOTCMD apt-get $aptopt -f install </dev/null
$ROOTCMD dpkg -C
[ $? -ne 0 ] && yes '' | $ROOTCMD dpkg --configure -a
$ROOTCMD aptitude $aptopt -f -y full-upgrade </dev/null
# update dpkg info which packages are available
tmp=$($ROOTCMD mktemp) || exit 88
$ROOTCMD apt-cache dumpavail > $FAI_ROOT/$tmp
$ROOTCMD dpkg --update-avail $tmp
rm -f $FAI_ROOT/$tmp
$ROOTCMD apt-get clean