emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#26809: closed (08/09: services: nscd: Create /etc/


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#26809: closed (08/09: services: nscd: Create /etc/resolv.conf if it does not exist.)
Date: Mon, 08 May 2017 14:31:02 +0000

Your message dated Mon, 08 May 2017 16:30:06 +0200
with message-id <address@hidden>
and subject line Re: bug#26809: 08/09: services: nscd: Create /etc/resolv.conf 
if it does not exist.
has caused the debbugs.gnu.org bug report #26809,
regarding 08/09: services: nscd: Create /etc/resolv.conf if it does not exist.
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
26809: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=26809
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: Re: 08/09: services: nscd: Create /etc/resolv.conf if it does not exist. Date: Sun, 07 May 2017 00:19:33 -0400 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)
address@hidden (Ludovic Courtès) writes:

> civodul pushed a commit to branch master
> in repository guix.
>
> commit 49f9d7f697d19870f01104cdb6a90a32aea87679
> Author: Ludovic Courtès <address@hidden>
> Date:   Tue May 2 12:21:31 2017 +0200
>
>     services: nscd: Create /etc/resolv.conf if it does not exist.
>     
>     * gnu/services/base.scm (nscd-activation): Create /etc/resolv.conf if it
>     does not exist yet.

This commit broke the boot process on my system.  The problem is that
I'm using Network Manager, which makes /etc/resolv.conf into a symlink
that points to /var/run/NetworkManager/resolv.conf.  Since /var/run is
cleaned during early boot, when this new activation code runs,
/etc/resolv.conf is a broken symlink.

I guess that 'file-exists?' returns #false for a broken symlink, and the
'call-with-output-file' tries to open the target of the symlink, which
fails.

       Mark


> diff --git a/gnu/services/base.scm b/gnu/services/base.scm
> index 67972bf..a64faa0 100644
> --- a/gnu/services/base.scm
> +++ b/gnu/services/base.scm
> @@ -1149,7 +1149,14 @@ the tty to run, among other things."
>    #~(begin
>        (use-modules (guix build utils))
>        (mkdir-p "/var/run/nscd")
> -      (mkdir-p "/var/db/nscd")))                  ;for the persistent cache
> +      (mkdir-p "/var/db/nscd")                    ;for the persistent cache
> +
> +      ;; In libc 2.25 nscd uses inotify to watch /etc/resolv.conf, but only 
> if
> +      ;; that file exists when it is started.  Thus create it here.
> +      (unless (file-exists? "/etc/resolv.conf")
> +        (call-with-output-file "/etc/resolv.conf"
> +          (lambda (port)
> +            (display "# This is a placeholder.\n" port))))))
>  
>  (define nscd-service-type
>    (service-type (name 'nscd)



--- End Message ---
--- Begin Message --- Subject: Re: bug#26809: 08/09: services: nscd: Create /etc/resolv.conf if it does not exist. Date: Mon, 08 May 2017 16:30:06 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)
Mark H Weaver <address@hidden> skribis:

> address@hidden (Ludovic Courtès) writes:
>
>> civodul pushed a commit to branch master
>> in repository guix.
>>
>> commit 49f9d7f697d19870f01104cdb6a90a32aea87679
>> Author: Ludovic Courtès <address@hidden>
>> Date:   Tue May 2 12:21:31 2017 +0200
>>
>>     services: nscd: Create /etc/resolv.conf if it does not exist.
>>     
>>     * gnu/services/base.scm (nscd-activation): Create /etc/resolv.conf if it
>>     does not exist yet.
>
> This commit broke the boot process on my system.  The problem is that
> I'm using Network Manager, which makes /etc/resolv.conf into a symlink
> that points to /var/run/NetworkManager/resolv.conf.  Since /var/run is
> cleaned during early boot, when this new activation code runs,
> /etc/resolv.conf is a broken symlink.
>
> I guess that 'file-exists?' returns #false for a broken symlink, and the
> 'call-with-output-file' tries to open the target of the symlink, which
> fails.

Indeed.  I guess this is fixed by
c298fb133acbdc17e05a79c10ab9a9e214368264.

Thanks,
Ludo’.


--- End Message ---

reply via email to

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