Merge pull request #3 from freifunk-gluon/master

get all commits from master
This commit is contained in:
@RubenKelevra 2015-04-02 01:54:20 +02:00
commit 6c8fcb0405
30 changed files with 422 additions and 144 deletions

View File

@ -89,19 +89,20 @@ manifest: FORCE
@echo '$(GLUON_PRIORITY)' | grep -qE '^([0-9]*\.)?[0-9]+$$' || (echo 'Please specify a numeric value for GLUON_PRIORITY to create a manifest.'; false) @echo '$(GLUON_PRIORITY)' | grep -qE '^([0-9]*\.)?[0-9]+$$' || (echo 'Please specify a numeric value for GLUON_PRIORITY to create a manifest.'; false)
@$(CheckExternal) @$(CheckExternal)
mkdir -p $(GLUON_IMAGEDIR)/sysupgrade
( \ ( \
echo 'BRANCH=$(GLUON_BRANCH)' && \ echo 'BRANCH=$(GLUON_BRANCH)' && \
echo 'DATE=$(shell $(GLUON_ORIGOPENWRTDIR)/staging_dir/host/bin/lua $(GLUONDIR)/scripts/rfc3339date.lua)' && \ echo 'DATE=$(shell $(GLUON_ORIGOPENWRTDIR)/staging_dir/host/bin/lua $(GLUONDIR)/scripts/rfc3339date.lua)' && \
echo 'PRIORITY=$(GLUON_PRIORITY)' && \ echo 'PRIORITY=$(GLUON_PRIORITY)' && \
echo \ echo \
) > $(GLUON_IMAGEDIR)/sysupgrade/$(GLUON_BRANCH).manifest ) > $(GLUON_BUILDDIR)/$(GLUON_BRANCH).manifest.tmp
+($(foreach GLUON_TARGET,$(GLUON_TARGETS), \ +($(foreach GLUON_TARGET,$(GLUON_TARGETS), \
( [ ! -e $(BOARD_BUILDDIR)/prepared ] || ( $(GLUONMAKE) manifest GLUON_TARGET='$(GLUON_TARGET)' V=s$(OPENWRT_VERBOSE) ) ) && \ ( [ ! -e $(BOARD_BUILDDIR)/prepared ] || ( $(GLUONMAKE) manifest GLUON_TARGET='$(GLUON_TARGET)' V=s$(OPENWRT_VERBOSE) ) ) && \
) :) ) :)
mkdir -p $(GLUON_IMAGEDIR)/sysupgrade
mv $(GLUON_BUILDDIR)/$(GLUON_BRANCH).manifest.tmp $(GLUON_IMAGEDIR)/sysupgrade/$(GLUON_BRANCH).manifest
dirclean : FORCE dirclean : FORCE
for dir in build_dir dl staging_dir tmp; do \ for dir in build_dir dl staging_dir tmp; do \
rm -rf $(GLUON_ORIGOPENWRTDIR)/$$dir; \ rm -rf $(GLUON_ORIGOPENWRTDIR)/$$dir; \
@ -190,7 +191,9 @@ prepare-tmpinfo: FORCE
f=tmp/.$${type}info; t=tmp/.config-$${type}.in; \ f=tmp/.$${type}info; t=tmp/.config-$${type}.in; \
[ "$$t" -nt "$$f" ] || ./scripts/metadata.pl $${type}_config "$$f" > "$$t" || { rm -f "$$t"; echo "Failed to build $$t"; false; break; }; \ [ "$$t" -nt "$$f" ] || ./scripts/metadata.pl $${type}_config "$$f" > "$$t" || { rm -f "$$t"; echo "Failed to build $$t"; false; break; }; \
done done
[ tmp/.config-feeds.in -nt tmp/.packagefeeds ] || ./scripts/feeds feed_config > tmp/.config-feeds.in
./scripts/metadata.pl package_mk tmp/.packageinfo > tmp/.packagedeps || { rm -f tmp/.packagedeps; false; } ./scripts/metadata.pl package_mk tmp/.packageinfo > tmp/.packagedeps || { rm -f tmp/.packagedeps; false; }
./scripts/metadata.pl package_feeds tmp/.packageinfo > tmp/.packagefeeds || { rm -f tmp/.packagefeeds; false; }
touch $(TOPDIR)/tmp/.build touch $(TOPDIR)/tmp/.build
feeds: FORCE feeds: FORCE
@ -201,13 +204,24 @@ feeds: FORCE
+$(GLUONMAKE_EARLY) prepare-tmpinfo +$(GLUONMAKE_EARLY) prepare-tmpinfo
config: FORCE config: FORCE
+$(NO_TRACE_MAKE) scripts/config/conf OPENWRT_BUILD=0
+$(GLUONMAKE) prepare-tmpinfo +$(GLUONMAKE) prepare-tmpinfo
( \ ( \
cat $(GLUONDIR)/include/config $(GLUONDIR)/targets/$(GLUON_TARGET)/config; \ cat $(GLUONDIR)/include/config $(GLUONDIR)/targets/$(GLUON_TARGET)/config; \
echo 'CONFIG_BUILD_SUFFIX="gluon-$(GLUON_TARGET)"'; \
echo '$(patsubst %,CONFIG_PACKAGE_%=m,$(sort $(filter-out -%,$(GLUON_DEFAULT_PACKAGES) $(GLUON_SITE_PACKAGES) $(PROFILE_PACKAGES))))' \ echo '$(patsubst %,CONFIG_PACKAGE_%=m,$(sort $(filter-out -%,$(GLUON_DEFAULT_PACKAGES) $(GLUON_SITE_PACKAGES) $(PROFILE_PACKAGES))))' \
| sed -e 's/ /\n/g'; \ | sed -e 's/ /\n/g'; \
) > .config echo '$(patsubst %,CONFIG_GLUON_LANG_%=y,$(GLUON_LANGS))' \
+$(NO_TRACE_MAKE) defconfig OPENWRT_BUILD=0 | sed -e 's/ /\n/g'; \
) > $(BOARD_BUILDDIR)/config.tmp
scripts/config/conf --defconfig=$(BOARD_BUILDDIR)/config.tmp Config.in
mv .config $(BOARD_BUILDDIR)/config
echo 'CONFIG_ALL_KMODS=y' >> $(BOARD_BUILDDIR)/config.tmp
scripts/config/conf --defconfig=$(BOARD_BUILDDIR)/config.tmp Config.in
mv .config $(BOARD_BUILDDIR)/config-allmods
cp $(BOARD_BUILDDIR)/config .config
prepare-target: FORCE prepare-target: FORCE
rm $(GLUON_OPENWRTDIR)/tmp || true rm $(GLUON_OPENWRTDIR)/tmp || true
@ -243,7 +257,6 @@ clean: FORCE
rm -f $(gluon_prepared_stamp) rm -f $(gluon_prepared_stamp)
export MD5SUM := $(GLUONDIR)/scripts/md5sum.sh
export SHA512SUM := $(GLUONDIR)/scripts/sha512sum.sh export SHA512SUM := $(GLUONDIR)/scripts/sha512sum.sh
@ -293,11 +306,10 @@ include $(INCLUDE_DIR)/package-ipkg.mk
# override variables from rules.mk # override variables from rules.mk
PACKAGE_DIR = $(GLUON_OPENWRTDIR)/bin/$(BOARD)/packages PACKAGE_DIR = $(GLUON_OPENWRTDIR)/bin/$(BOARD)/packages
PROFILE_BUILDDIR = $(BOARD_BUILDDIR)/$(PROFILE) PROFILE_BUILDDIR = $(BOARD_BUILDDIR)/profiles/$(PROFILE)
PROFILE_KDIR = $(PROFILE_BUILDDIR)/kernel PROFILE_KDIR = $(PROFILE_BUILDDIR)/kernel
BIN_DIR = $(PROFILE_BUILDDIR)/images BIN_DIR = $(PROFILE_BUILDDIR)/images
TMP_DIR = $(PROFILE_BUILDDIR)/tmp
TARGET_DIR = $(PROFILE_BUILDDIR)/root TARGET_DIR = $(PROFILE_BUILDDIR)/root
PREPARED_RELEASE = $$(cat $(gluon_prepared_stamp)) PREPARED_RELEASE = $$(cat $(gluon_prepared_stamp))
@ -354,8 +366,8 @@ opkg_config: FORCE
image: FORCE image: FORCE
rm -rf $(TARGET_DIR) $(BIN_DIR) $(TMP_DIR) $(PROFILE_KDIR) rm -rf $(TARGET_DIR) $(BIN_DIR) $(PROFILE_KDIR)
mkdir -p $(TARGET_DIR) $(BIN_DIR) $(TMP_DIR) $(TARGET_DIR)/tmp $(GLUON_IMAGEDIR)/factory $(GLUON_IMAGEDIR)/sysupgrade mkdir -p $(TARGET_DIR) $(BIN_DIR) $(TARGET_DIR)/tmp $(GLUON_IMAGEDIR)/factory $(GLUON_IMAGEDIR)/sysupgrade
cp -r $(BOARD_KDIR) $(PROFILE_KDIR) cp -r $(BOARD_KDIR) $(PROFILE_KDIR)
+$(GLUONMAKE) package_install +$(GLUONMAKE) package_install
@ -393,7 +405,7 @@ manifest: FORCE
[ -e "$$file" ] && echo '$(model)' "$(PREPARED_RELEASE)" "$$($(SHA512SUM) "$$file")" "$$file"; \ [ -e "$$file" ] && echo '$(model)' "$(PREPARED_RELEASE)" "$$($(SHA512SUM) "$$file")" "$$file"; \
) \ ) \
) : \ ) : \
) >> $(GLUON_IMAGEDIR)/sysupgrade/$(GLUON_BRANCH).manifest ) >> $(GLUON_BUILDDIR)/$(GLUON_BRANCH).manifest.tmp
.PHONY: all images prepare clean gluon-tools manifest .PHONY: all images prepare clean gluon-tools manifest

