diff options
Diffstat (limited to 'hscript/script_i.hh')
-rw-r--r-- | hscript/script_i.hh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/hscript/script_i.hh b/hscript/script_i.hh index c6dbb54..b223608 100644 --- a/hscript/script_i.hh +++ b/hscript/script_i.hh @@ -63,6 +63,8 @@ struct Script::ScriptPrivate { std::unique_ptr<Timezone> tzone; /*! The version of Adélie to install. */ std::unique_ptr<Version> version; + /*! The desired bootloader configuration. */ + std::unique_ptr<Bootloader> boot; /*! Network addressing configuration */ std::vector< std::unique_ptr<NetAddress> > addresses; @@ -278,6 +280,17 @@ struct Script::ScriptPrivate { return true; } + bool store_bootloader(Key *obj, const ScriptLocation &pos, int *errors, + int *, const ScriptOptions &) { + if(boot) { + DUPLICATE_ERROR(boot, "bootloader", boot->value()) + return false; + } + std::unique_ptr<Bootloader> b(dynamic_cast<Bootloader *>(obj)); + boot = std::move(b); + return true; + } + bool store_username(Key *obj, const ScriptLocation &pos, int *errors, int *, const ScriptOptions &) { if(accounts.size() >= 255) { |