[mkchroot/mkiso] add -L switch for livecd-image

This commit is contained in:
Philip 2015-01-20 21:51:03 +01:00
parent 7b61ab137e
commit 89b0396159
2 changed files with 8 additions and 7 deletions

View file

@ -88,12 +88,6 @@ if ${build_locales};then
printf '%s.UTF-8 UTF-8\n en_US.UTF-8 UTF-8\n de_DE.UTF-8 UTF-8\n' > "$working_dir/etc/locale.gen"
echo 'LANG=en_US.UTF-8' > "$working_dir/etc/locale.conf"
echo 'LC_MESSAGES=C' >> "$working_dir/etc/locale.conf"
else
# this is the buildiso case
# is this correct or do we want iso default to standard locales?
sed -e 's|#en_US.UTF-8 UTF-8|en_US.UTF-8 UTF-8|' -i "$working_dir/etc/locale.gen"
echo 'LANG=en_US.UTF-8' > "$working_dir/etc/locale.conf"
echo 'LC_MESSAGES=C' >> "$working_dir/etc/locale.conf"
fi
exec chroot-run \

View file

@ -148,16 +148,23 @@ clean_up(){
}
_mkchroot(){
#set locale.gen
if [ "${IMAGE_FOLDER}" == "livecd-image" ]; then
LOCALE="-L"
fi
#local ret
if "${QUIET}"; then
setarch "${ARCH}" \
mkchroot -C ${PACCONFIG} \
-S ${MIRRORS} \
${LOCALE} \
"${work_dir}/${IMAGE_FOLDER}" $@ &> /dev/null || die "Failed to retrieve one or more packages!"
else
setarch "${ARCH}" \
mkchroot -C ${PACCONFIG} \
-S ${MIRRORS} \
${LOCALE} \
"${work_dir}/${IMAGE_FOLDER}" $@ || die "Failed to retrieve one or more packages!"
fi
@ -165,7 +172,7 @@ _mkchroot(){
# cp ${work_dir}/root-image/etc/locale.gen ${work_dir}/root-image/etc/locale.gen.bak
# fi
# Cleanup
# Cleanup
find "${work_dir}" -name *.pacnew -name *.pacsave -name *.pacorig -delete
}