diff options
author | Martin Pitt <martin.pitt@ubuntu.com> | 2016-07-25 17:07:25 +0200 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2016-07-29 02:33:55 +0100 |
commit | 9269812fada73fdd8553d4f6822ce9377ade4c2d (patch) | |
tree | 7511cee1e6f23bfb8b1c47026dcf1474e24a127d | |
parent | 4cebe1ac6b50c7bc74313e26d44c4fc0af8886aa (diff) |
Add systemd user unit for graphical sessions that use systemd
Override the corresponding upstart job in that case.
-rw-r--r-- | debian/changelog | 2 | ||||
-rwxr-xr-x | debian/openssh-client.install | 4 | ||||
-rw-r--r-- | debian/openssh-client.links | 2 | ||||
-rw-r--r-- | debian/systemd/ssh-agent.override | 1 | ||||
-rw-r--r-- | debian/systemd/ssh-agent.service | 8 |
5 files changed, 17 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 79d973bb8..466a09246 100644 --- a/debian/changelog +++ b/debian/changelog | |||
@@ -9,6 +9,8 @@ openssh (1:7.2p2-8) UNRELEASED; urgency=medium | |||
9 | [ Martin Pitt ] | 9 | [ Martin Pitt ] |
10 | * Add debian/agent-launch: Helper script for conditionally starting the SSH | 10 | * Add debian/agent-launch: Helper script for conditionally starting the SSH |
11 | agent in the user session. Use it in ssh-agent.user-session.upstart. | 11 | agent in the user session. Use it in ssh-agent.user-session.upstart. |
12 | * Add systemd user unit for graphical sessions that use systemd. Override | ||
13 | the corresponding upstart job in that case (closes: #832445). | ||
12 | 14 | ||
13 | -- Colin Watson <cjwatson@debian.org> Thu, 28 Jul 2016 22:04:37 +0100 | 15 | -- Colin Watson <cjwatson@debian.org> Thu, 28 Jul 2016 22:04:37 +0100 |
14 | 16 | ||
diff --git a/debian/openssh-client.install b/debian/openssh-client.install index fd9c02d1b..b8b798d91 100755 --- a/debian/openssh-client.install +++ b/debian/openssh-client.install | |||
@@ -35,3 +35,7 @@ debian/openssh-client.apport => usr/share/apport/package-hooks/openssh-client.py | |||
35 | # Upstart user job (only used under user sessions). | 35 | # Upstart user job (only used under user sessions). |
36 | debian/ssh-agent.user-session.upstart => usr/share/upstart/sessions/ssh-agent.conf | 36 | debian/ssh-agent.user-session.upstart => usr/share/upstart/sessions/ssh-agent.conf |
37 | 37 | ||
38 | # systemd user unit (only used under sessions) | ||
39 | debian/systemd/ssh-agent.service usr/lib/systemd/user | ||
40 | # disable above upstart job when running the systemd user unit | ||
41 | debian/systemd/ssh-agent.override usr/share/upstart/systemd-session/upstart | ||
diff --git a/debian/openssh-client.links b/debian/openssh-client.links index 75d798afc..1d94c74e8 100644 --- a/debian/openssh-client.links +++ b/debian/openssh-client.links | |||
@@ -1,2 +1,4 @@ | |||
1 | usr/bin/ssh usr/bin/slogin | 1 | usr/bin/ssh usr/bin/slogin |
2 | usr/share/man/man1/ssh.1 usr/share/man/man1/slogin.1 | 2 | usr/share/man/man1/ssh.1 usr/share/man/man1/slogin.1 |
3 | # enable systemd user unit for graphical sessions that use systemd | ||
4 | usr/lib/systemd/user/ssh-agent.service usr/lib/systemd/user/graphical-session-pre.target.wants/ssh-agent.service | ||
diff --git a/debian/systemd/ssh-agent.override b/debian/systemd/ssh-agent.override new file mode 100644 index 000000000..2905494b6 --- /dev/null +++ b/debian/systemd/ssh-agent.override | |||
@@ -0,0 +1 @@ | |||
manual | |||
diff --git a/debian/systemd/ssh-agent.service b/debian/systemd/ssh-agent.service new file mode 100644 index 000000000..2297f8f75 --- /dev/null +++ b/debian/systemd/ssh-agent.service | |||
@@ -0,0 +1,8 @@ | |||
1 | [Unit] | ||
2 | Description=OpenSSH Agent | ||
3 | Before=graphical-session-pre.target | ||
4 | ConditionPathExists=/etc/X11/Xsession.options | ||
5 | |||
6 | [Service] | ||
7 | ExecStart=/usr/lib/openssh/agent-launch start | ||
8 | ExecStopPost=/usr/lib/openssh/agent-launch stop | ||