Adjust demo-config.rkt to cope with full domain names

This commit is contained in:
Tony Garnock-Jones 2017-07-26 20:40:54 -04:00
parent 7ddcebfddb
commit b189a249f8
2 changed files with 4 additions and 2 deletions

View File

@ -3,6 +3,7 @@
(require racket/match)
(require (only-in mzlib/os gethostname))
(require (only-in racket/string string-split))
(require "configuration.rkt")
(spawn
@ -12,7 +13,7 @@
(assert (gateway-route (bytes 0 0 0 0) 0 (bytes 129 10 115 1) "eth0"))]
[other ;; assume a private network
(define interface
(match other
(match (car (string-split other "."))
["skip" "en0"]
["leap" "wlp4s0"] ;; wtf
[_ "wlan0"]))

View File

@ -4,6 +4,7 @@
(require racket/match)
(require syndicate/monolithic)
(require (only-in mzlib/os gethostname))
(require (only-in racket/string string-split))
(require "configuration.rkt")
(provide spawn-demo-config)
@ -17,7 +18,7 @@
(assertion (gateway-route (bytes 0 0 0 0) 0 (bytes 129 10 115 1) "eth0")))]
[other ;; assume a private network
(define interface
(match other
(match (car (string-split other "."))
["skip" "en0"]
["leap" "wlp4s0"] ;; wtf
[_ "wlan0"]))