Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/configs/releng/airootfs/etc/pacman.d/hooks
diff options
context:
space:
mode:
authornl6720 <nl6720@gmail.com>2021-01-24 17:29:01 +0200
committernl6720 <nl6720@gmail.com>2021-01-27 00:07:45 +0200
commit4f4047a3f8927e58d79e396bdd032b9c24bd1f19 (patch)
tree8c0573825bb427f47380a73570533f27a6a132a0 /configs/releng/airootfs/etc/pacman.d/hooks
parenta2c8dd31731916600c5e4eb6b7d08a8ff9e287d3 (diff)
configs/releng: move the mirror uncommenting sed command from customize_airootfs.sh to a pacman hook
After pacman-mirrorlist is installed, /etc/pacman.d/hooks/uncomment-mirrors.hook will run a sed command which uncomments all Server lines in /etc/pacman.d/mirrorlist. This brings us another step closer to the complete removal of customize_airootfs.sh. Related to https://gitlab.archlinux.org/archlinux/archiso/-/issues/21 .
Diffstat (limited to 'configs/releng/airootfs/etc/pacman.d/hooks')
-rw-r--r--configs/releng/airootfs/etc/pacman.d/hooks/uncomment-mirrors.hook12
1 files changed, 12 insertions, 0 deletions
diff --git a/configs/releng/airootfs/etc/pacman.d/hooks/uncomment-mirrors.hook b/configs/releng/airootfs/etc/pacman.d/hooks/uncomment-mirrors.hook
new file mode 100644
index 0000000..ad0b5ba
--- /dev/null
+++ b/configs/releng/airootfs/etc/pacman.d/hooks/uncomment-mirrors.hook
@@ -0,0 +1,12 @@
+[Trigger]
+Operation = Install
+Operation = Upgrade
+Type = Package
+Target = pacman-mirrorlist
+
+[Action]
+Description = Uncommenting all mirrors in /etc/pacman.d/mirrorlist...
+When = PostTransaction
+Depends = pacman-mirrorlist
+Depends = sed
+Exec = /usr/bin/sed -i "s/#Server/Server/g" /etc/pacman.d/mirrorlist