Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37787481
en ru br
Репозитории ALT
S:2.4.3-alt1
5.1: 2.0.14-alt1.M51.1
4.1: 2.0.14-alt1.M41.1
4.0: 2.0.9-alt2.M40.1
3.0: 1.9.17-alt2
www.altlinux.org/Changes

Другие репозитории
Upstream:2.0.8

Группа :: Работа с текстами
Пакет: gnupg2

 Главная   Изменения   Спек   Патчи   Исходники   Загрузить   Gear   Bugs and FR  Repocop 

#!/bin/sh -efu

[ -n "${GNUPGHOME-}" ] || GNUPGHOME="$HOME/.gnupg"
INFO="$GNUPGHOME/.gpg-agent-info"
>>"$INFO"
enable -f /usr/lib/bash/lockf lockf
builtin lockf "$INFO"

check_agent()
{
[ -s "$INFO" ] &&
pid="$(sed -n 's|^GPG_AGENT_INFO=/[^:]\+:\([1-9][0-9]*\):[^:]\+$|\1|p' <"$INFO")" &&
[ -n "$pid" ] &&
kill -0 "$pid" 2>/dev/null
}

check_agent && exit

# Launch seahorse-agent iff
# $DISPLAY is set AND
# (EITHER (pinentry-program is set to seahorse-agent in gpg-agent.conf)
# OR (no pinentry-program is set in gpg-agent.conf AND seahorse-agent is installed))
# Otherwise launch gpg-agent.

use_seahorse=
if [ -n "${DISPLAY-}" ]; then
CFG="$GNUPGHOME/gpg-agent.conf"
if grep -qs '^[[:space:]]*pinentry-program[[:space:]]\+.*seahorse-agent' "$CFG"; then
use_seahorse=1
elif ! grep -qs '^[[:space:]]*pinentry-program[[:space:]]' "$CFG" &&
type seahorse-agent >/dev/null 2>&1; then
use_seahorse=1
fi
fi

if [ -n "$use_seahorse" ]; then
a=seahorse-agent; $a --variables >"$INFO"
else
gpg-agent --daemon >"$INFO"
fi

check_agent
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin