3
# Install files in /install and some in /doc
6
# The location of the tree for CD#1, passed in
9
if [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then
12
if [ -n "$BOOTDISKS" -a -e $BOOTDISKS/current/$DOCDIR ] ; then
13
DOCS=$BOOTDISKS/current/$DOCDIR
14
elif MANUALDEB="$($BASEDIR/tools/apt-selection cache show "installation-guide-$ARCH")"; then
15
MANUALDEB="$(echo "$MANUALDEB" | grep ^Filename | awk '{print $2}')"
17
echo "WARNING: Using $DI_CODENAME bootdisk documentation"
18
DOCS=$MIRROR/dists/$DI_CODENAME/main/installer-$ARCH/current/$DOCDIR
21
# Put the install documentation in /doc/install
22
if [ "$DOCS" ] && [ -d "$DOCS" ]; then
24
mkdir -p $DIR/$DOCDIR/install
25
if ! cp -a * $DIR/$DOCDIR/install; then
26
echo "ERROR: Unable to copy installer documentation to CD."
28
elif [ "$MANUALDEB" ]; then
29
mkdir -p "$DIR/$DOCDIR/install/tmp" "$DIR/$DOCDIR/install/manual"
30
dpkg -x "$MIRROR/$MANUALDEB" "$DIR/$DOCDIR/install/tmp"
31
mv "$DIR/$DOCDIR/install/tmp/usr/share/doc/installation-guide-$ARCH"/* "$DIR/$DOCDIR/install/manual/"
32
rm -rf "$DIR/$DOCDIR/install/tmp"
33
# just keep the HTML version
34
rm -f "$DIR/$DOCDIR/install/manual/copyright" \
35
"$DIR/$DOCDIR/install/manual/changelog.gz" \
36
"$DIR/$DOCDIR/install/manual"/*/install.*.pdf* \
37
"$DIR/$DOCDIR/install/manual"/*/install.*.txt*
39
echo "ERROR: Unable to copy installer documentation to CD."
43
# Preseed files for special install types
45
PRESEED_ROOT=$BASEDIR/data/$CODENAME/preseed
47
$PRESEED_ROOT $PRESEED_ROOT/$ARCH \
48
$PRESEED_ROOT/$PROJECT $PRESEED_ROOT/$PROJECT/$ARCH; do
49
[ -d "$preseed_dir" ] || continue
50
for file in $preseed_dir/*.seed; do
51
cp -a "$file" $DIR/preseed/
54
if [ "$CDIMAGE_DVD" = 1 ] && [ "$PROJECT" != ubuntu-server ]; then
55
# include server on normal DVDs
57
$PRESEED_ROOT/ubuntu-server $PRESEED_ROOT/ubuntu-server/$ARCH; do
58
[ -d "$preseed_dir" ] || continue
59
for file in $preseed_dir/*.seed; do
60
cp -a "$file" $DIR/preseed/
63
# we normally preseed tasksel to install the desktop task, but this is
64
# inappropriate on DVDs where much more choice is available
65
if [ -e "$DIR/preseed/$PROJECT.seed" ]; then
67
if (/^#/) { $out .= $_ }
68
elsif (m[^tasksel\s+tasksel/first\s]) { print $out; print; print "tasksel\ttasksel/first\tseen false\n"; $out = "" }
69
else { print $out; print; $out = "" }' \
70
"$DIR/preseed/$PROJECT.seed"
71
if [ ! -s "$DIR/preseed/$PROJECT.seed" ]; then
72
rm -f "$DIR/preseed/$PROJECT.seed"
76
# On live CDs, remove preseed/early_command settings that use the debconf
77
# confmodule. Live CDs implement preseed/early_command in casper which
78
# doesn't have the confmodule available.
79
if [ "$CDIMAGE_LIVE" = 1 ]; then
80
for file in $DIR/preseed/*.seed; do
81
[ -f "$file" ] || continue
82
sed -i '/preseed\/early_command.*confmodule/d' "$file"
86
if [ "$BACKPORT_KERNEL" ]; then
89
amd64|i386|arm64|ppc64el|s390x)
90
for file in *.seed; do
91
[ -f "$file" ] || continue
92
cp "$file" hwe-"$file"
93
if grep -q base-installer/kernel/override-image "$file"; then
94
sed -i -e "s/string linux-virtual/string linux-virtual-$BACKPORT_KERNEL/" hwe-"$file"
95
elif ! grep -q base-installer/kernel/altmeta "$file"; then
96
echo "d-i base-installer/kernel/altmeta string $BACKPORT_KERNEL" >> hwe-"$file"
98
[ "$PROJECT" = "ubuntu-server" ] || mv hwe-"$file" "$file"