Commit Graph

477 Commits

Author SHA1 Message Date
Matthias Schiffer 779d428d9a gluon-alfred: split announce.lua into several files and move parts into the appropriate packages
This also fixes the type of a few fields which were strings instead of numbers.
2014-06-09 19:23:16 +02:00
Matthias Schiffer 1b259eefe5 gluon-core: add gluon.model lua module 2014-06-09 17:56:29 +02:00
ohrensessel 087c8354c9 Allow sysconfig variable to be used on reboot page 2014-06-07 13:43:31 +02:00
Matthias Schiffer 9786be0d15 Add gluon-firewall package to mitigate open resolver issue
Original patch by Daniel Ehlers <danielehlers@mindeye.net>
2014-06-06 12:59:32 +02:00
Daniel Ehlers 6f9fbcc6b7 gluon-mesh-batman-adv: Do not ACCEPT incoming packets.
For security reasons we should not accept incoming packets per default
and instead allow specific services on specific interfaces.
2014-06-06 11:36:03 +02:00
Matthias Schiffer c64bdff1c0 gluon-config: add /lib/gluon/release
/lib/gluon/release had been lost during the conversion to the new site config
format.
2014-05-19 00:09:14 +02:00
Matthias Schiffer d1cd4a7f53 gluon-config-mode: allow using templates for texts again 2014-05-17 13:43:08 +02:00
Matthias Schiffer e16bfbe309 gluon-autoupdater: replace config script generator with Lua script 2014-05-17 13:43:08 +02:00
Matthias Schiffer 7111337bad gluon-mesh-vpn-fastd: replace config script generator with Lua script 2014-05-17 13:43:08 +02:00
Matthias Schiffer 58f791456c gluon-simple-tc: replace config script generator with Lua script 2014-05-17 13:43:08 +02:00
Matthias Schiffer ee99b776be gluon-core: make Lua files proper modules 2014-05-17 13:43:08 +02:00
Matthias Schiffer 445869d46b gluon-legacy: don't use generated scripts anymore 2014-05-17 13:43:02 +02:00
Matthias Schiffer 2f5cb19db9 gluon-next-node: convert pregenerated ebtables rules to Lua code 2014-05-14 15:08:43 +02:00
Matthias Schiffer 7e6c2d563f gluon-ebtables: use Lua instead of sh for the rule DSL to increase flexibility 2014-05-14 15:02:57 +02:00
Matthias Schiffer f3dcb8c86c gluon-radvd: replace pregenerated config file with Lua script 2014-05-14 14:30:13 +02:00
Matthias Schiffer fc6ed51580 gluon-config-mode: fix reboot.htm validity 2014-05-14 13:48:47 +02:00
Matthias Schiffer dfd3eedcf8 gluon-config-mode: convert templates to use the new site config 2014-05-14 13:23:15 +02:00
Matthias Schiffer df315034db gluon-next-node: convert upgrade script to Lua 2014-05-14 12:31:16 +02:00
Matthias Schiffer 6321172845 gluon-mesh-batman-adv: convert generated upgrade scripts to Lua 2014-05-14 11:55:06 +02:00
Matthias Schiffer 20eb857c1b gluon-core: convert generated upgrade scripts to Lua 2014-05-14 11:06:07 +02:00
Matthias Schiffer 3c5c7d4fdf gluon-core: add site_config loader script 2014-05-14 08:00:54 +02:00
Matthias Schiffer af14dc0c8c Add gluon-config package containing the site config 2014-05-13 20:09:28 +02:00
Matthias Schiffer 817c9b2514 Fix gluon-legacy depends 2014-05-11 10:03:25 +02:00
NeoRaider 2ced9d31f7 Merge pull request #23 from sargon/autoupdate-enforce
gluon-autoupdater: Always allow forced autoupdate.
2014-04-01 19:32:40 +02:00
Daniel Ehlers 70cadea46d gluon-autoupdater: Always allow forced autoupdate.
On nodes with autoupdate disabled the cmdline parameter '-f' has no
effect. But using the autoupdater for manual updates is quite handy.
2014-03-19 21:02:21 +01:00
Jan-Philipp Litza 42afe55bdd gluon-autoupdater: update manifest.sample 2014-03-19 18:14:48 +01:00
Matthias Schiffer c7911677c3 gluon-node-info: add script to fix owner section after a run of a broken config mode 2014-03-17 14:53:29 +01:00
Matthias Schiffer c0c45772fa gluon-config-mode: fix unsetting of the contact info 2014-03-17 14:41:03 +01:00
Nils Schneider 37ea7567aa gluon-luci-autoupdater: remove branch settings 2014-03-14 16:02:32 +01:00
Matthias Schiffer c0028b85c9 gluon-autoupdater: fix version comparison 2014-03-11 20:32:58 +01:00
Nils Schneider 69f2c40647 Merge pull request #21 from freifunk-gluon/alfred-lua
gluon-alfred: replace announce.sh with lua script
2014-03-03 22:23:10 +01:00
Matthias Schiffer e2c235e1dc gluon-radvd: run on br-client to provide that interface with an address 2014-03-03 20:07:58 +01:00
Nils Schneider f675d63587 gluon-node-info: remove 010-migrate-location 2014-03-02 20:24:27 +01:00
Nils Schneider b9a1de7286 gluon-config-mode: fix coordinates when disabled 2014-03-02 19:28:59 +01:00
Nils Schneider 9aa4a147aa gluon-config-mode: allow contact field to be empty 2014-03-02 19:28:40 +01:00
Nils Schneider bf50c54fc8 gluon-config-mode: show coordinates only when enabled 2014-03-02 18:59:20 +01:00
Nils Schneider 3ff5c44b06 gluon-config-mode: add contact field
Closes #20
2014-03-02 18:39:56 +01:00
Nils Schneider ff45d44988 gluon-config-mode: replace foreach with get_first 2014-03-02 18:14:36 +01:00
Matthias Schiffer d1376e1030 gluon-config-mode: add sysconfig option for config interface(s), default to WAN on nanostation-m 2014-03-02 17:56:50 +01:00
Matthias Schiffer 0c3beb1be8 gluon-core: add sysconfig_isset function 2014-03-02 17:36:12 +01:00
Matthias Schiffer 8a2f9e5af7 gluon-core: switch LAN and WAN on nanostation-m 2014-03-02 17:36:12 +01:00
Nils Schneider 06076b2b4f gluon-config-mode: avoid string.format("%f", ...
An undocumented feature of uci:get_first() is to cast the returned value
to the same type as the default argument. Thus, supplying a default
value ot type number makes string.format superfluous.
2014-03-02 14:05:14 +01:00
Nils Schneider 9971ac6f30 gluon-alfred: replace announce.sh with lua script
This replaces announce.sh with a lua script of (hopefully) equal
functionality. Using lua generating JSON is much faster than jshn and
allows for greater flexibility.
2014-03-01 23:47:03 +01:00
Matthias Schiffer 3811912a45 We DON'T want the gluon version file to collide with the package version stamp dir 2014-02-26 10:21:14 +01:00
Matthias Schiffer 8277bbd8de gluon-alfred: add version string to software.firmware.base field 2014-02-25 11:38:06 +01:00
Matthias Schiffer c857ab90f7 gluon-core: add version file 2014-02-25 11:30:07 +01:00
Matthias Schiffer 6354f22212 Rename gluon-location to gluon-node-info, add owner section 2014-02-24 05:12:01 +01:00
Matthias Schiffer d313fe72a5 gluon-legacy: gluon-mesh-batman-adv: ensure a default route is accepted on the client interface 2014-02-24 03:02:04 +01:00
Matthias Schiffer 1b9b777eb7 gluon-core: use awk instead of grep+cut 2014-02-23 20:23:47 +01:00
Matthias Schiffer 13f99f1d8c gluon-core: remove support for incremental upgrade scripts
As we don't have any older gluon versions so far, and hope to be able to do all
upgrades with invariant scripts, remove the code for now.

If we ever see the need to add such upgrade scripts, we can just re-add this.
2014-02-23 20:20:16 +01:00
Matthias Schiffer 2a0ed2da48 gluon-legacy: remove_bat0 doesn't make sense for the wan interface 2014-02-23 20:06:21 +01:00
Matthias Schiffer 171ee62c43 gluon-legacy: gluon-mesh-batman-adv: always set proto to dhcpv6 2014-02-23 18:57:17 +01:00
Matthias Schiffer 69187ec3c2 gluon-legacy: gluon-mesh-vpn-fastd: correctly set enabled state 2014-02-23 17:35:56 +01:00
Matthias Schiffer 5315f2126a gluon-core: don't call legacy scripts on normal upgrades 2014-02-23 17:29:32 +01:00
Matthias Schiffer 9502f67560 gluon-core: adjust to new escaped array handling for generate expressions 2014-02-23 06:31:23 +01:00
Matthias Schiffer 23aad01cc6 gluon-legacy: whitespace fix 2014-02-23 06:21:05 +01:00
Matthias Schiffer 99c2999331 Add gluon-legacy package with legacy upgrade scripts 2014-02-22 08:27:51 +01:00
Matthias Schiffer 9a07e83d4c Convert more upgrade scripts to the new sysctl helper 2014-02-21 19:58:38 +01:00
Nils Schneider f1408f862d Merge pull request #16 from rubo77/master
gluon-config-mode: Corrected grammar
2014-02-19 15:03:37 +01:00
Nils Schneider d6351eb57f Merge pull request #19 from sargon/master
gluon-core: force kernel panic on out of memory

This also adds /lib/gluon/functions/sysctl.sh for setting sysctl options.
2014-02-19 14:39:51 +01:00
Nils Schneider 08b669f228 gluon-luci-theme: show gluon release 2014-02-19 11:26:22 +01:00
Nils Schneider cf38219718 gluon-luci-admin: expertmode texts translated 2014-02-19 03:24:48 +01:00
Nils Schneider 49a6dc21dd gluon-luci-autoupdater: use expertmode template 2014-02-19 03:16:50 +01:00
Nils Schneider b347dbf692 gluon-luci-admin: replace overview with ssh/pass
Various changes and moving stuff around.
2014-02-19 03:16:50 +01:00
Nils Schneider d822af1518 gluon-luci-admin: remove unused function 2014-02-19 03:16:50 +01:00
Nils Schneider becc9e0751 gluon-luci-admin: system.lua -> upgrade.lua 2014-02-19 03:16:50 +01:00
Nils Schneider ad808db9ea gluon-autoupdater: drop caches before upgrade
This will free about 5 to 12 MB of RAM even on lightly used devices
yielding plenty of RAM for autoupdate to succeed.
2014-02-19 01:18:54 +01:00
Nils Schneider 6189d52fbb gluon-luci-admin: remove backup/restore 2014-02-18 23:13:42 +01:00
Nils Schneider c033fe5ab2 gluon-luci-admin: fix firmware upgrade feature 2014-02-18 22:21:31 +01:00
Nils Schneider 2af3209616 gluon-luci-admin: remove reboot feature
Configmode should be exited by using the wizard instead.
2014-02-18 19:17:47 +01:00
Daniel Ehlers 1386bb41dd gluon-core: force kernel panic on out of memory
In combination with kernel.panic the node will reboot if out of memory.
2014-02-18 00:21:12 +01:00
Matthias Schiffer e872a58e15 gluon-config-mode: don't let UCI_CONFIG_DIR leak to the telnet environment etc. 2014-02-13 19:40:36 +01:00
Matthias Schiffer f9c243b559 gluon-config-mode: simplify dnsmasq command, remove sleep after network setup 2014-02-13 16:27:40 +01:00
Matthias Schiffer a33d64af06 gluon-config-mode: remove bind mounts 2014-02-13 15:55:52 +01:00
Nils Schneider 4589fa6595 gluon-status-page: show model 2014-02-13 12:56:14 +01:00
Daniel Ehlers 2edcec1803 gluon-luci-autoupdater: Fix typo 2014-02-13 00:21:40 +01:00
Matthias Schiffer 0e48961691 gluon-autoupdater: enable by default only if GLUON_BRANCH is set, set default branch accordingly 2014-02-11 17:10:11 +01:00
Nils Schneider cb035e3b7a gluon-luci-core: replacing luci-mod-admin-core
This commit adds gluon-luci-core, a package both gluon-config-mode and
gluon-luci-admin will depend on. gluon-luci-core itself will depends on
gluon-luci-theme, gluon-core and most importantly luci-lib-web. It also
copies a few files from luci-mod-admin-core but leaves out everyting we
do not use.

At a later point I plan to move functionality from luci-lib-web into
this package, too. luci-lib-web contains most parts of luci including
hardcoded templates for CBI, which I intend to replace.
2014-02-09 23:20:38 +01:00
Nils Schneider c96faee40e gluon-luci-admin: remove translation support
We'll have to revisit translations at a later point after configmode and
expertmode have matured. Texts in this package were pretty inconsistent
anyway so there is no point in keeping translations for random text
fragments.
2014-02-09 23:17:50 +01:00
Nils Schneider 6cee578c05 gluon-autoupdater: depend on sha512sum
This makes gluon-autoupdater depend on coreutils-sha512sum when it's not
included in busybox.
2014-02-09 23:16:34 +01:00
ruben 8a45b4edc5 gluon-config-mode: Corrected grammar 2014-02-07 13:11:55 +01:00
Nils Schneider e067480118 gluon-config-mode: fix type (gluon-locaton -> gluon-location) 2014-02-06 20:23:17 +01:00
Matthias Schiffer 560ec71d95 Don't use site config in compile step 2014-02-06 19:57:39 +01:00
Nils Schneider 4ee00587ec gluon-status-page: escape HTML special characters 2014-02-06 15:35:21 +01:00
Matthias Schiffer bf44d5523c gluon-autoupdater: add SHA512 support 2014-02-06 00:17:33 +01:00
Matthias Schiffer 261355e1da gluon-config-mode: don't include sysconfig before the start function is called
Otherwise the enable during image create will throw a few error messages
2014-02-06 00:05:10 +01:00
Nils Schneider 4bdad7c291 statusscript 2014-02-04 13:15:18 +01:00
Nils Schneider 8aafc108a5 gluon-status-page: make index.html redirect to cgi 2014-02-03 23:59:22 +01:00
Matthias Schiffer 4da5b5ce37 gluon-core: ensure the release file is always up-to-date 2014-01-31 15:25:49 +01:00
Nils Schneider 19403474eb gluon-luci-theme: input fields on error readable
Do not use 'red' as text color on input fields with errors as the
backgronud color is already red, rendering the value unreadable.
2014-01-29 23:37:31 +01:00
Matthias Schiffer 15363f249b Merge branch 'config-mode-hostname' of https://github.com/freifunk-gluon/packages 2014-01-29 19:37:16 +01:00
Matthias Schiffer 355afe9da5 Add stub gluon-status-page package 2014-01-29 17:17:49 +01:00
Nils Schneider a0f55b6c3c gluon-config-mode: correct hostname on reboot.html
Display the correct hostname on the final page of configmode.
Previously, this page used to simply call luci.sys.hostname() which
would return the current hostname. However, when the configmode changes
the hostname luci.sys.hostname() will not reflect this. This patch
fetches the hostname directly from the UCI system config.

This adds a variable called 'hostname' which may be used in site.conf at
config_mode.msg_reboot and .msg_pubkey.
2014-01-28 03:16:56 +01:00
Matthias Schiffer dfadf272b4 gluon-mesh-vpn-fastd: always use wan DNS servers to resolve the peers 2014-01-25 03:20:03 +01:00
Matthias Schiffer eaad418d91 Enable DNS servers from mesh, disable on wan 2014-01-25 02:09:35 +01:00
Matthias Schiffer a6b19b5c67 Remove odhcp6c.user hack 2014-01-25 01:54:19 +01:00
Matthias Schiffer 0b17a37918 gluon-mesh-batman-adv: use kmod-batman-adv-legacy package 2014-01-24 05:19:00 +01:00
Matthias Schiffer 4853670a40 Revert "gluon-radvd: run on br-client"
This reverts commit f5c532a3a9.
2014-01-23 18:41:41 +01:00
Matthias Schiffer f85415ebb0 gluon-next-node: don't wait for br-client to get an address 2014-01-23 18:40:59 +01:00
Nils Schneider 2324e68364 gluon-config-mode: new helptexts 2014-01-23 02:24:02 +01:00
Nils Schneider 6463064867 gluon-config-mode: label submit button "Fertig" 2014-01-23 01:34:25 +01:00
Nils Schneider 980ddb39cc gluon-config-mode: use welcome text from site.conf 2014-01-23 01:21:43 +01:00
Nils Schneider 56b1bf77da gluon-config-mode: delay reboot a little
The reboot page should be delayed a little to give the browser time for
fetching assets (like the stylesheet). This adds a two second delay.
Unfortunately, I couldn't think of a sane way to do this within a luci
controller.

This patch forks the process. The parent will continue rendering the
page for the browser while the child will sleep and then reboot the
device. For this to work reliable the child needs to close stdout before
sleeping so the webserver closes the connection to the browser. This,
again, required a hack as lua does not allow closing std filehandles,
when prevented using luci.reboot() which was calling os.execute() and
that function will not work with stdout closed.
2014-01-23 00:04:14 +01:00
Nils Schneider 466defe3f2 gluon-config-mode: fix indentation 2014-01-22 23:18:46 +01:00
Matthias Schiffer a70ab9f3b8 More fixes for strange network interface configurations 2014-01-22 22:04:08 +01:00
Matthias Schiffer f5c532a3a9 gluon-radvd: run on br-client 2014-01-22 21:32:02 +01:00
Nils Schneider b892e1f07e Merge pull request #11 from freifunk-gluon/expertmode
gluon-luci-admin: various changes
2014-01-22 12:03:00 -08:00
Nils Schneider 3fcdce78f3 Merge pull request #10 from freifunk-gluon/luci-theme
add new luci-theme
2014-01-22 12:02:48 -08:00
Matthias Schiffer e6592f835d Properly support devices with only one ethernet interface 2014-01-22 20:44:34 +01:00
Matthias Schiffer b25519bc02 Fix race condition in dnsmasq config dir handling 2014-01-22 19:52:17 +01:00
Matthias Schiffer 8681dde4e2 gluon-config-mode: respect switch configuration 2014-01-22 19:45:07 +01:00
Matthias Schiffer 9d4fb5c6d5 gluon-core: sysconfig: don't print error message for unset config 2014-01-22 19:45:07 +01:00
Nils Schneider 9a7a874810 gluon-luci-admin: reboot.html, remove refresh
Don't refresh the reboot page after rebooting the node. It's not going
back to configmode anyway so it'll never reload without user
intervention.
2014-01-22 17:05:42 +01:00
Nils Schneider 434430bbaf gluon-luci-admin: replace overview text
This completely replaces the text on the overview page. Consider this a
placeholder until someone writes a better suited version :)
2014-01-22 17:05:42 +01:00
Nils Schneider 75b8141fd1 gluon-luci-admin: remove redundant headings 2014-01-22 17:05:42 +01:00
Nils Schneider bc119007e9 gluon-luci-admin: no logout button in configmode
Hide the "logout" button when in configmode.
2014-01-22 17:05:42 +01:00
Nils Schneider c71e3737a6 gluon-luci-admin: fix indentation
Replaces double-spaces with tabs to match surrounding code.
2014-01-22 17:05:42 +01:00
Nils Schneider 37fc87539c gluon-luci-admin: disable when not in configmode
For security reasons we'd like to disable all HTTP config interfaces
when the node is operating normally. This patch disables gluon-luci-admin
when configmode is not enabled.
2014-01-22 17:05:42 +01:00
Nils Schneider d2b45fa35a gluon-config-mode: remove subsection headings
Those headings do not convey much information make the wizard less
compact. The help texts will be rewritten to guide the user instead.
2014-01-22 17:01:27 +01:00
Nils Schneider 9f70cd70ef gluon-config-mode: replace inline style with class
Replace the inline stylesheet for the public key box on the reboot page
with a CSS class so it can be styled using the theme.
2014-01-22 17:00:58 +01:00
Nils Schneider b8abbf4b42 gluon-config-mode,luci-admin: use gluon-luci-theme
This makes gluon-config-mode and gluon-luci-admin depend on
gluon-luci-theme instead of luci-theme-openwrt.
2014-01-22 16:56:54 +01:00
Nils Schneider dab7106cb9 gluon-luci-theme: new theme, still magenta/yellow
This is the initial version of our new configmode theme. It's far from
finished but at least configmode looks good. There are lots of
declarations copied from OpenWRT's default theme so most other luci
modules would be somewhat usable when shown using this theme.
2014-01-22 16:56:32 +01:00
Nils Schneider 54fec96e7b gluon-config-mode: remove 'reset' button
The reset button resets the form. I don't think this is needed in a
wizard that simple and might confuse users so I removed it.
2014-01-21 23:42:03 +01:00
Nils Schneider 3d2511d488 gluon-config-mode: fix wizard
Due to my previous two commits configmode was broken when either meshvpn
or bandwidth limit was disabled. This fixes it but there may be a
cleaner solution provided by luci.
2014-01-21 22:19:25 +01:00
Nils Schneider 52764cc925 gluon-config-mode: bwlimit hidden when not meshvpn
Hide the bandwidth limit checkbox when meshvpn is disabled.
2014-01-21 20:02:17 +01:00
Nils Schneider 9141633bf9 gluon-config-mode: more compact tc form
Hide the downstream/upstream input fields when bandwitdh limiting is
disabled.
2014-01-21 19:50:07 +01:00
Nils Schneider 8c0188a4f6 gluon-autoupdater: Randomize mirror order
This way we have a kind of load balancing among the mirrors.
2014-01-21 13:20:50 +01:00
Daniel Ehlers 5060dd95eb gluon-luci-autoupdater: Catch up mirror support in gluon-autoupdater 2014-01-21 05:46:10 +01:00
Matthias Schiffer b36ecc8aae gluon-mesh-batman-adv: accept input on wan interface 2014-01-21 05:24:01 +01:00
Matthias Schiffer ede74a4aa2 gluon-core: move initial/020-wireless from generate to files 2014-01-21 05:24:01 +01:00
Nils Schneider e91e3f0a21 gluon-autoupdater: add more models to README
This adds a list of known models to the readme.
2014-01-21 04:45:56 +01:00
Matthias Schiffer 1b303e87ad gluon-core: add support for NTP server configuration 2014-01-21 04:22:59 +01:00
Matthias Schiffer bd425e9780 gluon-mesh-batman-adv: add DNS support 2014-01-21 03:59:15 +01:00
Matthias Schiffer f11f3b1a90 gluon-mesh-batman-adv: more initial -> invariant conversions 2014-01-21 03:05:42 +01:00
Matthias Schiffer cf70843ba7 Add support for custom dnsmasq config and odhcp6c handler scripts 2014-01-21 03:01:12 +01:00
Matthias Schiffer 0ea24a57a3 gluon-autoupdater: allow configuring the branch name independently of the UCI config section name 2014-01-21 00:29:55 +01:00
Matthias Schiffer 5706659b75 gluon-autoupdater: adjust example config for mirror support 2014-01-21 00:10:00 +01:00
Daniel Ehlers 036f573ae7 gluon-autoupdater: Enable list of mirrors for manifest and firmware.
Instead of a single url this patch allows to have a list of urls. So in case
of network instability a router can still reach local mesh-cloud server to pull
a update from. In this stage the autoupdater simply tries every mirror until
one passes all tests.
2014-01-20 23:31:15 +01:00
Daniel Ehlers 7f3e2ec201 gluon-autoupdater: Less global variables.
This also removes the need for the cleanup function. Instead the cleanup
code is moved in place.
2014-01-20 23:31:15 +01:00
Daniel Ehlers 39052fd0b7 gluon-autoupdater: Refactor code.
Move building blocks of the update into seperate functions.
2014-01-20 13:26:58 +01:00
Matthias Schiffer 4ddbf32f5b gluon-core: use gluon release in package version string 2014-01-20 05:07:55 +01:00
Matthias Schiffer d48ce43322 gluon-core: use GLUON_RELEASE from environment 2014-01-20 02:35:21 +01:00
Matthias Schiffer 56fc4fe7d0 Merge gluon-release into gluon-core 2014-01-20 01:59:10 +01:00
Matthias Schiffer 31d52aa98f gluon-simple-tc: add missing defaults on every upgrade 2014-01-20 00:06:55 +01:00
Matthias Schiffer 1980d7624b gluon-mesh-batman-adv: move wifi config to invariant 2014-01-20 00:06:55 +01:00
Matthias Schiffer 7f61b00db0 gluon-location: move information to /etc/config/gluon-location 2014-01-20 00:06:55 +01:00
Matthias Schiffer ac48e63c4a gluon-autoupdater: no need to provide a default config just to delete it in the initial script 2014-01-20 00:06:55 +01:00
Nils Schneider 6d0234a813 gluon-autoupdater: typo corrected 2014-01-19 23:19:55 +01:00
Nils Schneider 858f9d7c9a Merge pull request #7 from FreifunkBremen/master
gluon-autoupdater: get random number from /dev/urandom
2014-01-19 13:40:13 -08:00
Jan-Philipp Litza 5cad7dba41 gluon-autoupdater: get random number from urandom
The approach with awk's rand() wasn't really random between across
devices: When srand() was called without arguments, time() was used as
seed, which of course is the same on all devices when the script is
called via cron at HH:00:00.

