guix-devel
[Top][All Lists]
Advanced

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

Re: 18/36: services: hurd: Add dummy loopback.


From: Jan Nieuwenhuizen
Subject: Re: 18/36: services: hurd: Add dummy loopback.
Date: Fri, 01 May 2020 17:15:05 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Ludovic Courtès writes:

> address@hidden skribis:
>
>> +(define (hurd-loopback-shepherd-service _)
>> +  "Return the 'loopback' Shepherd service."
>> +
>> +  (list (shepherd-service
>> +         (documentation "Dummy for bootstrapping (gnu services) on the 
>> Hurd.")
>> +         (provision '(loopback))
>> +         (requirement '())
>> +         (start #~(const #t))
>> +         (stop #~(const #t))
>> +         (respawn? #f))))
>> +
>> +(define hurd-loopback-service-type
>> +  (service-type
>> +   (name 'loopback)
>> +   (extensions (list (service-extension shepherd-root-service-type
>> +                                        hurd-loopback-shepherd-service)))
>> +   (compose concatenate)
>> +   (extend first-of-two)
>> +   (default-value '(loopback)) ;canary for hurd-service->shepherd-service
>> +   (description "Dummy service to bootstrap (gnu services) on the
>> +Hurd.")))
>
> I believe the code currently used in ‘static-networking-service’ to
> setup the loopback device on GNU/Linux should also work on GNU/Hurd: it
> uses the “traditional” ioctls provided by (guix build syscalls).
>
> So hopefully we don’t need a Hurd-specific variant.

Ah, great!  I rewrote this to use <static-networking>...and it almost
works already.  I have added

        (service static-networking-service-type
                 (list (static-networking (interface "lo")
                                          (ip "127.0.0.1")
                                          (requirement '())
                                          (provision '(loopback)))))

and the VM builds, only it doesn't start

    herd: exeception caught while executing 'start' on service 'loopback':
    Value out of range 0 to 4294967295: -1

I have added new code for this as a squash! commit, that I then also
revert for now, until it works. :-(

Greetings,
janneke

-- 
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com



reply via email to

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