aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-07-06 16:52:38 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-07-10 20:46:00 -0700
commit75f5958f8556032da130f75a9cc8b64e3b67c9f1 (patch)
tree6f74709255ba0b65b130c2fc1a8e8aa9a3162778 /src
parentc6f28e53564be4d80d8f4ef98ab0251bec8409cd (diff)
downloadconsfigurator-75f5958f8556032da130f75a9cc8b64e3b67c9f1.tar.gz
NETWORK:STATIC: add NETMASK argument
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src')
-rw-r--r--src/property/libvirt.lisp3
-rw-r--r--src/property/network.lisp5
2 files changed, 6 insertions, 2 deletions
diff --git a/src/property/libvirt.lisp b/src/property/libvirt.lisp
index 5362c40..d07073c 100644
--- a/src/property/libvirt.lisp
+++ b/src/property/libvirt.lisp
@@ -198,7 +198,8 @@ Sample usage:
(apt:installed \"linux-image-amd64\")
(hostname:configured)
- (network:static \"ens4\" \"192.168.122.31\" \"192.168.122.1\")
+ (network:static \"ens4\"
+ \"192.168.122.31\" \"192.168.122.1\" \"255.255.255.0\")
(file:has-content \"/etc/resolv.conf\" \"...\")
(sshd:installed)
diff --git a/src/property/network.lisp b/src/property/network.lisp
index 94aa949..0a59428 100644
--- a/src/property/network.lisp
+++ b/src/property/network.lisp
@@ -60,7 +60,8 @@ hosting provider, for example."
"# Include files from /etc/network/interfaces.d:"
"source /etc/network/interfaces.d/*")))
-(defprop static :posix (interface address &optional gateway &rest options)
+(defprop static :posix
+ (interface address &optional gateway netmask &rest options)
"Configures an interface with a static IP address.
OPTIONS is a list of even length of alternating keys and values."
(:desc #?"Static interface ${interface} configured")
@@ -70,6 +71,8 @@ OPTIONS is a list of even length of alternating keys and values."
(:apply
(when gateway
(setq options (list* "gateway" gateway options)))
+ (when netmask
+ (setq options (list* "netmask" netmask options)))
(setq options (list* "address" address options))
(file:has-content
(merge-pathnames (string->filename interface)