This file is indexed.

/usr/share/initramfs-tools/scripts/local-bottom/lupin_setup is in lupin-support 0.57build1.

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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
#!/bin/sh -e

case "$1" in
	prereqs)
		exit 0
		;;
esac

preseed=
diskimage=false
for x in $(cat /proc/cmdline); do
	case $x in
		preseed/file=*)
			preseed="${x#preseed/file=}"
			;;
		wubi-diskimage)
			diskimage=:
			;;
	esac
done

$diskimage || exit 0
[ -z "$preseed" ] && exit 1

if [ -x /bin/plymouth ] && plymouth --ping; then
	plymouth message --text="Preparing to run Ubuntu for the first time..."
fi

chroot /root mount -o remount,rw /
# All needed for update-grub
chroot /root mount -t proc proc /proc
chroot /root mount -t sysfs sysfs /sys
chroot /root mount -t devtmpfs devtmpfs /dev
chroot /root debconf-set-selections < /root/host/$preseed

get_debconf() {
	var=$(echo "GET $1" | chroot /root debconf-communicate | cut -d' ' -f2)
	echo $var
}

cslayout="$(get_debconf "keyboard-configuration/layoutcode")"
csvariant="$(get_debconf "keyboard-configuration/variantcode")"
csmodel=
csoptions=

# TODO: This is horribly cloned from casper; keep it in sync.
# TODO: This is a horrible clone-and-hack from console-setup. We should
# definitely be calling console-setup instead; however, that's too risky for
# 8.04 since it will need careful installer testing and will probably be
# slower.
adjust_console_setup () {
        if [ -z "$csmodel" ]; then
                if [ "$cslayout" = br ]; then
                        csmodel=abnt2
                elif [ "$cslayout" = jp ]; then
                        csmodel=jp106
                fi
        fi

        latin=
        case $cslayout in
                jp)
                        case $csvariant in
                                ''|106|common|OADG109A|nicola_f_bs)
                                        latin=yes
                                        ;;
                                *)
                                        latin=no
                                        cslayout=jp,jp
                                        csvariant="106,$csvariant"
                                        ;;
                        esac
                        ;;
                lt)
                        latin=no
                        cslayout=lt,lt
                        case $csvariant in
                                us)
                                        csvariant=us,
                                        ;;
                                *)
                                        csvariant="$csvariant,us"
                                        ;;
                        esac
                        ;;
                me)
                        case $csvariant in
                                ''|basic|latin*)
                                        latin=yes
                                        ;;
                                cyrillicyz)
                                        latin=no
                                        cslayout=me,me
                                        csvariant="latinyz,$csvariant"
                                        ;;
                                cyrillicalternatequotes)
                                        latin=no
                                        cslayout=me,me
                                        csvariant="latinalternatequotes,$csvariant"
                                        ;;
                                *)
                                        latin=no
                                        cslayout=me,me
                                        csvariant="basic,$csvariant"
                                        ;;
                        esac
                        ;;
                rs)
                        case $csvariant in
                                ''|basic|latin*)
                                        latin=yes
                                        ;;
                                yz)
                                        latin=no
                                        cslayout=rs,rs
                                        csvariant="latinyz,$csvariant"
                                        ;;
                                alternatequotes)
                                        latin=no
                                        cslayout=rs,rs
                                        csvariant="latinalternatequotes,$csvariant"
                                        ;;
                                *)
                                        latin=no
                                        cslayout=rs,rs
                                        csvariant="latin,$csvariant"
                                        ;;
                        esac
                        ;;
                am|ara|ben|bd|bg|bt|by|deva|ge|gh|gr|guj|guru|il|in|ir|iku|kan|kh|la|lao|lk|mk|mm|mn|mv|mal|ori|pk|ru|scc|sy|syr|tel|th|tj|tam|ua|uz)
                        latin=no
                        cslayout="us,$cslayout"
                        csvariant=",$csvariant"
                        ;;
                *)
                        latin=yes
        esac

        if [ "$latin" = no ]; then
                csoptions="${csoptions:+$csoptions,}grp:alt_shift_toggle"
        fi
        if [ "$cslayout" != us ] || [ "$csvariant" ]; then
                csoptions="${csoptions:+$csoptions,}lv3:ralt_switch"
        fi
}

# First user
chroot /root /usr/lib/user-setup/user-setup-apply > /dev/null

# Locale
locale="$(get_debconf "debian-installer/locale")"
printf 'LANG="%s"\n' "$locale" >> /root/etc/default/locale
printf 'LANG="%s"\n' "$locale" >> /root/etc/environment
chroot /root /usr/sbin/locale-gen "$locale" || true
if ! echo "$locale" | grep -qs '^en_'; then
	cp /root/usr/share/language-support/incomplete-language-support-*.note \
		/root/var/lib/update-notifier/user.d/
fi

# Timezone
zone="$(get_debconf "time/zone")"
echo "$zone" > /root/etc/timezone
rm -f /root/etc/localtime
cp -f /root/usr/share/zoneinfo/$zone /root/etc/localtime
# We skip setting the clock via NTP for now. It's time consuming, unlikely to
# work given the lack of networking in the initramfs :), and the clock being
# set to the same time as Windows isn't a bad thing.
utc="$(get_debconf "clock-setup/utc")"
rcsfile=/root/etc/default/rcS
if [ "$utc" = true ]; then
	sed -i -e 's:^UTC="no":UTC="yes":' -e 's:^UTC=no:UTC=yes:' $rcsfile
	if [ -e /root/etc/adjtime ]; then
		sed -i -e 's:^LOCAL$:UTC:' /root/etc/adjtime
	fi
else
	sed -i -e 's:^UTC="yes":UTC="no":' -e 's:^UTC=yes:UTC=no:' $rcsfile
	if [ -e /root/etc/adjtime ]; then
		sed -i -e 's:^UTC$:LOCAL:' /root/etc/adjtime
	fi
fi

adjust_console_setup

CONFIGFILE=/etc/default/keyboard
chroot /root sed -i "s/^XKBLAYOUT=.*/XKBLAYOUT=\"$cslayout\"/" "$CONFIGFILE"
if [ "$csvariant" ]; then
	chroot /root sed -i "s/^XKBVARIANT=.*/XKBVARIANT=\"$csvariant\"/" \
		"$CONFIGFILE"
fi
if [ "$csmodel" ]; then
	chroot /root sed -i "s/^XKBMODEL=.*/XKBMODEL=\"$csmodel\"/" \
		"$CONFIGFILE"
fi
if [ "$csoptions" ]; then
	chroot /root sed -i "s/^XKBOPTIONS=.*/XKBOPTIONS=\"$csoptions\"/" \
		"$CONFIGFILE"
fi
chroot /root dpkg-reconfigure -fnoninteractive console-setup

# Hostname

HOST="$(get_debconf "netcfg/get_hostname")"
echo "$HOST" > /root/etc/hostname
cat > /root/etc/hosts <<EOF
127.0.0.1 localhost
127.0.1.1 $HOST

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

EOF
hostname "$HOST"

# Generate proper grub.cfg
chroot /root update-grub

# Make swap space.
SWAP="/host/ubuntu/disks/swap.disk"
if ! grep -qs "$SWAP" /root/etc/fstab; then
	chroot /root mkswap "$SWAP"
	echo "$SWAP	none	swap	sw	0	0" >> /root/etc/fstab
	chroot /root swapon "$SWAP"
fi

chroot /root umount /proc
chroot /root umount /sys
chroot /root umount /dev
chroot /root mount -o remount,ro /