This file is indexed.

/var/lib/fai/config/hooks/prepareapt.DEFAULT is in goto-fai 3.1-1.2.

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
#!/bin/sh

sendmon "TASKBEGIN prepareapt"

# ftp and http needs resolv.conf in chroot environment, /etc/hosts is useful
# think about using fcopy for these two files
[ -f /etc/resolv.conf ] && cp /etc/resolv.conf $FAI_ROOT/etc
[ -f /etc/hosts ] && cp /etc/hosts $FAI_ROOT/etc
# set hostname in $FAI_ROOT
if [ -f /var/run/fai/FAI_INSTALLATION_IN_PROGRESS ]; then
	echo $HOSTNAME >$FAI_ROOT/etc/hostname
	if [ -n "$IPADDR" ]; then
		ainsl -s $FAI_ROOT/etc/hosts "$IPADDR $HOSTNAME.$DOMAIN $HOSTNAME"
	fi
fi

if [ X$FAI_ALLOW_UNSIGNED = X1 ]; then
	cat <<-EOF > $FAI_ROOT/etc/apt/apt.conf.d/10fai
	APT::Get::AllowUnauthenticated "true";
	Aptitude::CmdLine::Ignore-Trust-Violations yes;
	EOF
fi

# load generated sources.list
[ -f $FAI/files/etc/apt/sources.list/LAST ] && cp $FAI/files/etc/apt/sources.list/LAST $FAI_ROOT/etc/apt/sources.list

sendmon "TASKEND prepareapt"

skiptask prepareapt