guix-devel
[Top][All Lists]
Advanced

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

Service activation snippets vs mounting filesystems


From: Mark H Weaver
Subject: Service activation snippets vs mounting filesystems
Date: Tue, 24 Feb 2015 22:31:12 -0500

Hello Guix,

I wanted to add a service to clean /tmp and /var/run at boot time, and
have run into several problems.

First, I see no way to add a service that will be run early at boot time
without modifying Guix itself.  In this case, it should run after
mounting filesystems but before anything else is started.  It would be
good to have a way to express such a constraint without modifying all of
the existing services.

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.

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.

Or am I missing something?

Where is the right place to clean up /tmp and /var/run ?

     Mark



reply via email to

[Prev in Thread] Current Thread [Next in Thread]