-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathkickseed-anna
executable file
·54 lines (45 loc) · 1.77 KB
/
kickseed-anna
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
#! /bin/sh
. /usr/share/debconf/confmodule
# Back up anna's state.
standard_modules_backup=true
if db_get anna/standard_modules; then
standard_modules_backup="$RET"
fi
if [ -f /var/lib/anna-install/queue ]; then
mv -f /var/lib/anna-install/queue /var/lib/anna-install/queue.backup
fi
# Don't do the usual installation of everything we can find.
db_set anna/standard_modules false
anna-install "$@"
# We only support specific retrievers here, because some of them are
# difficult to use properly at this stage, and not all of them make sense.
# For instance, the netboot initrd already has enough packages to retrieve
# Kickstart files from the network, and if you were using that initrd it's
# unlikely that you'd want to retrieve Kickstart files from a CD.
#
# Whatever way we do it, this is going to be a hideous layering violation.
# The only question is which layers we violate. We call postinsts manually
# to avoid leaving packages configured, which would confuse d-i later on.
export UDPKG_QUIET=y
if [ -x /var/lib/dpkg/info/load-cdrom.postinst ]; then
if [ ! -d /cdrom/dists ]; then
/lib/kickseed/kickseed-udpkg cdrom-detect
fi
/var/lib/dpkg/info/load-cdrom.postinst configure
elif [ -x /var/lib/dpkg/info/load-iso.postinst ]; then
if [ ! -d /cdrom/dists ]; then
/lib/kickseed/kickseed-udpkg iso-scan
fi
/var/lib/dpkg/info/load-iso.postinst configure
elif [ -x /var/lib/dpkg/info/load-media.postinst ]; then
/var/lib/dpkg/info/load-media.postinst configure
else
logger -t kickseed "No supported retriever found!"
exit 1
fi
# Put anna's state back the way it was, to allow d-i's normal run.
if [ -f /var/lib/anna-install/queue.backup ]; then
mv -f /var/lib/anna-install/queue.backup /var/lib/anna-install/queue
fi
db_set anna/standard_modules "$standard_modules_backup"
exit 0