From a030cdc532269521eba07c57137760a969e788a4 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sun, 6 Nov 2011 10:27:55 +0100 Subject: mkarchroot: Respect makepkg.conf and pacman.conf when running a command --- mkarchroot.in | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/mkarchroot.in b/mkarchroot.in index 6238979..c35ba5b 100644 --- a/mkarchroot.in +++ b/mkarchroot.in @@ -129,6 +129,14 @@ copy_hostconf () { chroot "${working_dir}" /bin/findmnt -rnu -o SOURCE,TARGET,FSTYPE,OPTIONS > "${working_dir}/etc/mtab" cp /etc/resolv.conf "${working_dir}/etc/resolv.conf" echo "Server = ${host_mirror}" > ${working_dir}/etc/pacman.d/mirrorlist + + if [ "$pac_conf" != "" -a "$NOCOPY" = "n" ]; then + cp ${pac_conf} ${working_dir}/etc/pacman.conf + fi + + if [ "$makepkg_conf" != "" -a "$NOCOPY" = "n" ]; then + cp ${makepkg_conf} ${working_dir}/etc/makepkg.conf + fi } chroot_umount () { @@ -206,19 +214,13 @@ else ldconfig -r "${working_dir}" fi - if [ "$pac_conf" != "" -a "$NOCOPY" = "n" ]; then - cp ${pac_conf} ${working_dir}/etc/pacman.conf - fi - - if [ "$makepkg_conf" != "" -a "$NOCOPY" = "n" ]; then - cp ${makepkg_conf} ${working_dir}/etc/makepkg.conf - fi - if [ -e "${working_dir}/etc/locale.gen" ]; then sed -i 's@^#\(en_US\|de_DE\)\(\.UTF-8\)@\1\2@' "${working_dir}/etc/locale.gen" chroot "${working_dir}" /usr/sbin/locale-gen fi + copy_hostconf + if [ ! -e "${working_dir}/.arch-chroot" ]; then date +%s > "${working_dir}/.arch-chroot" fi -- cgit v1.2.3-70-g09d2