diff options
-rw-r--r-- | packaging/system-plugin.spec | 6 | ||||
-rw-r--r-- | units/session-bind@.service | 16 |
2 files changed, 22 insertions, 0 deletions
diff --git a/packaging/system-plugin.spec b/packaging/system-plugin.spec index b076f2d..96cae2c 100644 --- a/packaging/system-plugin.spec +++ b/packaging/system-plugin.spec @@ -231,6 +231,10 @@ mkdir -p %{buildroot}%{_userunitdir}/basic.target.wants install -m 644 units/session-bind.service %{buildroot}%{_userunitdir} ln -s ../session-bind.service %{buildroot}%{_userunitdir}/basic.target.wants/session-bind.service +mkdir -p %{buildroot}%{_unitdir}/user-basic@.target.wants +install -m 644 units/session-bind@.service %{buildroot}%{_unitdir} +ln -s ../session-bind@.service %{buildroot}%{_unitdir}/user-basic@.target.wants/session-bind@.service + %clean rm -rf %{buildroot} @@ -332,6 +336,8 @@ rm -f %{_sbindir}/e4crypt %{_bindir}/session-bind %{_userunitdir}/session-bind.service %{_userunitdir}/basic.target.wants/session-bind.service +%{_unitdir}/session-bind@.service +%{_unitdir}/user-basic@.target.wants/session-bind@.service %post feature-session-bind echo "" diff --git a/units/session-bind@.service b/units/session-bind@.service new file mode 100644 index 0000000..bb3e805 --- /dev/null +++ b/units/session-bind@.service @@ -0,0 +1,16 @@ +[Unit] +PartOf=userlogin@%i.target +Description=User session bind mount for %i +Wants=wait-mount@opt-usr.service +After=wait-mount@opt-usr.service +ConditionPathIsMountPoint=!/opt/usr/apps +ConditionPathIsMountPoint=!/opt/usr/media + +[Service] +User=%i +SmackProcessLabel=User +Capabilities=cap_sys_admin=i +SecureBits=keep-caps +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/bin/session-bind |