This patch instead uses /dev/urandom as source of random (we don't need
cryptographically strong random numbers, so urandom is just fine) but
still uses awk for the comparison as busybox's ash cannot deal with
floats in $(())
2014-01-19 22:36:49 +01:00
Matthias Schiffer e85aeabbb6 gluon-alfred: add chosen gateway and load average 2014-01-19 21:44:26 +01:00
Matthias Schiffer f54ffafb1b gluon-alfred: run every minute
The run frequency and exact time affect the alfred announce interval, so we can
just run it every minute to supply alfred with the most up-to-date data.
2014-01-18 21:56:05 +01:00
Matthias Schiffer 47866fc6eb gluon-mesh-batman-adv: set gateway mode to client 2014-01-18 19:44:02 +01:00
Jan-Philipp Litza 1a00f672fe autoupdater: Use awk instead of grep+head+tail to split manifest 2014-01-17 16:09:34 +01:00
Matthias Schiffer 249ce3982f gluon-mesh-batman-adv: set bat0 MAC address to primary address 2014-01-16 23:57:42 +01:00
Jan-Philipp Litza 7197eb09dc alfred: add more traffic statistics
+ mgmt and forward counters
+ packet in addition to byte counters for everything
2014-01-16 23:47:41 +01:00
Jan-Philipp Litza 7cca730ce4 alfred: Add --no-sleep option to send immediately 2014-01-16 23:46:54 +01:00
Jan-Philipp Litza 238994e1e2 alfred: clean up delay code 2014-01-16 22:42:02 +01:00
Jan-Philipp Litza 8217d666ee alfred: add random node-specific delay before sending 2014-01-16 22:36:09 +01:00
Jan-Philipp Litza 7538125a82 alfred: make traffic counters absolute
After a lenghty discussion, we settled on absolute vs. relative values.
Main reasons:

