summaryrefslogtreecommitdiff
path: root/configs/mate-openrc/root-image/etc/init.d/pacman-init
diff options
context:
space:
mode:
authorDavid P <megver83@openmailbox.org>2017-10-01 17:19:40 -0300
committerDavid P <megver83@openmailbox.org>2017-10-01 17:19:40 -0300
commit1bf80f77f7a8bb4ffdd203c60662421e3f8f589b (patch)
treee7b444e2dd20ffb0b5905942dd853bf4d2c0da8a /configs/mate-openrc/root-image/etc/init.d/pacman-init
parentf5d62fdcd4a6d351fa25af3b3e443ba4de67a802 (diff)
Added configs/mate-openrc
Other changes: - Updated talkingparabola-X11 packages.both (xorg pkgs) - Updated pacman-init service for profile-openrc
Diffstat (limited to 'configs/mate-openrc/root-image/etc/init.d/pacman-init')
-rwxr-xr-xconfigs/mate-openrc/root-image/etc/init.d/pacman-init31
1 files changed, 31 insertions, 0 deletions
diff --git a/configs/mate-openrc/root-image/etc/init.d/pacman-init b/configs/mate-openrc/root-image/etc/init.d/pacman-init
new file mode 100755
index 0000000..b610683
--- /dev/null
+++ b/configs/mate-openrc/root-image/etc/init.d/pacman-init
@@ -0,0 +1,31 @@
+#!/usr/bin/openrc-run
+# Copyright (C) 2017 Parabola Project
+# Copyright (C) Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="Initializes Pacman keyring"
+
+depend() {
+ use haveged
+ after haveged
+}
+
+start() {
+ # Check that there's no keyring, if there isn't, create one
+ # in the background for a faster boot
+ if [ ! -d /etc/pacman.d/gnupg ]; then
+ ebegin "Starting Pacman keyring"
+ pacman-key --init &> /dev/null &&
+ pacman-key --populate archlinux parabola &> /dev/null
+ else
+ ebegin "Pacman keyring already started"
+ fi
+}
+
+stop() {
+ # If there's a keyring, delete it
+ if [ -d /etc/pacman.d/gnupg ]; then
+ ebegin "Stoping Pacman keyring"
+ rm -rf /etc/pacman.d/gnupg
+ fi
+}