janneke pushed a commit to branch wip-hurd
in repository guix.

commit 18cc5ff2adf9040d1f76f13bc7853df45978c060
Author: Janneke Nieuwenhuizen <[email protected]>
AuthorDate: Fri May 26 12:03:10 2023 +0200

    services: static-networking: Support netdde for the Hurd.
    
    As suggested by Sergey Bugaev on bug-hurd
    
        https://lists.gnu.org/archive/html/bug-hurd/2023-05//msg00455.html
    
    * gnu/services/base.scm (static-networking->hurd-pfinet-options): Use
    /DEV/ethX.  Use long options for settrans.
---
 gnu/services/base.scm | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index c5b06b57e8..1aeef95cc2 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -10,7 +10,7 @@
 ;;; Copyright © 2019 Efraim Flashner <[email protected]>
 ;;; Copyright © 2019 Tobias Geerinckx-Rice <[email protected]>
 ;;; Copyright © 2019 John Soo <[email protected]>
-;;; Copyright © 2019 Jan (janneke) Nieuwenhuizen <[email protected]>
+;;; Copyright © 2019, 2023 Janneke Nieuwenhuizen <[email protected]>
 ;;; Copyright © 2020 Florian Pelz <[email protected]>
 ;;; Copyright © 2020, 2021 Brice Waegeneire <[email protected]>
 ;;; Copyright © 2021 qblade <[email protected]>
@@ -2726,7 +2726,7 @@ to CONFIG."
   (match (static-networking-addresses config)
     ((and addresses (first _ ...))
      `("--ipv6" "/servers/socket/26"
-       "--interface" ,(network-address-device first)
+       "--interface" ,(string-append "/dev/" (network-address-device first))
        ,@(append-map (lambda (address)
                        `(,(if (network-address-ipv6? address)
                               "--address6"
@@ -2769,7 +2769,10 @@ to CONFIG."
                            (format #t "starting '~a~{ ~s~}'~%"
                                    #$(file-append hurd "/hurd/pfinet")
                                    options)
-                           (apply invoke #$(file-append hurd "/bin/settrans") 
"-fac"
+                           (apply invoke #$(file-append hurd "/bin/settrans")
+                                  "--active"
+                                  "--create"
+                                  "--keep-active"
                                   "/servers/socket/2"
                                   #$(file-append hurd "/hurd/pfinet")
                                   options)))))))

Reply via email to