diff options
author | Christian Hesse <mail@eworm.de> | 2013-11-17 21:46:21 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2013-11-17 21:46:21 +0100 |
commit | 5733808c9c7a90dbeddfa154cb96061d971c3255 (patch) | |
tree | 4533b75692fcf42a64af7317ad5f30d822b39e7e /initcpio/hook | |
parent | 5c4409a9f2dd0a26dc706898887e7dcdbe7f9ab4 (diff) | |
download | pacredir-5733808c9c7a90dbeddfa154cb96061d971c3255.tar.gz pacredir-5733808c9c7a90dbeddfa154cb96061d971c3255.tar.zst |
make hook save for all shells
Diffstat (limited to 'initcpio/hook')
-rw-r--r-- | initcpio/hook/paccache | 8 |
1 files changed, 5 insertions, 3 deletions
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 |