From f7e02ac2d65fc53f5c5ebf71cddc743a4aa8bbfd Mon Sep 17 00:00:00 2001 From: jjm2473 <1129525450@qq.com> Date: Thu, 12 May 2022 20:53:43 +0800 Subject: [PATCH] remove duplicated files --- .../base-files/files/etc/init.d/fix_luci_lang | 22 --------- package/base-files/files/usr/bin/luci18n2name | 45 ------------------- .../lib/lua/luci/controller/admin/compat.lua | 10 ----- .../luci/menu.d/luci-mod-system-fstab.json | 9 ---- 4 files changed, 86 deletions(-) delete mode 100755 package/base-files/files/etc/init.d/fix_luci_lang delete mode 100755 package/base-files/files/usr/bin/luci18n2name delete mode 100644 target/linux/realtek/base-files/usr/lib/lua/luci/controller/admin/compat.lua delete mode 100644 target/linux/realtek/base-files/usr/share/luci/menu.d/luci-mod-system-fstab.json diff --git a/package/base-files/files/etc/init.d/fix_luci_lang b/package/base-files/files/etc/init.d/fix_luci_lang deleted file mode 100755 index 7e3ebeef7c..0000000000 --- a/package/base-files/files/etc/init.d/fix_luci_lang +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2016 OpenWrt.org - -START=49 - -list_langs() { - cd /usr/lib/lua/luci/i18n - ls | sed -e 's/.*\.\([^\.]*\)\.lmo/\1/g' | sort -u -} - -boot() { - local lang - local name - for lang in `list_langs` - do - if ! uci get luci.languages.${lang//-/_} >/dev/null 2>&1; then - name=`luci18n2name $lang` - uci set "luci.languages.${lang//-/_}=${name:-$lang}" - fi - done - uci changes luci | grep -Fqm1 luci 2>/dev/null && uci commit luci >/dev/null 2>&1 -} diff --git a/package/base-files/files/usr/bin/luci18n2name b/package/base-files/files/usr/bin/luci18n2name deleted file mode 100755 index 33cdd8dcbd..0000000000 --- a/package/base-files/files/usr/bin/luci18n2name +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh -# author: jjm2473 - -toname() { - local lang_ar="العربية (Arabic)" - local lang_bg="български (Bulgarian)" - local lang_bn="বাংলা (Bengali)" - local lang_ca="Català (Catalan)" - local lang_cs="Čeština (Czech)" - local lang_da="Dansk (Danish)" - local lang_de="Deutsch (German)" - local lang_el="Ελληνικά (Greek)" - local lang_en="English" - local lang_es="Español (Spanish)" - local lang_fi="Suomi (Finnish)" - local lang_fr="Français (French)" - local lang_he="עִבְרִית (Hebrew)" - local lang_hi="हिंदी (Hindi)" - local lang_hu="Magyar (Hungarian)" - local lang_it="Italiano (Italian)" - local lang_ja="日本語 (Japanese)" - local lang_ko="한국어 (Korean)" - local lang_mr="Marāṭhī (Marathi)" - local lang_ms="Bahasa Melayu (Malay)" - local lang_no="Norsk (Norwegian)" - local lang_nl="Nederlands (Dutch)" - local lang_pl="Polski (Polish)" - local lang_pt_br="Português do Brasil (Brazilian Portuguese)" - local lang_pt="Português (Portuguese)" - local lang_ro="Română (Romanian)" - local lang_ru="Русский (Russian)" - local lang_sk="Slovenčina (Slovak)" - local lang_sv="Svenska (Swedish)" - local lang_tr="Türkçe (Turkish)" - local lang_uk="Українська (Ukrainian)" - local lang_vi="Tiếng Việt (Vietnamese)" - local lang_zh_cn="简体中文 (Chinese Simplified)" - local lang_zh_tw="繁體中文 (Chinese Traditional)" - - eval "[ -n \"\${lang_$1}\" ] && echo \${lang_$1}" -} - -if [ -n "$1" ]; then - toname ${1//-/_} -fi diff --git a/target/linux/realtek/base-files/usr/lib/lua/luci/controller/admin/compat.lua b/target/linux/realtek/base-files/usr/lib/lua/luci/controller/admin/compat.lua deleted file mode 100644 index bad1b46e61..0000000000 --- a/target/linux/realtek/base-files/usr/lib/lua/luci/controller/admin/compat.lua +++ /dev/null @@ -1,10 +0,0 @@ --- Copyright 2022 jjm2473 --- Licensed to the public under the Apache License 2.0. - -module("luci.controller.admin.compat", package.seeall) - -function action_fatab() - local dsp = require "luci.dispatcher" - - luci.http.redirect(dsp.build_url("admin/system/mounts")) -end diff --git a/target/linux/realtek/base-files/usr/share/luci/menu.d/luci-mod-system-fstab.json b/target/linux/realtek/base-files/usr/share/luci/menu.d/luci-mod-system-fstab.json deleted file mode 100644 index 88d8977c97..0000000000 --- a/target/linux/realtek/base-files/usr/share/luci/menu.d/luci-mod-system-fstab.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "admin/system/fstab": { - "action": { - "type": "call", - "module": "luci.controller.admin.compat", - "function": "action_fatab" - } - } -}