diff options
Diffstat (limited to 'initcpio')
-rw-r--r-- | initcpio/hook/paccache | 11 | ||||
-rw-r--r-- | initcpio/install/paccache | 9 |
2 files changed, 20 insertions, 0 deletions
diff --git a/initcpio/hook/paccache b/initcpio/hook/paccache new file mode 100644 index 0000000..8aa2fc0 --- /dev/null +++ b/initcpio/hook/paccache @@ -0,0 +1,11 @@ +#!/bin/sh + +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 + fi +} diff --git a/initcpio/install/paccache b/initcpio/install/paccache new file mode 100644 index 0000000..1cb06a4 --- /dev/null +++ b/initcpio/install/paccache @@ -0,0 +1,9 @@ +#!/bin/sh + +build() { + add_runscript +} + +help() { + echo "This hook adds Server to pacredir.conf from inside initramfs." +} |