From 5733808c9c7a90dbeddfa154cb96061d971c3255 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Sun, 17 Nov 2013 21:46:21 +0100 Subject: make hook save for all shells --- initcpio/hook/paccache | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'initcpio/hook') diff --git a/initcpio/hook/paccache b/initcpio/hook/paccache index bd961ee..6e09419 100644 --- a/initcpio/hook/paccache +++ b/initcpio/hook/paccache @@ -3,9 +3,11 @@ run_latehook() { local newroot="/new_root/" - if ! grep -q '^pacserve hosts' ${newroot}/etc/pacredir.conf -a [[ -n "${pacserve}" ]]; then - msg ":: Adding pacserve host '${pacserve}' to pacredir.conf..." - echo "pacserve hosts = ${pacserve}" >> ${newroot}/etc/pacredir.conf + if ! grep -q '^pacserve hosts' ${newroot}/etc/pacredir.conf; then + if [[ -n "${pacserve}" ]]; then + msg ":: Adding pacserve host '${pacserve}' to pacredir.conf..." + echo "pacserve hosts = ${pacserve}" >> ${newroot}/etc/pacredir.conf + fi fi if ! grep -q '^pacdbserve hosts' ${newroot}/etc/pacredir.conf; then -- cgit v1.2.3-70-g09d2