summaryrefslogtreecommitdiff
path: root/hscript/script_i.hh
diff options
context:
space:
mode:
Diffstat (limited to 'hscript/script_i.hh')
-rw-r--r--hscript/script_i.hh13
1 files changed, 13 insertions, 0 deletions
diff --git a/hscript/script_i.hh b/hscript/script_i.hh
index 0ed362e..a94a0d7 100644
--- a/hscript/script_i.hh
+++ b/hscript/script_i.hh
@@ -43,6 +43,8 @@ struct Script::ScriptPrivate {
/*! Determines whether or not to enable networking. */
std::unique_ptr<Network> network;
+ /*! Determines the network configuration system to use. */
+ std::unique_ptr<NetConfigType> netconfig;
/*! The target system's hostname. */
std::unique_ptr<Hostname> hostname;
/*! The packages to install to the target system. */
@@ -126,6 +128,17 @@ struct Script::ScriptPrivate {
return true;
}
+ bool store_netconfig(Key *obj, int line, int *errors, int *, ScriptOptions) {
+ if(netconfig) {
+ DUPLICATE_ERROR(netconfig, "netconfigtype",
+ netconfig->type());
+ return false;
+ }
+ std::unique_ptr<NetConfigType> nc(dynamic_cast<NetConfigType *>(obj));
+ netconfig = std::move(nc);
+ return true;
+ }
+
bool store_hostname(Key* obj, int line, int *errors, int *, ScriptOptions) {
if(hostname) {
DUPLICATE_ERROR(hostname, "hostname", hostname->value())