This file is indexed.

/usr/share/initramfs-tools/scripts/casper-bottom/24preseed is in casper 1.315.

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
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
#! /bin/sh

PREREQ=""
DESCRIPTION="Loading preseed file..."

prereqs ()
{
	echo "$PREREQ"
}

case $1 in
# get pre-requisites
prereqs)
	prereqs
	exit 0
	;;
esac

. /scripts/casper-functions
load_confmodule

log_begin_msg "$DESCRIPTION"

if [ -e /preseed.cfg ]; then
	casper-set-selections /preseed.cfg
fi

network_started=

start_network () {
	[ -z "$network_started" ] || return
	[ -z "$NETBOOT" ] || return

	mount -n -o bind /sys /root/sys
	mount -n -o bind /proc /root/proc
	mount -n -o bind /dev /root/dev
	mkdir -p /root/var/run/network
	# Close inherited fd's to prevent debconf-communicate from
	# continuing to run post-casper.
	chroot /root dhclient eth0 3>&- 4<&-

	network_started=1
}

stop_network () {
	[ "$network_started" ] || return

	chroot /root ifconfig eth0 down
	umount /root/sys
	umount /root/proc
	umount /root/dev
}

locations=
for x in $(cat /proc/cmdline); do
	case $x in
		preseed/file=*)
			locations="${x#preseed/file=} $locations"
			;;
		file=*)
			locations="${x#file=} $locations"
			;;
		url=*)
			url_location="${x#url=}"
			start_network
			chroot /root wget -P /tmp "$url_location"
			locations="/tmp/$(basename "$url_location") $locations"
			;;
		*/*\?=*)
			question="${x%%\?=*}"
			value="${x#*\?=}"
			casper-preseed /root "$question" "$value" false
			;;
		*/*=*)
			question="${x%%=*}"
			value="${x#*=}"
			casper-preseed /root "$question" "$value"
			;;
		debian-installer/locale=*|locale=*)
			value="${x#*=}"
			value="$(grep "^$value" /root/usr/share/i18n/SUPPORTED | grep UTF-8 | sed -e 's, .*,,' -e q)"
			casper-preseed /root debian-installer/locale "$value"
			;;
	esac
done

if [ "$locations" ]; then
	for item in $locations; do
		casper-set-selections "/root$item"
	done
fi

if db_get preseed/early_command && [ "$RET" ]; then
	EARLY="$RET"
	if db_get preseed/allow-network && [ "$RET" = true ]; then
		start_network
	fi
	DEBIAN_HAS_FRONTEND= DEBCONF_REDIR= \
	DEBIAN_FRONTEND=noninteractive \
	sh -c "$EARLY"
fi

stop_network

# Clear out debconf database backup files to save memory.
rm -f /root/var/cache/debconf/*.dat-old

log_end_msg

exit 0