ci: исправление ошибки ucode stat в скрипте postinst пакета apk
This commit is contained in:
@@ -518,17 +518,16 @@ EOF
|
|||||||
#!/usr/bin/ucode
|
#!/usr/bin/ucode
|
||||||
if (getenv("IPKG_INSTROOT") == null || getenv("IPKG_INSTROOT") == "") {
|
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");
|
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 (system("test -f /etc/config/forkop") == 0) {
|
||||||
if (fs.stat("/etc/config/forkop")) {
|
system("mv /etc/config/forkop /etc/config/tachyon");
|
||||||
fs.rename("/etc/config/forkop", "/etc/config/tachyon");
|
} else if (system("test -f /etc/config/forkop_plus") == 0) {
|
||||||
} else if (fs.stat("/etc/config/forkop_plus")) {
|
system("mv /etc/config/forkop_plus /etc/config/tachyon");
|
||||||
fs.rename("/etc/config/forkop_plus", "/etc/config/tachyon");
|
} else if (system("test -f /etc/config/podkop") == 0) {
|
||||||
} else if (fs.stat("/etc/config/podkop")) {
|
system("mv /etc/config/podkop /etc/config/tachyon");
|
||||||
fs.rename("/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");
|
system("TACHYON_LIB=/usr/lib/tachyon ucode -L /usr/lib/tachyon /usr/lib/tachyon/config/migration.uc migrate-podkop");
|
||||||
exit(0);
|
exit(0);
|
||||||
} else if (fs.stat("/etc/config/podkop_plus")) {
|
} else if (system("test -f /etc/config/podkop_plus") == 0) {
|
||||||
fs.rename("/etc/config/podkop_plus", "/etc/config/tachyon");
|
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");
|
system("TACHYON_LIB=/usr/lib/tachyon ucode -L /usr/lib/tachyon /usr/lib/tachyon/config/migration.uc migrate-podkop");
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
@@ -555,17 +554,16 @@ EOF
|
|||||||
#!/usr/bin/ucode
|
#!/usr/bin/ucode
|
||||||
if (getenv("IPKG_INSTROOT") == null || getenv("IPKG_INSTROOT") == "") {
|
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");
|
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 (system("test -f /etc/config/forkop") == 0) {
|
||||||
if (fs.stat("/etc/config/forkop")) {
|
system("mv /etc/config/forkop /etc/config/tachyon");
|
||||||
fs.rename("/etc/config/forkop", "/etc/config/tachyon");
|
} else if (system("test -f /etc/config/forkop_plus") == 0) {
|
||||||
} else if (fs.stat("/etc/config/forkop_plus")) {
|
system("mv /etc/config/forkop_plus /etc/config/tachyon");
|
||||||
fs.rename("/etc/config/forkop_plus", "/etc/config/tachyon");
|
} else if (system("test -f /etc/config/podkop") == 0) {
|
||||||
} else if (fs.stat("/etc/config/podkop")) {
|
system("mv /etc/config/podkop /etc/config/tachyon");
|
||||||
fs.rename("/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");
|
system("TACHYON_LIB=/usr/lib/tachyon ucode -L /usr/lib/tachyon /usr/lib/tachyon/config/migration.uc migrate-podkop");
|
||||||
exit(0);
|
exit(0);
|
||||||
} else if (fs.stat("/etc/config/podkop_plus")) {
|
} else if (system("test -f /etc/config/podkop_plus") == 0) {
|
||||||
fs.rename("/etc/config/podkop_plus", "/etc/config/tachyon");
|
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");
|
system("TACHYON_LIB=/usr/lib/tachyon ucode -L /usr/lib/tachyon /usr/lib/tachyon/config/migration.uc migrate-podkop");
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user