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>
This commit is contained in:
Pierre Schmitz 2012-06-18 19:00:50 +02:00 committed by Gerardo Exequiel Pozzi
parent dd368b5a81
commit d7e790df23
4 changed files with 37 additions and 1 deletions

View File

@ -14,6 +14,7 @@ efibootmgr
elinks
gnu-netcat
gptfdisk
haveged
hdparm
ipw2100-fw
ipw2200-fw

View File

@ -14,6 +14,7 @@ efibootmgr
elinks
gnu-netcat
gptfdisk
haveged
hdparm
ipw2100-fw
ipw2200-fw

View File

@ -30,4 +30,4 @@ USELVM="no"
HOSTNAME="archiso"
DAEMONS=(hwclock syslog-ng)
DAEMONS=(hwclock syslog-ng haveged pacman-init)

View File

@ -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