mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-19 05:57:04 +01:00
gnu: dmd: Make the 'networking' service slightly more robust.
* gnu/system/dmd.scm (static-networking-service)[start]: Sleep before running 'route', to leave time for the interface to come up. [stop]: Run "route del -net default".
This commit is contained in:
parent
17886b3022
commit
87eb734d38
1 changed files with 7 additions and 3 deletions
|
@ -178,10 +178,14 @@ (define* (static-networking-service store interface ip
|
||||||
(start `(lambda _
|
(start `(lambda _
|
||||||
(and (zero? (system* ,ifconfig ,interface ,ip "up"))
|
(and (zero? (system* ,ifconfig ,interface ,ip "up"))
|
||||||
,(if gateway
|
,(if gateway
|
||||||
`(zero? (system* ,route "add" "-net" "default"
|
`(begin
|
||||||
"gw" ,gateway))
|
(sleep 3) ; XXX
|
||||||
|
(zero? (system* ,route "add" "-net" "default"
|
||||||
|
"gw" ,gateway)))
|
||||||
#t))))
|
#t))))
|
||||||
(stop `(make-forkexec-constructor ,ifconfig ,interface "down"))
|
(stop `(lambda _
|
||||||
|
(system* ,ifconfig ,interface "down")
|
||||||
|
(system* ,route "del" "-net" "default")))
|
||||||
(respawn? #f)
|
(respawn? #f)
|
||||||
(inputs `(("inetutils" ,inetutils)
|
(inputs `(("inetutils" ,inetutils)
|
||||||
,@(if gateway
|
,@(if gateway
|
||||||
|
|
Loading…
Reference in a new issue