You are not logged in.

#1 2015-05-27 17:34:47

ggg377
Member
Registered: 2015-02-20
Posts: 43

[SOLVED] Running Systemd service on login (encrypted home partition)

Hi,

I have a dm-crypt/LUKS encrypted home partition that's mounted via PAM on login. I'm trying to use a systemd service (profile-sync-daemon), but the service tries to start and access the home partition before the partition is mounted. The service does seem to start successfully, but it doesn't gain access to necessary files on the home partition and malfunctions later on. Is there a sane hack to somehow delay the start of the service until the relevant partition gets mounted (basically after login)? Manually starting the service after login works just as intended in this case - I'm just looking for a way to automate this process.

I have an idea of starting the service via Openbox autostart, but I've currently failed in my attempts.

Last edited by ggg377 (2015-05-28 18:31:10)

Offline

#2 2015-05-27 18:00:05

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Running Systemd service on login (encrypted home partition)

You can find out if the mounting process is executed by  systemd service, an if so, tell psd to start after that service.
Alternatively you can add a few seconds / minutes delay, so it doesn't start at boot, but slightly later.

Offline

#3 2015-05-27 18:44:26

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [SOLVED] Running Systemd service on login (encrypted home partition)

Have you looked at the RequiresMountsFor directive? (Not sure if that works with your encryption.)

Last edited by Raynman (2015-05-27 18:45:04)

Offline

#4 2015-05-28 18:31:00

ggg377
Member
Registered: 2015-02-20
Posts: 43

Re: [SOLVED] Running Systemd service on login (encrypted home partition)

Things got quite complicated and hacky as I researched this so I went out of the box a bit (or took the easy way out, whichever you prefer) and reinstalled Arch with a full disk encryption. All is fine now and I also expect to see less problems overall in the future. If anyone wants to continue researching this it would probably be a good idea to start a new thread.

Offline

Board footer

Powered by FluxBB