Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
063537f6
Commit
063537f6
authored
Jul 01, 2015
by
有张纸
Committed by
Stéphane Graber
Aug 13, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debian template: reconfigure locales
Signed-off-by:
feng xiahou
<
xiahoufeng@yahoo.com
>
parent
659e807c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
16 deletions
+19
-16
lxc-debian.in
templates/lxc-debian.in
+19
-16
No files found.
templates/lxc-debian.in
View file @
063537f6
...
@@ -97,22 +97,6 @@ $hostname
...
@@ -97,22 +97,6 @@ $hostname
EOF
EOF
# reconfigure some services
# reconfigure some services
if
[
-z
"
$LANG
"
]
;
then
cat
>>
$rootfs
/etc/locale.gen
<<
EOF
en_US.UTF-8 UTF-8
EOF
chroot
$rootfs
locale-gen en_US.UTF-8 UTF-8
chroot
$rootfs
update-locale
LANG
=
en_US.UTF-8
else
encoding
=
$(
echo
$LANG
|
cut
-d
.
-f2
)
chroot
$rootfs
sed
-e
"s/^#
\(
${
LANG
}
${
encoding
}
\)
/
\1
/"
\
-i
/etc/locale.gen 2> /dev/null
cat
>>
$rootfs
/etc/locale.gen
<<
EOF
$LANG
$encoding
EOF
chroot
$rootfs
locale-gen
$LANG
$encoding
chroot
$rootfs
update-locale
LANG
=
$LANG
fi
# remove pointless services in a container
# remove pointless services in a container
chroot
$rootfs
/usr/sbin/update-rc.d
-f
checkroot.sh disable
chroot
$rootfs
/usr/sbin/update-rc.d
-f
checkroot.sh disable
...
@@ -409,6 +393,25 @@ EOF
...
@@ -409,6 +393,25 @@ EOF
# Re-enable service startup
# Re-enable service startup
rm
${
rootfs
}
/usr/sbin/policy-rc.d
rm
${
rootfs
}
/usr/sbin/policy-rc.d
# reconfigure locales
if
[
-z
"
$LANG
"
]
;
then
cat
>>
$rootfs
/etc/locale.gen
<<
EOF
en_US.UTF-8 UTF-8
EOF
chroot
$rootfs
locale-gen en_US.UTF-8 UTF-8
chroot
$rootfs
update-locale
LANG
=
en_US.UTF-8
else
encoding
=
$(
echo
$LANG
|
cut
-d
.
-f2
)
chroot
$rootfs
sed
-e
"s/^#
\(
${
LANG
}
${
encoding
}
\)
/
\1
/"
\
-i
/etc/locale.gen 2> /dev/null
cat
>>
$rootfs
/etc/locale.gen
<<
EOF
$LANG
$encoding
EOF
chroot
$rootfs
locale-gen
$LANG
$encoding
chroot
$rootfs
update-locale
LANG
=
$LANG
fi
# end
}
}
clean
()
clean
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment