Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2012-06-18 19:00:50 +0200
committerGerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>2012-06-24 21:47:07 -0300
commitd7e790df232041da3794cb04d8822fb286757fc5 (patch)
treec4b9a32c51314ee525454c5cc94456f7bec4588d
parentdd368b5a81e42d0e68faab9e4debe02fbae03cae (diff)
Initialize pacman keyring on bootup
This will allow users to install packages within the live environment. We use the haveged daemon to increase entropy from CPU timings. See http://www.issihosts.com/haveged/ for details. Signed-off-by: Pierre Schmitz <pierre@archlinux.de> Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
-rw-r--r--configs/releng/packages.i6861
-rw-r--r--configs/releng/packages.x86_641
-rw-r--r--configs/releng/root-image/etc/rc.conf2
-rwxr-xr-xconfigs/releng/root-image/etc/rc.d/pacman-init34
4 files changed, 37 insertions, 1 deletions
diff --git a/configs/releng/packages.i686 b/configs/releng/packages.i686
index 4e29737..6012e7c 100644
--- a/configs/releng/packages.i686
+++ b/configs/releng/packages.i686
@@ -14,6 +14,7 @@ efibootmgr
elinks
gnu-netcat
gptfdisk
+haveged
hdparm
ipw2100-fw
ipw2200-fw
diff --git a/configs/releng/packages.x86_64 b/configs/releng/packages.x86_64
index 4e29737..6012e7c 100644
--- a/configs/releng/packages.x86_64
+++ b/configs/releng/packages.x86_64
@@ -14,6 +14,7 @@ efibootmgr
elinks
gnu-netcat
gptfdisk
+haveged
hdparm
ipw2100-fw
ipw2200-fw
diff --git a/configs/releng/root-image/etc/rc.conf b/configs/releng/root-image/etc/rc.conf
index 6a640f5..d8dedec 100644
--- a/configs/releng/root-image/etc/rc.conf
+++ b/configs/releng/root-image/etc/rc.conf
@@ -30,4 +30,4 @@ USELVM="no"
HOSTNAME="archiso"
-DAEMONS=(hwclock syslog-ng)
+DAEMONS=(hwclock syslog-ng haveged pacman-init)
diff --git a/configs/releng/root-image/etc/rc.d/pacman-init b/configs/releng/root-image/etc/rc.d/pacman-init
new file mode 100755
index 0000000..bbbd719
--- /dev/null
+++ b/configs/releng/root-image/etc/rc.d/pacman-init
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+ stat_busy "Initializing pacman keyring"
+ if { pacman-key --init && pacman-key --populate archlinux; } &>/dev/null; then
+ add_daemon pacman-init
+ stat_done
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+
+ stop)
+ stat_busy "Removing pacman keyring"
+ rm -rf /etc/pacman.d/gnupg
+ rm_daemon pacman-init
+ stat_done
+ ;;
+
+ restart)
+ $0 stop
+ $0 start
+ ;;
+
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+
+exit 0