[PATCH] Add option to disable use of GTK debian-installer
Hello,
I've created a patch to add the ability to disable use of the GTK graphical debian-installer. Folks may want to do this to reduce the size of their images or if the necessary files aren't available.
functions/defaults.sh | 24 ++++++++++++++++++++++++
helpers/lh_binary_debian-installer | 25 ++++++++++++++-----------
helpers/lh_config | 12 +++++++++++-
manpages/lh_config.en.1 | 4 ++++
4 files changed, 53 insertions(+), 12 deletions(-)
I've created a second patch, which I'll send in a separate e-mail, to check for the necessary d-i files before adding boot options for the text and/or GUI frontends.
Cheers,
--
Cody A.W. Somerville
Software Systems Release Engineer
Foundations Team
Custom Engineering Solutions Group
Canonical OEM Services
Phone: +1-781-850-2087
Cell: +1-506-471-8402
Email: cody.somerville@canonical.com
=== modified file 'functions/defaults.sh'
--- functions/defaults.sh 2009-08-18 10:09:50 +0000
+++ functions/defaults.sh 2009-08-28 09:02:39 +0000
@@ -734,6 +734,30 @@
# Setting debian-installer distribution
LH_DEBIAN_INSTALLER_DISTRIBUTION="${LH_DEBIAN_INSTALLER_DISTRIBUTION:-${LH_DISTRIBUTION}}"
+
+ # Toggle downloading of GTK debian-installer
+ case "${LH_MODE}" in
+ debian)
+ LH_DEBIAN_INSTALLER_GUI="${LH_DEBIAN_INSTALLER_GUI:-enabled}"
+ ;;
+
+ ubuntu)
+ case "${LH_DEBIAN_INSTALLER_DISTRIBUTION}" in
+ karmic)
+ # Not available for Karmic currently.
+ LH_DEBIAN_INSTALLER_GUI="${LH_DEBIAN_INSTALLER_GUI:-disabled}"
+ ;;
+
+ *)
+ LH_DEBIAN_INSTALLER_GUI="${LH_DEBIAN_INSTALLER_GUI:-enabled}"
+ ;;
+ esac
+ ;;
+
+ *)
+ LH_DEBIAN_INSTALLER_GUI="${LH_DEBIAN_INSTALLER_GUI:-disabled}"
+ ;;
+ esac
# Setting debian-installer preseed filename
if [ -z "${LH_DEBIAN_INSTALLER_PRESEEDFILE}" ]
=== modified file 'helpers/lh_binary_debian-installer'
--- helpers/lh_binary_debian-installer 2009-08-04 23:16:57 +0000
+++ helpers/lh_binary_debian-installer 2009-08-28 08:50:50 +0000
@@ -320,18 +320,21 @@
# Downloading graphical-installer
DOWNLOAD_GTK_INSTALLER=0
- case "${LH_ARCHITECTURE}" in
- amd64|i386|lpia)
- DOWNLOAD_GTK_INSTALLER=1
- ;;
-
- powerpc)
- if [ "${LH_DEBIAN_INSTALLER}" = "netboot" ]
- then
+ if [ "${LH_DEBIAN_INSTALLER_GUI}" = "enabled" ]
+ then
+ case "${LH_ARCHITECTURE}" in
+ amd64|i386|lpia)
DOWNLOAD_GTK_INSTALLER=1
- fi
- ;;
- esac
+ ;;
+
+ powerpc)
+ if [ "${LH_DEBIAN_INSTALLER}" = "netboot" ]
+ then
+ DOWNLOAD_GTK_INSTALLER=1
+ fi
+ ;;
+ esac
+ fi
if [ ${DOWNLOAD_GTK_INSTALLER} -eq 1 ]
then
=== modified file 'helpers/lh_config'
--- helpers/lh_config 2009-05-08 09:35:56 +0000
+++ helpers/lh_config 2009-08-28 08:49:10 +0000
@@ -62,6 +62,7 @@
\t [--debian-installer enabled|cdrom|netinst|netboot|businesscard|live|disabled]\n\
\t [--debian-installer-distribution CODENAME|daily]\n\
\t [--debian-installer-preseedfile FILE|URL]\n\
+\t [--debian-installer-gui enabled|disabled]\n\
\t [--debug]\n\
\t [-d|--distribution CODENAME]\n\
\t [--dump]\n\
@@ -138,7 +139,7 @@
hooks:,interactive:,keyring-packages:,language:,linux-flavours:,linux-packages:,
packages:,packages-lists:,tasks:,security:,symlinks:,sysvinit:,binary-filesystem:,binary-images:,
binary-indices:,bootappend-install:,bootappend-live:,bootloader:,checksums:,chroot-build:,
- debian-installer:,debian-installer-distribution:,debian-installer-preseedfile:,
+ debian-installer:,debian-installer-distribution:,debian-installer-preseedfile:,debian-installer-gui:,
encryption:,grub-splash:,hostname:,iso-application:,iso-preparer:,iso-publisher:,
iso-volume:,jffs2-eraseblock:,memtest:,net-root-filesystem:,net-root-mountoptions:,
net-root-path:,net-root-server:,net-cow-filesystem:,net-cow-mountoptions:,net-cow-path:,
@@ -544,6 +545,11 @@
shift 2
;;
+ --debian-installer-gui)
+ LH_DEBIAN_INSTALLER_GUI="${2}"
+ shift 2
+ ;;
+
-e|--encryption)
LH_ENCRYPTION="${2}"
shift 2
@@ -1095,6 +1101,10 @@
# (Default: ${LH_DEBIAN_INSTALLER_PRESEEDFILE})
LH_DEBIAN_INSTALLER_PRESEEDFILE="${LH_DEBIAN_INSTALLER_PRESEEDFILE}"
+# \$LH_DEBIAN_INSTALLER_GUI: toggle use of GUI debian-installer
+# (Default: ${LH_DEBIAN_INSTALLER_GUI})
+LH_DEBIAN_INSTALLER_GUI="${LH_DEBIAN_INSTALLER_GUI}"
+
# \$LH_ENCRYPTION: set encryption
# (Default: ${LH_ENCRYPTION})
LH_ENCRYPTION="${LH_ENCRYPTION}"
=== modified file 'manpages/lh_config.en.1'
--- manpages/lh_config.en.1 2009-06-28 13:08:36 +0000
+++ manpages/lh_config.en.1 2009-08-28 09:11:48 +0000
@@ -76,6 +76,8 @@
.br
[\fB\-\-debian\-installer\-preseedfile\fR \fIFILE\fR|\fIURL\fR]
.br
+ [\fB\-\-debian\-installer\-gui\fR enabled|disabled]
+.br
[\-d|\fB\-\-distribution\fR \fICODENAME\fR]
.br
[\-\-\fBdump\fR]
@@ -276,6 +278,8 @@
defines the distribution where the debian\-installer files should be taken out from. Normally, this should be set to the same distribution as the live system. However, some times, one wants to use a newer or even daily built installer.
.IP "\fB\-\-debian\-installer\-preseedfile\fR \fIFILE\fR|\fIURL\fR" 4
sets the filename or URL for an optionally used and included preseeding file for debian\-installer.
+.IP "\fB\-\-debian\-installer\-gui\fR enabled|disabled" 4
+defines if the debian\-installer graphical GTK interface should be enabled or not. In Debian mode and for most versions of Ubuntu, this option is enabled, whereas otherwise disabled, by default.
.IP "\-d|\fB\-\-distribution\fR \fICODENAME\fR" 4
defines the distribution of the resulting live system.
.IP "\-\-\fBdump\fR" 4
Reply to: