From cbeb3ea4921c38e39a9ed3041202307e91ccb220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Kr=C3=BCger?= Date: Fri, 17 Jun 2022 09:21:43 +0200 Subject: [PATCH] gluon-layer3-common: add ip6 from babel --- .../luasrc/lib/gluon/upgrade/300-layer3-ip6 | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 package/gluon-layer3-common/luasrc/lib/gluon/upgrade/300-layer3-ip6 diff --git a/package/gluon-layer3-common/luasrc/lib/gluon/upgrade/300-layer3-ip6 b/package/gluon-layer3-common/luasrc/lib/gluon/upgrade/300-layer3-ip6 new file mode 100755 index 00000000..1d3f5381 --- /dev/null +++ b/package/gluon-layer3-common/luasrc/lib/gluon/upgrade/300-layer3-ip6 @@ -0,0 +1,11 @@ +#!/usr/bin/lua + +local sysconfig = require 'gluon.sysconfig' +local uci = require('simple-uci').cursor() +local site = require 'gluon.site' +local iputil = require 'gluon.iputil' + +local ip = iputil.mac_to_ip(site.node_prefix6(), sysconfig.primary_mac) + +uci:set('network', 'loopback', 'ip6addr', ip) +uci:save('network')