[systemd-devel] Howto run script at begin and end of session: sessionsupport?
Stef Bon
stefbon at gmail.com
Fri Jul 15 14:55:50 PDT 2011
2011/7/15 Lennart Poettering <lennart at poettering.net>:
> On Fri, 15.07.11 08:24, Stef Bon (stefbon at gmail.com) wrote:
>
>>
>> /etc/ConsoleKit/run-session.d
>
> We currently don't support this in systemd, and right now I see no good
> usecase that might convince us to add that.
>
> Can you elaborate what you are planning to do with it? If you have a
> good usecase we might add this.
>
Well what I want to do is to create a layer around the normal
filesystem, using a FUSE fs. Maybe you've read earlier about this,
I've send a proposal about this to the meeting in Berlin
Guadec/Akademy.
The FUSE fs and several make the system for the user look like:
/Computer
/Home
/Internet Services
/Home
/Network
/Mounts
/Shared
/System
To make this work several scripts are run at the begin of a session
(and to clean when session stops)
Roughly it comes to:
1. determine settings
2. if settings say so:
2a. setup environment in /var/lib/workspace/%USER/chroot by mounting
FUSE fs fuse-workspace and remounting the normal system to it.
2b do a chroot using pam_chroot
Now I see that the chroot is deprecated, namespaces are better. I'm
not familiar with it, and reading about it now.
But what I want is to run some scripts when a session starts (and when
it ends) to run a "determine settings" and create a "namespace".
I've looked to pam_namespace, but I need more.
Stef
More information about the systemd-devel
mailing list