diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2022-04-16 14:44:36 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2022-04-16 14:44:36 -0700 |
commit | 3d0237b89b4f18c2a01aaccb8b0077cac746e3a7 (patch) | |
tree | af71ca26ae25d10b76fac093a4123853d02d5374 | |
parent | 27549381e220f32c224e5c9161afd2ebee708b3e (diff) | |
download | consfigurator-3d0237b89b4f18c2a01aaccb8b0077cac746e3a7.tar.gz |
HOSTNAME:CONFIGURED: drop seemingly unnecessary DOMAIN argument
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r-- | src/property/hostname.lisp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/property/hostname.lisp b/src/property/hostname.lisp index f4d4d8e..9bed5c3 100644 --- a/src/property/hostname.lisp +++ b/src/property/hostname.lisp @@ -32,12 +32,8 @@ Unlikely to be useful for hosts defined using DEFHOST." (defpropspec configured :posix (&optional (hostname (get-hostname) hostname-supplied-p) - (domain (domain hostname)) &aux (short (car (split-string hostname :separator ".")))) - "Set the hostname in the standard Debian way. -When HOSTNAME is an FQDN, DOMAIN is the domain part of the hostname, -defaulting to everything after the first dot. (For some hosts, the domain -should rather be the whole hostname.)" + "Set the hostname in the standard Debian way." (:desc "Hostname configured") `(seqprops ,@(and hostname-supplied-p `((is ,hostname))) @@ -46,7 +42,7 @@ should rather be the whole hostname.)" (cmd:single ,(strcat "hostname " short)))) (file:contains-conf-tab "/etc/hosts" - ,@(and (plusp (length domain)) + ,@(and (position #\. hostname) `("127.0.1.1" ,(strcat hostname " " short))) "127.0.0.1" "localhost"))) |