diff options
Diffstat (limited to 'hscript/script_i.hh')
-rw-r--r-- | hscript/script_i.hh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/hscript/script_i.hh b/hscript/script_i.hh index abe56ec..b82b807 100644 --- a/hscript/script_i.hh +++ b/hscript/script_i.hh @@ -72,6 +72,8 @@ struct Script::ScriptPrivate { std::vector< std::unique_ptr<Nameserver> > nses; /*! Wireless networking configuration */ std::vector< std::unique_ptr<NetSSID> > ssids; + /*! PPPoE configuration */ + std::vector< std::unique_ptr<PPPoE> > pppoes; /*! APK repositories */ std::vector< std::unique_ptr<Repository> > repos; @@ -153,6 +155,21 @@ struct Script::ScriptPrivate { return true; } + bool store_pppoe(Key *obj, const ScriptLocation &pos, int *errors, + int *, const ScriptOptions &) { + PPPoE *ppp = dynamic_cast<PPPoE *>(obj); + for(const auto &ppplink : pppoes) { + if(ppplink->iface() == ppp->iface()) { + DUPLICATE_ERROR(ppplink, "pppoe", ppplink->iface()); + return false; + } + } + + std::unique_ptr<PPPoE> uppp(ppp); + pppoes.push_back(std::move(uppp)); + return true; + } + bool store_hostname(Key* obj, const ScriptLocation &pos, int *errors, int *, const ScriptOptions &) { if(hostname) { |