From a4ff597ded031ad9139ef74059adf6f2c389acf5 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 5 Nov 2013 22:28:20 +0100 Subject: make initcpio hook aware of architectures --- initcpio/hook/paccache | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/initcpio/hook/paccache b/initcpio/hook/paccache index 8aa2fc0..eaf3484 100644 --- a/initcpio/hook/paccache +++ b/initcpio/hook/paccache @@ -3,9 +3,23 @@ run_latehook() { local newroot="/new_root/" - if [[ -n "${paccache}" ]]; then - msg ":: Adding paccache host '${paccache}' to pacredir.conf..." - echo "pacserve hosts = ${paccache}" >> ${newroot}/etc/pacredir.conf - echo "pacdbserve hosts = ${paccache}" >> ${newroot}/etc/pacredir.conf + if [[ -n "${pacserve}" ]]; then + msg ":: Adding pacserve host '${pacserve}' to pacredir.conf..." + echo "pacserve hosts = ${pacserve}" >> ${newroot}/etc/pacredir.conf fi + + case $(uname -m) in + x86_64) + if [[ -n "${pacdbserve_x86_64}" ]]; then + msg ":: Adding pacdbserve host '${pacdbserve_x86_64}' to pacredir.conf..." + echo "pacdbserve hosts = ${pacdbserve_x86_64}" >> ${newroot}/etc/pacredir.conf + fi + ;; + i686) + if [[ -n "${pacdbserve_i686}" ]]; then + msg ":: Adding pacdbserve host '${pacdbserve_i686}' to pacredir.conf..." + echo "pacdbserve hosts = ${pacdbserve_i686}" >> ${newroot}/etc/pacredir.conf + fi + ;; + esac } -- cgit v1.2.3-70-g09d2