From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Service activation snippets vs mounting filesystems Date: Thu, 26 Feb 2015 19:34:57 +0100 Message-ID: <871tlczfla.fsf@gnu.org> References: <87wq36651b.fsf@netris.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39133) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YR3H9-0003On-VG for guix-devel@gnu.org; Thu, 26 Feb 2015 13:35:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YR3H3-0007wV-Fk for guix-devel@gnu.org; Thu, 26 Feb 2015 13:35:07 -0500 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58708) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YR3H3-0007wG-Dd for guix-devel@gnu.org; Thu, 26 Feb 2015 13:35:01 -0500 In-Reply-To: <87wq36651b.fsf@netris.org> (Mark H. Weaver's message of "Tue, 24 Feb 2015 22:31:12 -0500") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Mark H Weaver Cc: guix-devel@gnu.org Mark H Weaver 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 =E2=80=98guix system reconfigure=E2=80=99 can run it. Now, the =E2=80=98activate=E2=80=99 snippet of services could be moved out = of the activation script to the =E2=80=98start=E2=80=99 method of the dmd service,= in dmd.conf. That way, they would run after the =E2=80=9Creal=E2=80=9D activation code. WDYT? Ludo=E2=80=99.