summaryrefslogtreecommitdiffstats
path: root/initcpio/hook
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2013-11-05 22:28:20 +0100
committerGravatar Christian Hesse <mail@eworm.de>2013-11-05 22:28:20 +0100
commita4ff597ded031ad9139ef74059adf6f2c389acf5 (patch)
treebea8ef8b106f9f3313d787f301bfa1adbaf5175f /initcpio/hook
parentf3c18c3468c83bb419e70fa854eac7f669960d1c (diff)
downloadpacredir-a4ff597ded031ad9139ef74059adf6f2c389acf5.tar.gz
pacredir-a4ff597ded031ad9139ef74059adf6f2c389acf5.tar.zst
make initcpio hook aware of architectures
Diffstat (limited to 'initcpio/hook')
-rw-r--r--initcpio/hook/paccache22
1 files 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
}