From d7e790df232041da3794cb04d8822fb286757fc5 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Mon, 18 Jun 2012 19:00:50 +0200 Subject: 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 Signed-off-by: Gerardo Exequiel Pozzi --- configs/releng/root-image/etc/rc.d/pacman-init | 34 ++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 configs/releng/root-image/etc/rc.d/pacman-init (limited to 'configs/releng/root-image/etc/rc.d/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 -- cgit v1.2.3-70-g09d2