Package: vserver-debiantools
Severity: minor
Tags: patch

Hi,

the newvserver script creates /etc/locale.gen in the guest system
based on the current locale. The format of the file is wrong.

e.g. my current locale says LANG=cs_CZ.UTF-8, the script wrote
cs_CZ.UTF-8
to the /etc/locale.gen, but the correct entry should look like
cs_CZ.UTF-8 UTF-8

That of course causes the locale-gen script to fail. I suggest to just
copy /etc/locale.gen from the host system, or be more careful when
generating the file. Maybe replacing

  echo $LANG >> "$VROOTDIR/$VHOST/etc/locale.gen"
 
with something like this:

  echo $LANG $(locale charmap) >> ...

would be enough.


Later when you are creating one-time configuration script
vserver-config.sh, it might be interesting to add there locale-gen as
a first command, so the rest of the setup could be done in your
preferred language:

  cat << EOF > "$VROOTDIR/$VHOST/vserver-config.sh"
  #!/bin/sh

  [ -x /usr/sbin/locale-gen ] && /usr/sbin/locale-gen

  dselect update
  tzsetup -y
  ...

As a side effect you will get rid of *tons* of warnings about
unsupported locale.

-- 
Miroslav Kure


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to