* stateless implementation on node possible
* convertable to relative values by differentiaion on receiver
* missed transmissions only decrease granularity, whereas relative
  values would introduce wrong numbers on integration if values are
  missed
2014-01-16 22:34:57 +01:00
Jan-Philipp Litza 10f419deef alfred: add statistics (uptime+traffic) 2014-01-16 16:50:25 +01:00
Matthias Schiffer bd69f55a81 gluon-mesh-vpn-fastd: enable secure handshakes 2014-01-14 19:37:15 +01:00
Matthias Schiffer 86b72c2042 gluon-radvd: don't run as root 2014-01-14 19:34:07 +01:00
Matthias Schiffer 9675535afb gluon-mesh-vpn-fastd: don't run as root 2014-01-14 18:46:17 +01:00
Matthias Schiffer cfa49b30c0 gluon-core: add function to add users 2014-01-14 18:19:51 +01:00
Matthias Schiffer f7cb80e7f8 Add firewall rules
gluon-mesh-batman-adv should not be used without firewall to prevent forwarding
of packets from the mesh to the wan interface.

For some reason, the firewall package won't work at all without
kmod-ipt-nathelper.
2014-01-14 01:50:59 +01:00
Matthias Schiffer 7c56102c4d gluon-config-mode: use different document root 2014-01-13 20:17:29 +01:00
Matthias Schiffer ebf4a7e8a2 Remove initscript enable/disable hacks
Better configure these properly.
2014-01-13 18:29:00 +01:00
Matthias Schiffer 138bba1222 gluon-mesh-batman-adv: disable client interface in dnsmasq 2014-01-13 18:02:45 +01:00
Jan-Philipp Litza e38a0c9f11 alfred: name -> hostname 2014-01-13 17:11:41 +01:00
Jan-Philipp Litza f756a71de9 alfred: improved readability 2014-01-13 17:09:15 +01:00
Jan-Philipp Litza 0cfb32ce95 alfred: split up firmware info, include fastd version+status 2014-01-13 17:06:47 +01:00
Jan-Philipp Litza 9648152ef9 alfred: added more information to send, reformatted location
location is object with latitude and longitude
added:
* firmware
* autoupdater status
* hardware model
* primary mac address
* mesh IPv6 addresses
2014-01-13 16:10:03 +01:00
Nils Schneider 137a311e1e gluon-autoupdater: strip trailing - from model 2014-01-13 12:45:55 +01:00
Matthias Schiffer f3fec005e9 gluon-mesh-vpn-fastd: enable no_rebroadcast on the VPN interface 2014-01-13 01:03:08 +01:00
Matthias Schiffer 40ea8d9880 Clean up gluon-alfred
* Merge gluon-alfred-ffmap into gluon-alfred
* Use gluon-crond instead of alfred's "facter" mechanism based on the broken busybox crond
2014-01-12 22:37:28 +01:00
Jan-Philipp Litza b9ac954915 added gluon-alfred and gluon-alfred-ffmap 2014-01-12 22:06:50 +01:00
Matthias Schiffer 2f9b06e825 gluon-autoupdater: use the new get_model function 2014-01-12 21:40:19 +01:00
Matthias Schiffer 37c0716b9b gluon-core: add sh file to get model name etc. 2014-01-12 21:33:44 +01:00
Nils Schneider 877e1acd83 gluon-autoupdater: improve manifest.sample
Makes manifest.sample use the model instead of the board name as that is
what the script actually expects. Also, a sample signature is added.
2014-01-12 21:18:27 +01:00
Nils Schneider d101e2d6af gluon-autoupdater: remove dead code
Recently the autoupdater contained a case statement to distinguish
between TP-Link WDR3600 and TP-Link WDR4300. This was left over from
previous development versions of autoupdater that relied on the board
name instead of the model. It is thus no longer needed and be removed
safely.
2014-01-12 21:18:27 +01:00
Matthias Schiffer 10d163697b gluon-config-mode: don't depend on haveged
Now that haveged starts before the config mode, there is no need to explicity
depend on it; instead it is just used when specified in the site configuration.
2014-01-12 00:50:43 +01:00
Matthias Schiffer 35494393a8 gluon-core: fixup WAN interface MAC address setting 2014-01-11 21:31:28 +01:00
Matthias Schiffer ec862435d7 gluon-core: remove left over 'EOF' from config script 2014-01-11 20:34:58 +01:00
Matthias Schiffer 54d3ce94d3 gluon-ebtables-filter-multicast: correct interface name 2014-01-11 19:27:06 +01:00
Matthias Schiffer 5edc68e7c7 Don't accept router advertisements by default 2014-01-11 17:43:35 +01:00
Matthias Schiffer 616fef804d Add gluon-radvd package 2014-01-11 16:05:17 +01:00
Matthias Schiffer 1318cf0600 next-node: rename config sections 2014-01-11 14:23:27 +01:00
Matthias Schiffer fcc9b2dbd4 next-node: remove unused include 2014-01-11 14:11:42 +01:00
Matthias Schiffer b939096129 Disable IPv6 forwarding on br-client
Disabling forwarding prevents the node from reacting to the Subnet-Router
anycast address.
2014-01-11 14:01:23 +01:00
Matthias Schiffer 4efe5575fe Reimplement next-node configuration based on the new netifd version 2014-01-10 22:34:26 +01:00
Matthias Schiffer 4d8d989980 Add ebtables filters from the legacy firmware 2014-01-10 21:49:18 +01:00
Matthias Schiffer bb3fd05d1a Allow telnet login in config mode again 2014-01-09 10:06:36 +01:00
Matthias Schiffer 38623c2a4e Add gluon-lock-password package and make config mode depend on it 2014-01-09 09:58:59 +01:00
Matthias Schiffer aebe590081 Make package version depend on the site config version where necessary 2014-01-04 09:19:13 +01:00
Nils Schneider f34c54d84c gluon-luci-autoupdater: simple luci module for autoupdater 2013-11-28 21:49:34 +01:00
Nils Schneider f4aa08790c configmode -> gluon-config-mode 2013-11-28 20:00:37 +01:00
Nils Schneider 7f5f469de7 ssh keys 2013-11-28 20:00:37 +01:00
Nils Schneider 7d502cfa86 basic admin mode 2013-11-28 20:00:37 +01:00
Nils Schneider bc648d18e3 gluon-config-mode: show hostname on reboot page. fixes #8 2013-11-28 19:16:39 +01:00
Nils Schneider 9e05fb9bc2 autoupdater: fix initial upgrade script 2013-11-11 11:45:12 +01:00
Matthias Schiffer 7120eac372 gluon-core: clean up upgrade main script 2013-10-09 21:56:32 +02:00
Nils Schneider 71cf60acaa gluon-config-mode: texts from mkm 2013-10-09 21:13:48 +02:00
Matthias Schiffer 06318d5b66 gluon-simple-tc: add newline to end of example config 2013-10-09 20:35:55 +02:00
Nils Schneider 79e2b81232 gluon-simple-tc: initial.pl: sort keys before creating config 2013-10-04 10:47:31 +02:00
Nils Schneider fd3e4e7b70 gluon-config-mode: simple-tc ifname must be mesh-vpn, not mesh_vpn 2013-10-03 23:26:00 +02:00
Nils Schneider f518853ab4 gluon-config-mode: site.conf: configmode -> config_mode 2013-10-03 23:04:41 +02:00
Nils Schneider 5a0adcbae0 gluon-config-mode: add simple-tc settings for mesh_vpn 2013-10-03 23:00:47 +02:00
Nils Schneider 6c3d8621ff gluon-config-mode: forgot to rename uci config in button script 2013-10-03 22:48:54 +02:00
Nils Schneider f727a3c119 gluon-config-mode: forgot to rename uci config in button script 2013-10-03 22:12:47 +02:00
Nils Schneider 4076b7f1f0 gluon-simple-tc: create initial config from site.conf 2013-10-03 21:10:42 +02:00
Matthias Schiffer abd15d8671 gluon-mesh-batman-adv: clean up config script 2013-10-03 19:02:06 +02:00
Matthias Schiffer 171fafc2ff gluon-core: clean up uci config 2013-10-03 18:54:59 +02:00
Matthias Schiffer f0e56caa3c gluon-mesh-vpn-fastd: clean up configuration script 2013-10-03 18:41:45 +02:00
Matthias Schiffer a4e82e2928 Move some more configuration into the corrent packages, correctly configure multiple radios 2013-10-03 18:04:03 +02:00
Matthias Schiffer 7509a17ff4 Add gluon-simple-tc package 2013-10-03 13:59:45 +02:00
Nils Schneider de628af505 gluon-config-mode: fix upgrade script /lib/gluon/ugprade/config-mode/ 2013-10-03 13:10:18 +02:00
Nils Schneider 9d41be9ddd gluon-config-mode: rename config-mode to gluon-config-mode 2013-10-02 22:56:51 +02:00
Matthias Schiffer 38e09f3eae gluon-mesh-vpn-fastd: always enable fastd 2013-10-02 20:33:32 +02:00
Matthias Schiffer 2619925777 gluon-cron: always enable cron when it is installed 2013-10-02 20:33:32 +02:00
Matthias Schiffer 2299aab613 gluon-ebtables: always enable ebtables when they are installed 2013-10-02 20:33:32 +02:00
Nils Schneider 4fbdc927c4 gluon-config-mode: rename configmode to config-mode (except in lua variables where it is still called configmode) 2013-10-02 15:24:14 +02:00
Nils Schneider f509a995ed gluon-location is a dependency of config-mode, not autoupdater 2013-10-02 15:00:07 +02:00
Nils Schneider c3364f829c gluon-config-mode: various fixes (default values, autoupdater changes) 2013-10-02 14:46:39 +02:00
Nils Schneider b6c71dfa88 gluon-location: store lat/lon in system config 2013-10-02 14:18:42 +02:00
Nils Schneider 11331eda9b Revert "gluon-mesh-vpn-fastd: set mesh_vpn.enabled flag"
This reverts commit baf6d14160.
2013-10-02 14:02:24 +02:00
Nils Schneider edcc573976 gluon-autoupdater: new branch specification
It is now possible to specific multiple branches like this:

