Re: not asking for a language
In-Reply-To=<[🔎] 20040907140021.GJ6501@mykerinos.kheops.frmug.org>
References: <[🔎] 20040907102040.GK10690@dira.dyndns.org>, <[🔎] 20040907140021.GJ6501@mykerinos.kheops.frmug.org>
On Tue, 7 Sep 2004 16:00:21 +0200, Christian Perrier wrote:
> Quoting Tzafrir Cohen (tzafrir@technion.ac.il):
> > Hi
> >
> > I want to build a custom installer CD that will contain some extra
> > packages and will install them. The installer should ask the least
> > possible questions. Specifically I would like to
> >
> > 1. avoid asking about the language, and
> > 2. ask about country later in the installation , just before asking
> > about the timezone.
> >
> > Is it possible to do (1) without changing existing file on the initrd
> > (or adding a script that will change them at runtime)?
>
> http://wiki.debian.net/index.cgi?DebianInstallerPreseed
>
> 1) needs editing the syslinux.cfg
I tried adding
debconf/priority=critical languagechooser/language-name=English
to the defaults in isolinux/isolinux.cfg . I still got the question.
So I figured I'd try to edit /usr/bin/languagechooser in the initrd.
Basically: check first if the language is defined before asking for a
language. This works. Only now I get a question about a country, and I
have no idea how to avoid it.
Below is the patch with my exact modification.
--- debian-installer/packages/languagechooser/languagechooser 2004-09-01 10:39:47.000000000 +0300
+++ rd_copy/usr/bin/languagechooser 2004-09-07 16:50:11.000000000 +0300
@@ -26,26 +26,31 @@
db_set debconf/language C
fi
-db_input critical "languagechooser/language-name" || [ $? -eq 30 ]
-if db_go; then
- db_get "languagechooser/language-name"
- if test "$RET" ; then
- LANGNAME="$RET"
- . languagemap
- db_set "$languagecode" "$LANGUAGELIST"
- db_set "$localecode" "$LOCALE"
- db_set "$fallbacklocalecode" "$FALLBACKLOCALE"
- # For "remembering" which locale is set by languagechooser
- db_set "$languagechooserlocalecode" "$LOCALE"
- db_set "$countrycode" "$COUNTRY"
- db_set "$consoledisplay" "$CONSOLE"
+db_get "languagechooser/language-name"
+if test "$RET" ; then
+ LANGNAME="$RET"
+else
+ db_input critical "languagechooser/language-name" || [ $? -eq 30 ]
+ if db_go; then
+ db_get "languagechooser/language-name"
+ if test "$RET" ; then
+ LANGNAME="$RET"
+ fi
else
- # Error, not sure how to handle it
- :
+ # Error, not sure how to handle it
+ :
fi
-else
- # Error, not sure how to handle it
- :
+fi
+
+if test "$LANGNAME"; then
+ . languagemap
+ db_set "$languagecode" "$LANGUAGELIST"
+ db_set "$localecode" "$LOCALE"
+ db_set "$fallbacklocalecode" "$FALLBACKLOCALE"
+ # For "remembering" which locale is set by languagechooser
+ db_set "$languagechooserlocalecode" "$LOCALE"
+ db_set "$countrycode" "$COUNTRY"
+ db_set "$consoledisplay" "$CONSOLE"
fi
db_get "$languagecode"
>
> 2) is not possible
How much do I have to change to make it possible? Where?
--
Tzafrir
Reply to: