[gvfs] Add PartOf= to all systemd units



commit a2f451349d83aa16ba3269785d2b07910746640e
Author: Henri Chain <henri chain enioka com>
Date:   Mon Sep 27 16:14:35 2021 +0200

    Add PartOf= to all systemd units
    
    The `PartOf` directive sets up a one-way dependency between
    `graphical-session.target` and our services, so that when
    `graphical-session.target` is stopped or restarted, our services also get
    stopped or restarted.
    
    This ensures that gvfs daemons that were started in the context of a GUI
    login session (through dbus activation) do not continue to run after the
    user has logged out.
    
    See `systemd.unit(5)` for more info.

 daemon/gvfs-daemon.service.in                          | 1 +
 metadata/gvfs-metadata.service.in                      | 1 +
 monitor/afc/gvfs-afc-volume-monitor.service.in         | 1 +
 monitor/goa/gvfs-goa-volume-monitor.service.in         | 1 +
 monitor/gphoto2/gvfs-gphoto2-volume-monitor.service.in | 1 +
 monitor/mtp/gvfs-mtp-volume-monitor.service.in         | 1 +
 monitor/udisks2/gvfs-udisks2-volume-monitor.service.in | 1 +
 7 files changed, 7 insertions(+)
---
diff --git a/daemon/gvfs-daemon.service.in b/daemon/gvfs-daemon.service.in
index 9d381204..a70ee3af 100644
--- a/daemon/gvfs-daemon.service.in
+++ b/daemon/gvfs-daemon.service.in
@@ -1,5 +1,6 @@
 [Unit]
 Description=Virtual filesystem service
+PartOf=graphical-session.target
 
 [Service]
 ExecStart=@libexecdir@/gvfsd
diff --git a/metadata/gvfs-metadata.service.in b/metadata/gvfs-metadata.service.in
index 2160b23d..638b21bd 100644
--- a/metadata/gvfs-metadata.service.in
+++ b/metadata/gvfs-metadata.service.in
@@ -1,5 +1,6 @@
 [Unit]
 Description=Virtual filesystem metadata service
+PartOf=graphical-session.target
 
 [Service]
 ExecStart=@libexecdir@/gvfsd-metadata
diff --git a/monitor/afc/gvfs-afc-volume-monitor.service.in b/monitor/afc/gvfs-afc-volume-monitor.service.in
index 6b8e7e3a..5d7015ca 100644
--- a/monitor/afc/gvfs-afc-volume-monitor.service.in
+++ b/monitor/afc/gvfs-afc-volume-monitor.service.in
@@ -1,5 +1,6 @@
 [Unit]
 Description=Virtual filesystem service - Apple File Conduit monitor
+PartOf=graphical-session.target
 
 [Service]
 ExecStart=@libexecdir@/gvfs-afc-volume-monitor
diff --git a/monitor/goa/gvfs-goa-volume-monitor.service.in b/monitor/goa/gvfs-goa-volume-monitor.service.in
index f969448f..7ba865c1 100644
--- a/monitor/goa/gvfs-goa-volume-monitor.service.in
+++ b/monitor/goa/gvfs-goa-volume-monitor.service.in
@@ -1,5 +1,6 @@
 [Unit]
 Description=Virtual filesystem service - GNOME Online Accounts monitor
+PartOf=graphical-session.target
 
 [Service]
 ExecStart=@libexecdir@/gvfs-goa-volume-monitor
diff --git a/monitor/gphoto2/gvfs-gphoto2-volume-monitor.service.in 
b/monitor/gphoto2/gvfs-gphoto2-volume-monitor.service.in
index 2fb21be4..6e1e6043 100644
--- a/monitor/gphoto2/gvfs-gphoto2-volume-monitor.service.in
+++ b/monitor/gphoto2/gvfs-gphoto2-volume-monitor.service.in
@@ -1,5 +1,6 @@
 [Unit]
 Description=Virtual filesystem service - digital camera monitor
+PartOf=graphical-session.target
 
 [Service]
 ExecStart=@libexecdir@/gvfs-gphoto2-volume-monitor
diff --git a/monitor/mtp/gvfs-mtp-volume-monitor.service.in b/monitor/mtp/gvfs-mtp-volume-monitor.service.in
index 8d5d7c33..014eb21b 100644
--- a/monitor/mtp/gvfs-mtp-volume-monitor.service.in
+++ b/monitor/mtp/gvfs-mtp-volume-monitor.service.in
@@ -1,5 +1,6 @@
 [Unit]
 Description=Virtual filesystem service - Media Transfer Protocol monitor
+PartOf=graphical-session.target
 
 [Service]
 ExecStart=@libexecdir@/gvfs-mtp-volume-monitor
diff --git a/monitor/udisks2/gvfs-udisks2-volume-monitor.service.in 
b/monitor/udisks2/gvfs-udisks2-volume-monitor.service.in
index 1fa1040e..64d4b813 100644
--- a/monitor/udisks2/gvfs-udisks2-volume-monitor.service.in
+++ b/monitor/udisks2/gvfs-udisks2-volume-monitor.service.in
@@ -1,5 +1,6 @@
 [Unit]
 Description=Virtual filesystem service - disk device monitor
+PartOf=graphical-session.target
 
 [Service]
 ExecStart=@libexecdir@/gvfs-udisks2-volume-monitor


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]