mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 21:37:15 +02:00
This adds a new subpackage, gcr-ssh-agent, which replaces the old gcr-ssh-agent subpackage from community/gcr. It also adds three files used for autostart: - /etc/xdg/autostart/gcr-ssh-agent.desktop - the autostart .desktop file, points to the wrapper. - /usr/libexec/gcr-ssh-agent-wrapper - wrapper that automatically sets up the basedir for the current user ID. - /etc/profile.d/30-gcr-ssh-agent.sh - sets up SSH_AUTH_SOCK variable (used by apps to figure out which SSH agent to use). Lastly, it drops gcr-ssh-agent from the required dependencies of the gcr package. This is to make sure that it is only installed when directly requested by the user. Fixes #15965.
15 lines
294 B
Bash
Executable File
15 lines
294 B
Bash
Executable File
#!/bin/sh
|
|
|
|
UID="$(id -u)"
|
|
if [ ! "$UID" ]; then exit 1; fi
|
|
|
|
# Create base directory for the ssh-agent socket.
|
|
GCR_BASE_DIR="/run/user/$UID/gcr"
|
|
if [ -e "$GCR_BASE_DIR" ]; then
|
|
rm -rf "$GCR_BASE_DIR"
|
|
fi
|
|
mkdir -p "$GCR_BASE_DIR"
|
|
|
|
/usr/libexec/gcr-ssh-agent --base-dir "$GCR_BASE_DIR" $*
|
|
exit $?
|