[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Service activation snippets vs mounting filesystems
From: |
Ludovic Courtès |
Subject: |
Re: Service activation snippets vs mounting filesystems |
Date: |
Thu, 26 Feb 2015 19:34:57 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
Mark H Weaver <address@hidden> skribis:
> For now, I was going to hack it into 'user-processes-service', since
> 'essential-services' arranges to add all filesystem services to the
> requirements for 'user-processes-service', and most other services
> depend on 'user-processes', so it seems well positioned for this cleanup
> task.
Yes, sounds good.
> However, I've now discovered a problem. Several services have
> activation scripts that create things in /var, and sometimes even in
> /var/run, one of the directories I want to clean. So, I must ensure
> that my cleanup happens before these activations.
>
> The problem is that these activation scripts are run before dmd is even
> launched, in 'operating-system-boot-script'. This implicitly assumes
> that everything created in the activation scripts is located on the root
> filesystem, since of course it happens before filesystems are mounted.
Right.
> Or am I missing something?
>
> Where is the right place to clean up /tmp and /var/run ?
Cleaning up /tmp poses no problem I guess, so really the only problem is
/var/run. So a first step would be a patch for /tmp cleanup. :-)
The activation script needs to run early because it creates user
accounts and such. It also needs to be separate and standalone so that
‘guix system reconfigure’ can run it.
Now, the ‘activate’ snippet of services could be moved out of the
activation script to the ‘start’ method of the dmd service, in dmd.conf.
That way, they would run after the “real” activation code.
WDYT?
Ludo’.