guix-patches
[Top][All Lists]
Advanced

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

[bug#41541] [PATCH 7/8] services: hurd: Add `hurd-etc-service'.


From: Ludovic Courtès
Subject: [bug#41541] [PATCH 7/8] services: hurd: Add `hurd-etc-service'.
Date: Sat, 06 Jun 2020 13:08:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

"Jan (janneke) Nieuwenhuizen" <janneke@gnu.org> skribis:

> * gnu/services/hurd.scm: New file.
> * gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
> * doc/guix.texi (Hurd Services): Document it.

[...]

> +@deffn {Scheme Procedure} hurd-etc-service @var{os}
> +This service implements a minimal @code{etc-service}, adding some
> +specifics for the Hurd.
> +
> +It is part of the @code{hurd-default-essential-services}.
> +@end deffn

The ‘hurd-default-essential-services’ bit is not in this patch, though.

> +;;; The ETC service for the Hurd.

s/ETC/etc/

> +(define (hurd-etc-service os)
> +  "Return a <service> that builds containing the static part of the /etc
> +directory."
> +  (let ((profile (mixed-text-file "profile"  "\
> +# Generated by hurd-etc-services
> +export PS1='\\u@\\h\\$ '
> +
> +GUIX_PROFILE=\"/run/current-system/profile\"
> +. \"$GUIX_PROFILE/etc/profile\"
> +
> +GUIX_PROFILE=\"$HOME/.guix-profile\"
> +if [ -f \"$GUIX_PROFILE/etc/profile\" ]; then
> +  . \"$GUIX_PROFILE/etc/profile\"
> +fi\n"))
> +        (hurd (operating-system-hurd os)))
> +    (etc-service
> +     `(("services" ,(file-append net-base "/etc/services"))
> +       ("protocols" ,(file-append net-base "/etc/protocols"))
> +       ("profile" ,profile)
> +       ("hostname" ,(plain-file "hostname" (operating-system-host-name os)))
> +       ("login" ,(file-append hurd "/etc/login"))
> +       ("motd" ,(file-append hurd "/etc/motd"))))))

Why again does it need to be different from that on GNU/Linux?
Intuitively it should be the same, but it’s fine to keep this one,
perhaps with a FIXME, until we’ve figured out what to do to use the same
/etc service in both cases.

Ludo’.





reply via email to

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