File: newvserver-locale.diff

package info (click to toggle)
vserver-debiantools 0.7.2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 212 kB
  • ctags: 24
  • sloc: sh: 1,609; makefile: 90
file content (23 lines) | stat: -rw-r--r-- 759 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--- newvserver.old	2006-07-18 00:54:00.000000000 +0200
+++ newvserver	2006-08-18 21:59:06.000000000 +0200
@@ -401,9 +401,9 @@
 # Create a locale.gen if needed.
 if [ -n "$LANG" ] && [ "$LANG" != "C" ] ; then
     if [ ! -e "$VROOTDIR/$VHOST/etc/locale.gen" ] ; then
-	echo $LANG > "$VROOTDIR/$VHOST/etc/locale.gen"
+	echo $LANG $(locale charmap) > "$VROOTDIR/$VHOST/etc/locale.gen"
     elif ! grep $LANG "$VROOTDIR/$VHOST/etc/locale.gen" > /dev/null ; then
-	echo $LANG >> "$VROOTDIR/$VHOST/etc/locale.gen"
+	echo $LANG $(locale charmap) >> "$VROOTDIR/$VHOST/etc/locale.gen"
     fi
 fi
 
@@ -536,6 +536,8 @@
 cat << EOF > "$VROOTDIR/$VHOST/vserver-config.sh"
 #!/bin/sh
 
+[ -x /usr/sbin/locale-gen ] && /usr/sbin/locale-gen
+
 dselect update
 
 tzsetup -y