From 415d00ac46e744dbfc512c047c69c07b62431403 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 27 May 2016 10:32:38 +0200 Subject: rename hook -> hooks --- Makefile | 2 +- initcpio/hook/paccache | 29 ----------------------------- initcpio/hooks/paccache | 29 +++++++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 30 deletions(-) delete mode 100644 initcpio/hook/paccache create mode 100644 initcpio/hooks/paccache diff --git a/Makefile b/Makefile index 30dc255..4ceaa2d 100644 --- a/Makefile +++ b/Makefile @@ -60,7 +60,7 @@ install-bin: pacredir $(INSTALL) -D -m0644 systemd/pacserve.service $(DESTDIR)$(PREFIX)/lib/systemd/system/pacserve.service $(INSTALL) -D -m0644 systemd/pacdbserve.service $(DESTDIR)$(PREFIX)/lib/systemd/system/pacdbserve.service $(INSTALL) -D -m0644 systemd/pacredir.service $(DESTDIR)$(PREFIX)/lib/systemd/system/pacredir.service - $(INSTALL) -D -m0644 initcpio/hook/paccache $(DESTDIR)$(PREFIX)/lib/initcpio/hooks/paccache + $(INSTALL) -D -m0644 initcpio/hooks/paccache $(DESTDIR)$(PREFIX)/lib/initcpio/hooks/paccache $(INSTALL) -D -m0644 initcpio/install/paccache $(DESTDIR)$(PREFIX)/lib/initcpio/install/paccache $(INSTALL) -D -m0644 dhcpcd/80-pacredir $(DESTDIR)$(PREFIX)/lib/dhcpcd/dhcpcd-hooks/80-pacredir $(INSTALL) -D -m0755 networkmanager/80-pacredir $(DESTDIR)/etc/NetworkManager/dispatcher.d/80-pacredir diff --git a/initcpio/hook/paccache b/initcpio/hook/paccache deleted file mode 100644 index 6e09419..0000000 --- a/initcpio/hook/paccache +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -run_latehook() { - local newroot="/new_root/" - - 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 - 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 - fi -} diff --git a/initcpio/hooks/paccache b/initcpio/hooks/paccache new file mode 100644 index 0000000..6e09419 --- /dev/null +++ b/initcpio/hooks/paccache @@ -0,0 +1,29 @@ +#!/bin/sh + +run_latehook() { + local newroot="/new_root/" + + 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 + 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 + fi +} -- cgit v1.2.3-54-g00ecf