Rework the hostname checking #1

Merged
kreyren merged 3 commits from :molese-patch into ALPHA 2021-11-30 07:21:47 +01:00

@ -7,11 +7,15 @@
;; FIXME(Krey): Process DOMAIN ;; FIXME(Krey): Process DOMAIN
;; FIXME(Krey): getenv returns #f if it's variable is unassigned.. i don't know how to check for false ;; function to print error if environment variable 'HOSTNAME' is not set or if it's value is empty
;(if (false? (getenv "HOSTNAME")) ;; FIXME-QA(Molese): Needs test
; (throw 1 "Environment variable 'HOSTNAME' is not set, unable to apply sufficient configuration")) (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 ;; TODO(Krey): Process https://guix.gnu.org/manual/en/html_node/Invoking-guix-deploy.html