diff options
author | Ludovic Courtès <ludo@gnu.org> | 2013-09-27 00:41:33 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2013-09-27 00:46:18 +0200 |
commit | 87eb734d38dff72ccdffd6c5f711d276aa3f9334 (patch) | |
tree | ae4868df0da9b41914d9de385dea146e160ab3d5 /gnu/system/dmd.scm | |
parent | 17886b302246476134a222fe970c90aef9aabc72 (diff) | |
download | patches-87eb734d38dff72ccdffd6c5f711d276aa3f9334.tar patches-87eb734d38dff72ccdffd6c5f711d276aa3f9334.tar.gz |
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".
Diffstat (limited to 'gnu/system/dmd.scm')
-rw-r--r-- | gnu/system/dmd.scm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gnu/system/dmd.scm b/gnu/system/dmd.scm index 8cc3f61c74..4d3b4b31f0 100644 --- a/gnu/system/dmd.scm +++ b/gnu/system/dmd.scm @@ -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 |