View File

@ -18,23 +18,23 @@ See also
EOHELP EOHELP
exit 1 exit 1
fi fi
SECRET=$1 SECRET="$1"
manifest=$2 manifest="$2"
upper=$(mktemp) upper="$(mktemp)"
lower=$(mktemp) lower="$(mktemp)"
awk "BEGIN { sep=0 } awk "BEGIN { sep=0 }
/^---\$/ { sep=1; next } /^---\$/ { sep=1; next }
{ if(sep==0) print > \"$upper\"; { if(sep==0) print > \"$upper\";
else print > \"$lower\"}" \ else print > \"$lower\"}" \
$manifest "$manifest"
ecdsasign $upper < $SECRET >> $lower ecdsasign "$upper" < "$SECRET" >> "$lower"
cat $upper > $manifest cat "$upper" > "$manifest"
echo --- >> $manifest echo --- >> "$manifest"
cat $lower >> $manifest cat "$lower" >> "$manifest"
rm -f $upper $lower rm -f "$upper" "$lower"

View File

@ -54,9 +54,9 @@ copyright = '2014, Project Gluon'
# built documents. # built documents.
# #
# The short X.Y version. # The short X.Y version.
version = '2014.3' version = '2014.4+'
# The full version, including alpha/beta/rc tags. # The full version, including alpha/beta/rc tags.
release = '2014.3' release = '2014.4+'
# The language for content autogenerated by Sphinx. Refer to documentation # The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages. # for a list of supported languages.

View File

@ -98,6 +98,7 @@ Releases
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1
releases/v2015.1
releases/v2014.4 releases/v2014.4
releases/v2014.3.1 releases/v2014.3.1
releases/v2014.3 releases/v2014.3

30
docs/releases/v2015.1.rst Normal file
View File

@ -0,0 +1,30 @@
Gluon 2015.1 (in development)
=============================
Added (and removed) hardware support
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
New features
~~~~~~~~~~~~
Bugfixes
~~~~~~~~
Site changes
~~~~~~~~~~~~
* ``site.conf``
- ``hostname_prefix`` is now optional, and is concatenated directly with the
generated node ID, in particular no hyphen is inserted anymore. If you want
to keep the old behaviour, you have to append the hyphen to the
``hostname_prefix`` field of your ``site.conf``.
Internals
~~~~~~~~~
Known Issues
~~~~~~~~~~~~

View File

@ -0,0 +1,35 @@
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: PACKAGE VERSION\n"
"PO-Revision-Date: 2015-03-19 20:28+0100\n"
"Last-Translator: Matthias Schiffer <mschiffer@universe-factory.net>\n"
"Language-Team: German\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid "gluon-config-mode:welcome"
msgstr ""
"Willkommen zum Einrichtungsassistenten für deinen neuen Entenhausener "
"Freifunk-Knoten. Fülle das folgende Formular deinen Vorstellungen "
"entsprechend aus und sende es ab."
msgid "gluon-config-mode:pubkey"
msgstr ""
"Dies ist der öffentliche Schlüssel deines Freifunk-Knotens. Erst nachdem "
"er auf den Servern des Entenhausener Freifunk-Projektes eingetragen wurde, "
"kann sich dein Knoten mit dem Entenhausener Mesh-VPN zu verbinden. Bitte "
"schicke dazu diesen Schlüssel und den Namen deines Knotens "
"(<em><%=hostname%></em>) an "
"<a href=\"mailto:keys@entenhausen.freifunk.net\">keys@entenhausen.freifunk.net</a>."
msgid "gluon-config-mode:reboot"
msgstr ""
"<p>Dein Knoten startet gerade neu und wird anschließend versuchen, "
"sich mit anderen Freifunkknoten in seiner Nähe zu "
"verbinden. Weitere Informationen zur "
"Entenhausener Freifunk-Community findest du auf "
"<a href=\"https://entenhausen.freifunk.net/\">unserer Webseite</a>.</p>"
"<p>Viel Spaß mit deinem Knoten und der Erkundung von Freifunk!</p>"

View File

@ -0,0 +1,33 @@
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: PACKAGE VERSION\n"
"PO-Revision-Date: 2015-03-19 20:28+0100\n"
"Last-Translator: Matthias Schiffer <mschiffer@universe-factory.net>\n"
"Language-Team: English\n"
"Language: en\n"
"MIME-Version: 1.0\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid "gluon-config-mode:welcome"
msgstr ""
"Welcome the the setup wizard of your new Freifunk Duckburg node. "
"Please fill out the following form and transmit it."
msgid "gluon-config-mode:pubkey"
msgstr ""
"This is your Freifunk node's public key. The node won't be able to "
"connect to the mesh VPN until the key has been registered on the Freifunk "
"Duckburg servers. "
"To register the key send it together with your node's name (<em><%=hostname%></em>) to "
"<a href=\"mailto:keys@entenhausen.freifunk.net\">keys@entenhausen.freifunk.net</a>."
msgid "gluon-config-mode:reboot"
msgstr ""
"<p>The node is currently rebooting and will try to connect to other "
"nearby Freifunk nodes after that. "
"Your can find lots of information on the Freifunk Duckburg community on "
"<a href=\"https://entenhausen.freifunk.net/\">our homepage</a>.</p>"
"<p>Have fun with your node and exploring the Freifunk network!</p>"

View File

@ -0,0 +1,11 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
msgid "gluon-config-mode:welcome"
msgstr ""
msgid "gluon-config-mode:pubkey"
msgstr ""
msgid "gluon-config-mode:reboot"
msgstr ""

View File

@ -6,8 +6,8 @@
-- This configuration will not work as it. You're required to make -- This configuration will not work as it. You're required to make
-- community specific changes to it! -- community specific changes to it!
{ {
-- Used for generated hostnames, e.g. freifunk-abcdef123456. -- Used for generated hostnames, e.g. freifunk-abcdef123456. (optional)
hostname_prefix = 'freifunk', -- hostname_prefix = 'freifunk-',
-- Name of the community. -- Name of the community.
site_name = 'Freifunk Entenhausen', site_name = 'Freifunk Entenhausen',
@ -166,42 +166,4 @@
-- setup_mode = { -- setup_mode = {
-- skip = true, -- skip = true,
-- }, -- },
-- These strings are shown in config mode. Some HTML is permissible.
--
-- msg_welcome: shown at startup
-- msg_pubkey: shown when VPN is enabled
-- msg_reboot: shown during reboot (after finishing configuration)
--
-- You may use some variables, e.g.:
--
-- <%=hostname%> - the node's hostname
-- <%=pubkey%> - the fastd public key
-- <%=sysconfig.primary_mac%> - the node's primary MAC
config_mode = {
msg_welcome = [[
Willkommen zum Einrichtungsassistenten für deinen neuen Entenhausener
Freifunk-Knoten. Fülle das folgende Formular deinen Vorstellungen
entsprechend aus und sende es ab.
]],
msg_pubkey = [[
Dies ist der öffentliche Schlüssel deines Freifunk-Knotens. Erst nachdem
er auf den Servern des Entenhausener Freifunk-Projektes eingetragen wurde,
kann sich dein Knoten mit dem Entenhausener Mesh-VPN verbinden. Bitte
schicke dazu diesen Schlüssel und den Namen deines Knotens
(<em><%=hostname%></em>) an
<a href="mailto:keys@entenhausen.freifunk.net">keys@entenhausen.freifunk.net</a>.
]],
msg_reboot = [[
<p>
Dein Knoten startet gerade neu und wird anschließend versuchen,
sich mit anderen Freifunk-Knoten in seiner Nähe zu verbinden.
Weitere Informationen zur Entenhausener Freifunk-Community
findest du auf <a href="https://entenhausen.freifunk.net/">unserer Webseite</a>.
</p>
<p>
Viel Spaß mit deinem Knoten und der Erkundung von Freifunk!
</p>
]],
},
} }

View File

@ -48,3 +48,6 @@ GLUON_RELEASE ?= $(DEFAULT_GLUON_RELEASE)
# Default priority for updates. # Default priority for updates.
GLUON_PRIORITY ?= 0 GLUON_PRIORITY ?= 0
# Languages to include
GLUON_LANGS ?= en de

View File

@ -20,11 +20,25 @@ configuration located in *docs/site-example/*.
.. _Git tags: http://git-scm.com/book/en/Git-Basics-Tagging .. _Git tags: http://git-scm.com/book/en/Git-Basics-Tagging
.. _list of gluon releases: https://github.com/freifunk-gluon/gluon/releases .. _list of gluon releases: https://github.com/freifunk-gluon/gluon/releases
Building the image Dependencies
------------------ ------------
To build Gluon, several packages need to be installed on the system. On a
freshly installed Debian Wheezy system the following packages are required:
* `git` (to get Gluon and other dependencies)
* `subversion`
* `build-essential`
* `gawk`
* `unzip`
* `libncurses-dev` (actually `libncurses5-dev`)
* `libz-dev` (actually `zlib1g-dev`)
Building the images
-------------------
To build Gluon, first check out the repository. Replace *RELEASE* with the To build Gluon, first check out the repository. Replace *RELEASE* with the
version you'd like to checkout, e.g. *v2014.3*. version you'd like to checkout, e.g. *v2014.4*.
:: ::
@ -47,17 +61,15 @@ So let's create the directory *site/*:
mkdir site mkdir site
cd site cd site
Copy *site.conf* and *site.mk* from *docs/site-example*: Copy *site.conf*, *site.mk* and *i18n* from *docs/site-example*:
:: ::
cp ../docs/site-example/site.conf . cp ../docs/site-example/site.conf .
cp ../docs/site-example/site.mk . cp ../docs/site-example/site.mk .
cp -r ../docs/site-example/i18n .
.. note:: On **v2014.3**, take both files from Edit these files to match your community, then go back to the top-level Gluon
https://github.com/freifunk-gluon/gluon/tree/2014.3.x/docs/site-example
Edit both files to match your community, then go back to the top-level Gluon
directory and build Gluon: directory and build Gluon:
:: ::
@ -77,10 +89,7 @@ images are to be used when flashing from the original firmware a device came wit
and sysupgrade is to upgrade from other versions of Gluon or any other OpenWRT-based and sysupgrade is to upgrade from other versions of Gluon or any other OpenWRT-based
system. system.
For the build reserve 6GB of disk space. The build requires packages You should reserve about 10GB of disk space for each `GLUON_TARGET`.
for `subversion`, ncurses headers (`libncurses-dev`) and zlib headers
(`libz-dev`).
There are two levels of `make clean`: There are two levels of `make clean`:

View File

@ -159,7 +159,7 @@ roles : optional
}, },
simple_tc : package simple_tc : package
Uplink traffic control Uplink traffic control, ingress and egress values are specified in kbit/s.
:: ::
simple_tc = { simple_tc = {
@ -180,9 +180,6 @@ setup_mode : package
skip = true, skip = true,
}, },
config_mode : package
Configuration Mode text blocks
legacy : package legacy : package
Configuration for the legacy upgrade path. Configuration for the legacy upgrade path.
This is only required in communities upgrading from Lübeck's LFF-0.3.x. This is only required in communities upgrading from Lübeck's LFF-0.3.x.
@ -215,6 +212,30 @@ GLUON_PRIORITY
The default priority for the generated manifests (see the autoupdater documentation The default priority for the generated manifests (see the autoupdater documentation
for more information). for more information).
GLUON_LANGS
List of languages (as two-letter-codes) to include for the web interface. Should always contain
``en``.
Config mode texts
-----------------
The community-defined texts in the config mode are configured in PO files in the ``i18n`` subdirectory
of the site configuration. The message IDs currently defined are:
gluon-config-mode:welcome
Welcome text on the top of the config wizard page.
gluon-config-mode:pubkey
Information about the public VPN key on the reboot page.
gluon-config-mode:reboot
General information about the reboot page.
There is a POT file in the site example directory which can be used to create templates
for the language files. The command ``msginit -l en -i ../../docs/site-example/i18n/gluon-site.pot``
can be used from the ``i18n`` directory to create an initial PO file called ``en.po`` if the ``gettext``
utilities are installed.
Examples Examples
-------- --------
@ -230,6 +251,18 @@ site.conf
.. literalinclude:: ../site-example/site.conf .. literalinclude:: ../site-example/site.conf
:language: lua :language: lua
i18n/en.po
^^^^^^^^^^
.. literalinclude:: ../site-example/i18n/en.po
:language: po
i18n/de.po
^^^^^^^^^^
.. literalinclude:: ../site-example/i18n/de.po
:language: po
modules modules
^^^^^^^ ^^^^^^^

View File

@ -1,5 +1,18 @@
# code adjusted from openwrt/include/kernel-defaults.mk
override define Kernel/Configure override define Kernel/Configure
$(call Kernel/Configure/Default) $(LINUX_CONF_CMD) > $(LINUX_DIR)/.config.target
# copy CONFIG_KERNEL_* settings over to .config.target
awk '/^(#[[:space:]]+)?CONFIG_KERNEL/{sub("CONFIG_KERNEL_","CONFIG_");print}' $(BOARD_BUILDDIR)/config-allmods >> $(LINUX_DIR)/.config.target
echo "# CONFIG_KALLSYMS_EXTRA_PASS is not set" >> $(LINUX_DIR)/.config.target
echo "# CONFIG_KALLSYMS_ALL is not set" >> $(LINUX_DIR)/.config.target
echo "# CONFIG_KALLSYMS_UNCOMPRESSED is not set" >> $(LINUX_DIR)/.config.target
echo "# CONFIG_KPROBES is not set" >> $(LINUX_DIR)/.config.target
$(SCRIPT_DIR)/metadata.pl kconfig $(TMP_DIR)/.packageinfo $(BOARD_BUILDDIR)/config-allmods > $(LINUX_DIR)/.config.override
$(SCRIPT_DIR)/kconfig.pl 'm+' '+' $(LINUX_DIR)/.config.target /dev/null $(LINUX_DIR)/.config.override > $(LINUX_DIR)/.config
$(call Kernel/SetNoInitramfs)
rm -rf $(KERNEL_BUILD_DIR)/modules
$(_SINGLE) [ -d $(LINUX_DIR)/user_headers ] || $(MAKE) $(KERNEL_MAKEOPTS) INSTALL_HDR_PATH=$(LINUX_DIR)/user_headers headers_install
cp $(GLUONDIR)/targets/$(GLUON_TARGET)/vermagic $(LINUX_DIR)/.vermagic cp $(GLUONDIR)/targets/$(GLUON_TARGET)/vermagic $(LINUX_DIR)/.vermagic
endef endef

View File

@ -1,8 +1,8 @@
CONFIG_ALL_KMODS=y
CONFIG_IMAGEOPT=y CONFIG_IMAGEOPT=y
# CONFIG_PER_FEED_REPO is not set # CONFIG_PER_FEED_REPO is not set
CONFIG_DEVEL=y
CONFIG_BUSYBOX_CUSTOM=y CONFIG_BUSYBOX_CUSTOM=y
CONFIG_BUSYBOX_CONFIG_SHA512SUM=y CONFIG_BUSYBOX_CONFIG_SHA512SUM=y
# CONFIG_BUSYBOX_CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set # CONFIG_BUSYBOX_CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set

View File

@ -14,6 +14,8 @@ export GLUONDIR GLUON_SITEDIR GLUON_SITE_CONFIG GLUON_IMAGEDIR GLUON_BUILDDIR
BOARD_BUILDDIR = $(GLUON_BUILDDIR)/$(GLUON_TARGET) BOARD_BUILDDIR = $(GLUON_BUILDDIR)/$(GLUON_TARGET)
BOARD_KDIR = $(BOARD_BUILDDIR)/kernel BOARD_KDIR = $(BOARD_BUILDDIR)/kernel
export BOARD_BUILDDIR
GLUON_OPENWRTDIR = $(BOARD_BUILDDIR)/openwrt GLUON_OPENWRTDIR = $(BOARD_BUILDDIR)/openwrt
@ -26,6 +28,9 @@ $(GLUON_SITEDIR)/site.mk:
GLUON_VERSION := $(shell cd $(GLUONDIR) && git describe --always 2>/dev/null || echo unknown) GLUON_VERSION := $(shell cd $(GLUONDIR) && git describe --always 2>/dev/null || echo unknown)
export GLUON_VERSION export GLUON_VERSION
GLUON_LANGS ?= en
export GLUON_LANGS
ifeq ($(OPENWRT_BUILD),1) ifeq ($(OPENWRT_BUILD),1)
ifeq ($(GLUON_TOOLS),1) ifeq ($(GLUON_TOOLS),1)

View File

@ -6,3 +6,55 @@ define GluonCheckSite
$(shell cat $(1) | sed -ne '1h; 1!H; $$ {g; s/@/+@/g; s/\n/-@/g; p}') $(shell cat $(1) | sed -ne '1h; 1!H; $$ {g; s/@/+@/g; s/\n/-@/g; p}')
END__GLUON__CHECK__SITE END__GLUON__CHECK__SITE
endef endef
# Languages supported by LuCi
GLUON_SUPPORTED_LANGS := ca zh_cn en fr de el he hu it ja ms no pl pt_br pt ro ru es sv uk vi
GLUON_LANG_ca := catalan
GLUON_LANG_zh_cn := chinese
GLUON_LANG_en := english
GLUON_LANG_fr := french
GLUON_LANG_de := german
GLUON_LANG_el := greek
GLUON_LANG_he := hebrew
GLUON_LANG_hu := hungarian
GLUON_LANG_it := italian
GLUON_LANG_ja := japanese
GLUON_LANG_ms := malay
GLUON_LANG_no := norwegian
GLUON_LANG_pl := polish
GLUON_LANG_pt_br := portuguese-brazilian
GLUON_LANG_pt := portuguese
GLUON_LANG_ro := romanian
GLUON_LANG_ru := russian
GLUON_LANG_es := spanish
GLUON_LANG_sv := swedish
GLUON_LANG_uk := ukrainian
GLUON_LANG_vi := vietnamese
GLUON_I18N_PACKAGES := $(foreach lang,$(GLUON_SUPPORTED_LANGS),+GLUON_LANG_$(lang):luci-i18n-$(GLUON_LANG_$(lang)))
GLUON_I18N_CONFIG := $(foreach lang,$(GLUON_SUPPORTED_LANGS),CONFIG_GLUON_LANG_$(lang))
GLUON_ENABLED_LANGS := $(foreach lang,$(GLUON_SUPPORTED_LANGS),$(if $(CONFIG_GLUON_LANG_$(lang)),$(lang)))
GLUON_PO2LMO := $(BUILD_DIR)/luci/build/po2lmo
define GluonBuildI18N
mkdir -p $$(PKG_BUILD_DIR)/i18n
for lang in $$(GLUON_ENABLED_LANGS); do \
if [ -e $(2)/$$$$lang.po ]; then \
rm -f $$(PKG_BUILD_DIR)/i18n/$(1).$$$$lang.lmo; \
$(GLUON_PO2LMO) $(2)/$$$$lang.po $$(PKG_BUILD_DIR)/i18n/$(1).$$$$lang.lmo; \
fi; \
done
endef
define GluonInstallI18N
$$(INSTALL_DIR) $(2)/usr/lib/lua/luci/i18n
for lang in $$(GLUON_ENABLED_LANGS); do \
if [ -e $$(PKG_BUILD_DIR)/i18n/$(1).$$$$lang.lmo ]; then \
$$(INSTALL_DATA) $$(PKG_BUILD_DIR)/i18n/$(1).$$$$lang.lmo $(2)/usr/lib/lua/luci/i18n/$(1).$$$$lang.lmo; \
fi; \
done
endef

View File

@ -1,14 +1,14 @@
GLUON_FEEDS='openwrt gluon routing luci' GLUON_FEEDS='openwrt gluon routing luci'
OPENWRT_REPO=git://git.openwrt.org/14.07/openwrt.git OPENWRT_REPO=git://git.openwrt.org/14.07/openwrt.git
OPENWRT_COMMIT=878af3117f68c2f8d6b3d6582e50c6cef521f6f7 OPENWRT_COMMIT=64ae631f20eb349b47dae30c461ab33b5c4ac5c2
PACKAGES_OPENWRT_REPO=git://github.com/openwrt/packages.git PACKAGES_OPENWRT_REPO=git://github.com/openwrt/packages.git
PACKAGES_OPENWRT_COMMIT=01fcd1f29174a56d6ddb59901ed8c67ea42c3a8f PACKAGES_OPENWRT_COMMIT=01fcd1f29174a56d6ddb59901ed8c67ea42c3a8f
PACKAGES_OPENWRT_BRANCH=for-14.07 PACKAGES_OPENWRT_BRANCH=for-14.07
PACKAGES_GLUON_REPO=git://github.com/freifunk-gluon/packages.git PACKAGES_GLUON_REPO=git://github.com/freifunk-gluon/packages.git
PACKAGES_GLUON_COMMIT=2d0f8b38dbf6b01f77c780c7c80a995116e3eca8 PACKAGES_GLUON_COMMIT=f5c0865d5025a7e6ad3ff6c21ca5206ac972ba75
PACKAGES_ROUTING_REPO=git://github.com/openwrt-routing/packages.git PACKAGES_ROUTING_REPO=git://github.com/openwrt-routing/packages.git
PACKAGES_ROUTING_COMMIT=5d4ad63897b435d5df0f39a49bd58962c22c33b8 PACKAGES_ROUTING_COMMIT=5d4ad63897b435d5df0f39a49bd58962c22c33b8

View File

@ -3,7 +3,7 @@ Date: Sat, 16 Aug 2014 17:52:34 +0200
Subject: ar71xx: correctly detect hardware revision on TP-Link Archer C5 and C7 Subject: ar71xx: correctly detect hardware revision on TP-Link Archer C5 and C7
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index df35775..6694839 100755 index 18da356..1709356 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -214,6 +214,13 @@ tplink_board_detect() { @@ -214,6 +214,13 @@ tplink_board_detect() {

View File

@ -62,7 +62,7 @@ index 4be30b8..78f4992 100755
rb-2011l | \ rb-2011l | \
rb-2011uas |\ rb-2011uas |\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 6694839..c13a8eb 100755 index 1709356..9fb4102 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -229,6 +229,39 @@ tplink_board_detect() { @@ -229,6 +229,39 @@ tplink_board_detect() {

View File

@ -44,7 +44,7 @@ index 78f4992..c494310 100755
mr600v2 |\ mr600v2 |\
rb-411 |\ rb-411 |\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index c13a8eb..19cd1a7 100755 index 9fb4102..79b6073 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -396,6 +396,9 @@ ar71xx_board_detect() { @@ -396,6 +396,9 @@ ar71xx_board_detect() {

View File

@ -5,7 +5,7 @@ Subject: ar71xx: fix board detection for TP-LINK TL-WA860RE
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 19cd1a7..b0a0bd6 100755 index 79b6073..13c5bf2 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -630,6 +630,9 @@ ar71xx_board_detect() { @@ -630,6 +630,9 @@ ar71xx_board_detect() {

View File

@ -48,7 +48,7 @@ index c494310..3ccb917 100755
wnr2200 |\ wnr2200 |\
wnr612-v2) wnr612-v2)
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index b0a0bd6..c03fe72 100755 index 13c5bf2..5fbca92 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -681,6 +681,9 @@ ar71xx_board_detect() { @@ -681,6 +681,9 @@ ar71xx_board_detect() {

View File

@ -19,7 +19,7 @@ index f0d5d70..6aac86a 100755
status_led="ubnt:white:status" status_led="ubnt:white:status"
;; ;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index c03fe72..9e70397 100755 index 5fbca92..61a7936 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -723,6 +723,9 @@ ar71xx_board_detect() { @@ -723,6 +723,9 @@ ar71xx_board_detect() {

View File

@ -6,7 +6,7 @@ There are two versions of the GL.iNet, the 6408A and the 6416A. The only
difference is the flash size. difference is the flash size.
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 9e70397..ac7f787 100755 index 61a7936..a698ce5 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -262,6 +262,19 @@ tplink_pharos_board_detect() { @@ -262,6 +262,19 @@ tplink_pharos_board_detect() {

View File

@ -1,5 +1,5 @@
From: Matthias Schiffer <mschiffer@universe-factory.net> From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Sun, 15 Mar 2015 17:01:32 +0100 Date: Mon, 23 Mar 2015 21:11:41 +0100
Subject: x86: use PARTUUID instead explicitly specifying the device by default Subject: x86: use PARTUUID instead explicitly specifying the device by default
This changes the x86 image generation to match x86_64, using the PARTUUID for This changes the x86 image generation to match x86_64, using the PARTUUID for
@ -143,14 +143,14 @@ index a2dd20a..73ab5ef 100644
+ fi + fi
} }
diff --git a/target/linux/x86/image/Makefile b/target/linux/x86/image/Makefile diff --git a/target/linux/x86/image/Makefile b/target/linux/x86/image/Makefile
index 5983718..a0045a7 100644 index 5983718..1f91b9f 100644
--- a/target/linux/x86/image/Makefile --- a/target/linux/x86/image/Makefile
+++ b/target/linux/x86/image/Makefile +++ b/target/linux/x86/image/Makefile
@@ -40,7 +40,9 @@ ifneq ($(GRUB_TERMINALS),) @@ -40,7 +40,9 @@ ifneq ($(GRUB_TERMINALS),)
GRUB_TERMINAL_CONFIG := terminal_input $(GRUB_TERMINALS); terminal_output $(GRUB_TERMINALS) GRUB_TERMINAL_CONFIG := terminal_input $(GRUB_TERMINALS); terminal_output $(GRUB_TERMINALS)
endif endif
+SIGNATURE:=$(shell dd if=/dev/urandom bs=4 count=1 2>/dev/null | hexdump -v -e '"%02x"') +SIGNATURE:=$(shell dd if=/dev/urandom bs=4 count=1 2>/dev/null | hexdump -v -e '"%08x"')
ROOTPART:=$(call qstrip,$(CONFIG_TARGET_ROOTFS_PARTNAME)) ROOTPART:=$(call qstrip,$(CONFIG_TARGET_ROOTFS_PARTNAME))
+ROOTPART:=$(if $(ROOTPART),$(ROOTPART),PARTUUID=$(SIGNATURE)-02) +ROOTPART:=$(if $(ROOTPART),$(ROOTPART),PARTUUID=$(SIGNATURE)-02)

View File

@ -1,51 +1,64 @@
From: Matthias Schiffer <mschiffer@universe-factory.net> From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Sun, 15 Mar 2015 19:51:15 +0100 Date: Sun, 29 Mar 2015 13:23:26 +0200
Subject: ar71xx: fix model string detection on NETGEAR WNDR3700/3800/WNDRMAC Subject: ar71xx: fix model string detection on NETGEAR WNDR3700/3800/WNDRMAC
There were a few issues with the existing code to detect the model string: There were a few issues with the existing code to detect the model string:
* Always using the string starting with byte 56 would cut off the W of WNDR when * Always using the string starting with byte 56 would cut off the W of WNDR when
the ID starts with 29763654+16+128 instead of 29763654+16+64 the ID starts with 29763654+16+64 instead of 29763654+16+128
* The string contained garbage after the zero byte instead of cutting it off * The string contained garbage after the zero byte instead of cutting it off
after the zero (which wasn't always visible using busybox tools, but could after the zero (which wasn't always visible using busybox tools, but could
confuse other scripts) confuse other scripts)
Tested on a WNDR3700v1 and a WNDR3700v2 using the new 29763654+16+64 ID in the
ART. Furthermore, tested against ART dumps of a WNDR3700v2 using the old
$'\xff...' value and a WNDR3800.
The [ -z "$model" ] check was dropped as there is no way to actually hit this
unless no ART partition is found at all.
The awk command was carefully crafted to work both with gawk and the (horribly
broken) busybox awk.
Fixes #18992.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index ac7f787..f50a236 100755 index a698ce5..1838cb4 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -37,16 +37,28 @@ wndr3700_board_detect() { @@ -37,16 +37,26 @@ wndr3700_board_detect() {
machine="NETGEAR WNDR3700" machine="NETGEAR WNDR3700"
;; ;;
"33373031") "33373031")
- local model - local model
- model=$(ar71xx_get_mtd_offset_size_format art 56 10 %c) - model=$(ar71xx_get_mtd_offset_size_format art 56 10 %c)
- if [ -z "$model" ] || [ "$model" = $'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' ]; then - if [ -z "$model" ] || [ "$model" = $'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' ]; then
+ case "$(ar71xx_get_mtd_offset_size_format art 56 10 %c)" in - machine="NETGEAR WNDR3700v2"
+ $'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff')
machine="NETGEAR WNDR3700v2"
- elif [ -z "$model" ] || [ "$model" = $'\xff\xff\xff\xff\xff\xff\xff\xff\xffN' ]; then - elif [ -z "$model" ] || [ "$model" = $'\xff\xff\xff\xff\xff\xff\xff\xff\xffN' ]; then
+ ;; - machine="NETGEAR WNDRMAC"
+ $'\xff\xff\xff\xff\xff\xff\xff\xff\xffN')
machine="NETGEAR WNDRMAC"
- else - else
- machine="NETGEAR $model" + # Use awk to remove everything after the first zero byte
- fi + model="$(ar71xx_get_mtd_offset_size_format art 41 32 %c | awk 'BEGIN{FS="[[:cntrl:]]"} {print $1; exit}')"
- ;; + case $model in
+ $'\xff'*)
+ if [ "${model:24:1}" = 'N' ]; then
+ machine="NETGEAR WNDRMAC"
+ else
+ machine="NETGEAR WNDR3700v2"
+ fi
+ ;;
+ '29763654+16+64'*)
+ machine="NETGEAR ${model:14}"
+ ;;
+ '29763654+16+128'*)
+ machine="NETGEAR ${model:15}"
+ ;; + ;;
+ *) + *)
+ # Use awk to remove everything after the first zero byte + # Unknown ID
+ model="$(ar71xx_get_mtd_offset_size_format art 41 32 %c | awk 'BEGIN{FS="[[:cntrl:]]"} {print $1; exit}')" machine="NETGEAR $model"
+ case $model in - fi
+ '29763654+16+64'*) - ;;
+ machine="NETGEAR ${model:14}"
+ ;;
+ '29763654+16+128'*)
+ machine="NETGEAR ${model:15}"
+ ;;
+ *)
+ # Unknown ID
+ machine="NETGEAR $model"
+ esac
+ esac + esac
esac esac

View File

@ -0,0 +1,26 @@
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Wed, 18 Mar 2015 20:07:22 +0100
Subject: build: define STAMP_CONFIGURED recursively
Defining STAMP_CONFIGURED statically caused it not to reflect changes to
PKG_CONFIG_DEPENDS made after including package.mk, like the additional options
added by feeds.mk for all packages.
Furthermore, as STAMP_CONFIGURED_WILDCARD was already defined recursively, the
patsubst in its definition would never match, and in consequence, the stamps
were never removed. This caused packages not to be rebuilt when they should have
been.
diff --git a/include/package.mk b/include/package.mk
index 53ca6de..402fb1a 100644
--- a/include/package.mk
+++ b/include/package.mk
@@ -60,7 +60,7 @@ ifneq ($(PREV_STAMP_PREPARED),)
else
STAMP_PREPARED=$(PKG_BUILD_DIR)/.prepared$(if $(QUILT)$(DUMP),,_$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPENDS),))$(call confvar,$(PKG_PREPARED_DEPENDS)))
endif
-STAMP_CONFIGURED:=$(PKG_BUILD_DIR)/.configured$(if $(DUMP),,_$(call confvar,$(PKG_CONFIG_DEPENDS)))
+STAMP_CONFIGURED=$(PKG_BUILD_DIR)/.configured$(if $(DUMP),,_$(call confvar,$(PKG_CONFIG_DEPENDS)))
STAMP_CONFIGURED_WILDCARD=$(patsubst %_$(call confvar,$(PKG_CONFIG_DEPENDS)),%_*,$(STAMP_CONFIGURED))
STAMP_BUILT:=$(PKG_BUILD_DIR)/.built
STAMP_INSTALLED:=$(STAGING_DIR)/stamp/.$(PKG_NAME)_installed

View File

@ -0,0 +1,30 @@
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Sat, 21 Mar 2015 16:40:52 +0100
Subject: base-files: disable reset button handling
This conflicts with our reset button usage.
diff --git a/package/base-files/files/etc/rc.button/reset b/package/base-files/files/etc/rc.button/reset
deleted file mode 100755
index 229b503..0000000
--- a/package/base-files/files/etc/rc.button/reset
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-
-[ "${ACTION}" = "released" ] || exit 0
-
-. /lib/functions.sh
-
-logger "$BUTTON pressed for $SEEN seconds"
-
-if [ "$SEEN" -lt 1 ]
-then
- echo "REBOOT" > /dev/console
- sync
- reboot
-elif [ "$SEEN" -gt 5 ]
-then
- echo "FACTORY RESET" > /dev/console
- jffs2reset -y && reboot &
-fi

View File

@ -0,0 +1,28 @@
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Thu, 19 Mar 2015 18:44:52 +0100
Subject: modules/base: dispatcher: set default language if none provided by the browser matches
diff --git a/modules/base/luasrc/dispatcher.lua b/modules/base/luasrc/dispatcher.lua
index f7e16e7..479ac54 100644
--- a/modules/base/luasrc/dispatcher.lua
+++ b/modules/base/luasrc/dispatcher.lua
@@ -211,6 +211,7 @@ function dispatch(request)
assert(conf.main,
"/etc/config/luci seems to be corrupt, unable to find section 'main'")
+ local i18n = require "luci.i18n"
local lang = conf.main.lang or "auto"
if lang == "auto" then
local aclang = http.getenv("HTTP_ACCEPT_LANGUAGE") or ""
@@ -222,7 +223,10 @@ function dispatch(request)
end
end
end
- require "luci.i18n".setlanguage(lang)
+ if lang == "auto" then
+ lang = i18n.default
+ end
+ i18n.setlanguage(lang)
local c = ctx.tree
local stat

View File

@ -1,18 +0,0 @@
#!/bin/sh
check_command() {
which $1 >/dev/null 2>&1
}
if check_command md5sum; then
ret="$(md5sum "$@")"
elif check_command md5; then
ret="$(md5 -q "$@")"
else
echo "$0: no suitable md5sum implementation was found" >&1
exit 1
fi
[ "$?" -eq 0 ] || exit 1
echo "$ret" | awk '{ print $1 }'