config branch stable
  option url ...
  list pubkey ...
  ...

config branch testing
  ...

and select one in autoupdater.settings:

config autoupdater settings
  option branch "stable"
2013-10-02 13:33:47 +02:00
Nils Schneider baf6d14160 gluon-mesh-vpn-fastd: set mesh_vpn.enabled flag 2013-10-02 13:19:39 +02:00
Nils Schneider 5e4f29304b gluon-autoupdater: rename script to autoupdater (was autoupdate) 2013-10-02 13:18:48 +02:00
Matthias Schiffer 4fdf2844a2 gluon-mesh-batman-adv: configure batman-adv 2013-10-01 21:38:21 +02:00
Matthias Schiffer a83b7cd5a3 gluon-core: upgrade: fix directory movement 2013-10-01 21:38:21 +02:00
Matthias Schiffer 31012af18f gluon-core: ensure version stamp dir existence 2013-10-01 21:38:21 +02:00
Matthias Schiffer ea0064c927 gluon-core: fix typo 2013-10-01 21:38:21 +02:00
Matthias Schiffer 4ecf602650 gluon-core: make 001-sysconfig executable 2013-10-01 21:38:21 +02:00
Matthias Schiffer 5e5bf2cf89 gluon-core: always handle core scripts first 2013-10-01 21:38:21 +02:00
Matthias Schiffer 2602962dfe Remove batman-adv specific parts of gluon-core 2013-10-01 21:38:21 +02:00
Nils Schneider ace75d4528 gluon-autoupdater: read config from site.conf 2013-09-30 23:31:35 +02:00
Matthias Schiffer 3b205b8413 gluon-next-node: fix ebtables interface name 2013-09-30 21:39:11 +02:00
Matthias Schiffer 483d7fb66c gluon-mesh-vpn-fastd: generate fastd config from site configuration 2013-09-30 21:29:52 +02:00
Matthias Schiffer 65769f8250 Use odhcp6c for interface configuration 2013-09-30 18:47:46 +02:00
Matthias Schiffer 3cad3e10ee gluon-core: remove deprecated accept_ra settings 2013-09-30 18:47:46 +02:00
Matthias Schiffer f0774c96f0 gluon-next-node: set accept_ra to 0 2013-09-30 18:47:46 +02:00
Nils Schneider 04c4f7bef1 gluon-config-mode: do not depend on luci-mod-failsafe (gluon-luci-admin will provide it's functionality) 2013-09-30 18:39:26 +02:00
Matthias Schiffer fc435e7788 gluon-next-node: add ebtables to filter IP packets with the next-node address 2013-09-30 17:38:04 +02:00
Nils Schneider f25b5157e9 gluon-autoupdater: read version from /lib/gluon/release 2013-09-30 17:12:57 +02:00
Nils Schneider 567e88eb1c gluon-release: creates /lib/gluon/release 2013-09-30 17:12:47 +02:00
Matthias Schiffer c57f81b7c4 gluon-ebtables: add missing mod-ipt-core dependency 2013-09-30 16:25:42 +02:00
Nils Schneider d4b4a46b7b configmode: move upgrade script from 0.4 to invariant 2013-09-30 16:24:37 +02:00
Nils Schneider 60583ec379 configmode: show current bandwidth limit in wizard 2013-09-30 15:14:01 +02:00
Nils Schneider a00c47daec configmode: migrate uci config of pre 0.4 firmwares 2013-09-30 14:50:29 +02:00