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:
Ludovic Courtès 2013-09-27 00:41:33 +02:00
parent 17886b3022
commit 87eb734d38
1 changed files with 7 additions and 3 deletions

View File

@ -178,10 +178,14 @@ true, it must be a string specifying the default network gateway."
(start `(lambda _
(and (zero? (system* ,ifconfig ,interface ,ip "up"))
,(if gateway
`(zero? (system* ,route "add" "-net" "default"
"gw" ,gateway))
`(begin
(sleep 3) ; XXX
(zero? (system* ,route "add" "-net" "default"
"gw" ,gateway)))
#t))))
(stop `(make-forkexec-constructor ,ifconfig ,interface "down"))
(stop `(lambda _
(system* ,ifconfig ,interface "down")
(system* ,route "del" "-net" "default")))
(respawn? #f)
(inputs `(("inetutils" ,inetutils)
,@(if gateway