Rework the hostname checking #1
@ -7,11 +7,15 @@
|
||||
|
||||
;; FIXME(Krey): Process DOMAIN
|
||||
|
||||
;; FIXME(Krey): getenv returns #f if it's variable is unassigned.. i don't know how to check for false
|
||||
;(if (false? (getenv "HOSTNAME"))
|
||||
; (throw 1 "Environment variable 'HOSTNAME' is not set, unable to apply sufficient configuration"))
|
||||
;; function to print error if environment variable 'HOSTNAME' is not set or if it's value is empty
|
||||
;; FIXME-QA(Molese): Needs test
|
||||
(define system-hostname-check (lambda ()
|
||||
(if (not (system-hostname-set?))
|
||||
(throw 1 "Environment variable 'HOSTNAME' is not set, unable to apply sufficient configuration"))
|
||||
(if (eq? (getenv "HOSTNAME") #f)
|
||||
(throw 1 "Environment variable 'HOSTNAME' is empty, unable to apply sufficient configuration"))))
|
||||
|
||||
;(define system-hostname (getenv "HOSTNAME"))
|
||||
(define system-hostname (getenv "HOSTNAME"))
|
||||
|
||||
;; TODO(Krey): Process https://guix.gnu.org/manual/en/html_node/Invoking-guix-deploy.html
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user