From 63a2690bb520ec112d6c2ad2e5ea5e76fd1191fb Mon Sep 17 00:00:00 2001 From: Dushnilin Date: Mon, 13 Jul 2026 14:47:15 +0300 Subject: [PATCH] =?UTF-8?q?ci:=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA?= =?UTF-8?q?=D0=B8=20ucode=20stat=20=D0=B2=20=D1=81=D0=BA=D1=80=D0=B8=D0=BF?= =?UTF-8?q?=D1=82=D0=B5=20postinst=20=D0=BF=D0=B0=D0=BA=D0=B5=D1=82=D0=B0?= =?UTF-8?q?=20apk?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.sh | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/build.sh b/build.sh index 6a392c32..5f8a7af4 100644 --- a/build.sh +++ b/build.sh @@ -518,17 +518,16 @@ EOF #!/usr/bin/ucode if (getenv("IPKG_INSTROOT") == null || getenv("IPKG_INSTROOT") == "") { system("rm -rf /usr/lib/lua/luci/i18n/forkop.* /www/luci-static/resources/i18n/forkop.* /usr/share/luci/menu.d/luci-app-forkop.json /usr/share/rpcd/acl.d/luci-app-forkop.json /etc/uci-defaults/50_luci-forkop 2>/dev/null || true"); - let fs = require("fs"); - if (fs.stat("/etc/config/forkop")) { - fs.rename("/etc/config/forkop", "/etc/config/tachyon"); - } else if (fs.stat("/etc/config/forkop_plus")) { - fs.rename("/etc/config/forkop_plus", "/etc/config/tachyon"); - } else if (fs.stat("/etc/config/podkop")) { - fs.rename("/etc/config/podkop", "/etc/config/tachyon"); + if (system("test -f /etc/config/forkop") == 0) { + system("mv /etc/config/forkop /etc/config/tachyon"); + } else if (system("test -f /etc/config/forkop_plus") == 0) { + system("mv /etc/config/forkop_plus /etc/config/tachyon"); + } else if (system("test -f /etc/config/podkop") == 0) { + system("mv /etc/config/podkop /etc/config/tachyon"); system("TACHYON_LIB=/usr/lib/tachyon ucode -L /usr/lib/tachyon /usr/lib/tachyon/config/migration.uc migrate-podkop"); exit(0); - } else if (fs.stat("/etc/config/podkop_plus")) { - fs.rename("/etc/config/podkop_plus", "/etc/config/tachyon"); + } else if (system("test -f /etc/config/podkop_plus") == 0) { + system("mv /etc/config/podkop_plus /etc/config/tachyon"); system("TACHYON_LIB=/usr/lib/tachyon ucode -L /usr/lib/tachyon /usr/lib/tachyon/config/migration.uc migrate-podkop"); exit(0); } @@ -555,17 +554,16 @@ EOF #!/usr/bin/ucode if (getenv("IPKG_INSTROOT") == null || getenv("IPKG_INSTROOT") == "") { system("rm -rf /usr/lib/lua/luci/i18n/forkop.* /www/luci-static/resources/i18n/forkop.* /usr/share/luci/menu.d/luci-app-forkop.json /usr/share/rpcd/acl.d/luci-app-forkop.json /etc/uci-defaults/50_luci-forkop 2>/dev/null || true"); - let fs = require("fs"); - if (fs.stat("/etc/config/forkop")) { - fs.rename("/etc/config/forkop", "/etc/config/tachyon"); - } else if (fs.stat("/etc/config/forkop_plus")) { - fs.rename("/etc/config/forkop_plus", "/etc/config/tachyon"); - } else if (fs.stat("/etc/config/podkop")) { - fs.rename("/etc/config/podkop", "/etc/config/tachyon"); + if (system("test -f /etc/config/forkop") == 0) { + system("mv /etc/config/forkop /etc/config/tachyon"); + } else if (system("test -f /etc/config/forkop_plus") == 0) { + system("mv /etc/config/forkop_plus /etc/config/tachyon"); + } else if (system("test -f /etc/config/podkop") == 0) { + system("mv /etc/config/podkop /etc/config/tachyon"); system("TACHYON_LIB=/usr/lib/tachyon ucode -L /usr/lib/tachyon /usr/lib/tachyon/config/migration.uc migrate-podkop"); exit(0); - } else if (fs.stat("/etc/config/podkop_plus")) { - fs.rename("/etc/config/podkop_plus", "/etc/config/tachyon"); + } else if (system("test -f /etc/config/podkop_plus") == 0) { + system("mv /etc/config/podkop_plus /etc/config/tachyon"); system("TACHYON_LIB=/usr/lib/tachyon ucode -L /usr/lib/tachyon /usr/lib/tachyon/config/migration.uc migrate-podkop"); exit(0); }