Skip to content

Commit

Permalink
update bmtedge to new implements
Browse files Browse the repository at this point in the history
  • Loading branch information
mjanson committed Oct 20, 2023
1 parent 1b815ac commit dc448b9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion applications/luci-app-bmtedge/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

include $(TOPDIR)/rules.mk

PKG_VERSION:=1.0.0-20230615
PKG_VERSION:=1.0.1-20231020
PKG_RELEASE:=

LUCI_TITLE:=LuCI support for bmtedge
Expand Down
2 changes: 2 additions & 0 deletions applications/luci-app-bmtedge/luasrc/model/cbi/bmtedge.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ o.rmempty = false
o.datatype = "string"
o:value("jinshanyun/jinshan-x86_64", "jinshanyun/jinshan-x86_64")
o:value("jinshanyun/jinshan-arm64", "jinshanyun/jinshan-arm64")
o:value("jinshanyun/jinshan-x86_64:v1.2", "jinshanyun/jinshan-x86_64:v1.2")
o:value("jinshanyun/jinshan-arm64:v2.2", "jinshanyun/jinshan-arm64:v2.2")
o.default = default_image

local default_uid = bmtedge_model.default_uid()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ do_install() {
exit 1
fi

local netdev=`ip route list|awk ' /^default/ {print $5}'`
if [ -z "$netdev" ]; then
echo "defualt gateway is empty!"
exit 1
fi

[ -z "$image_name" ] && image_name="jinshanyun/jinshan-x86_64:latest"
echo "docker pull ${image_name}"
docker pull ${image_name}
Expand All @@ -22,14 +28,14 @@ do_install() {
--privileged \
--network=host \
--dns=127.0.0.1 \
--dns=223.5.5.5 \
--tmpfs /run \
--tmpfs /tmp \
-v \"$path:/data/ksc1\" \
-v \"$path/containerd:/var/lib/containerd\" \
-e ksc_supplier_code=\"92101\" \
-e ksc_datadir=\"/data/ksc1\" \
-e ksc_machine_code=\"lsyK17032_$uid\" \
-e ksc_refer=\"ruiyun_node\""
-e ksc_net=\"$netdev\" \
-e ksc_machine_code=\"lsyK17032_$uid\" "

local tz="`uci get system.@system[0].zonename`"
[ -z "$tz" ] || cmd="$cmd -e TZ=$tz"
Expand Down

0 comments on commit dc448b9

Please sign in to comment.