Re: [OpenWrt-Devel] looking for a tl-wdr4900 tester
* John Crispin blo...@openwrt.org [13.02.2015 20:03]: i have not even pushed my patches yet. i can send you an image to test if you want sorry, i see - i simply changed the kernel-version without seeing, that the 3.18 patches are not in yet for this platform i'am ready for testing and have a bisected device with serial console here... bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] procd / crash of PID 1
* John Crispin blo...@openwrt.org [24.02.2015 21:50]: today i started to sysupgrade a r44751 router and the log (in another terminal) showed this: Wed Mar 18 22:46:05 2015 daemon.notice netifd: Network device 'wlan0' link is down Wed Mar 18 22:46:05 2015 daemon.notice netifd: Interface 'wlanadhocRADIO1' has link connectivity loss Wed Mar 18 22:46:06 2015 daemon.notice netifd: Interface 'wlanadhocRADIO1' is now down Wed Mar 18 22:46:06 2015 daemon.notice netifd: Interface 'wlanadhocRADIO1' is disabled Wed Mar 18 22:46:06 2015 daemon.err procd: Rebooting as procd has crashed Wed Mar 18 22:46:06 2015 daemon.info procd: reboot Wed Mar 18 22:46:06 2015 daemon.notice netifd: Interface 'wlanRADIO1' is now down Wed Mar 18 22:46:06 2015 daemon.notice netifd: Interface 'wlanRADIO1' is disabled Wed Mar 18 22:46:06 2015 daemon.notice netifd: Interface 'wlanRADIO1' has link connectivity loss Wed Mar 18 22:46:08 2015 kern.notice kernel: [42464.06] Removing MTD device #3 (rootfs_data) with use count 1 Wed Mar 18 22:46:08 2015 kern.err kernel: [42464.08] m25p80 spi0.0: error -143 reading 5 Wed Mar 18 22:46:08 2015 kern.err kernel: [42464.08] error -143 reading SR Wed Mar 18 22:46:08 2015 kern.err kernel: [42464.09] blk_update_request: I/O error, dev mtdblock2, sector 5936 Write failed: Broken pipe after that, the 'TP-LINK TL-WR1043ND' rebootet and the log was full of: [ 623.11] jffs2: iget() failed for ino #131 [ 632.96] jffs2: warning: (361) jffs2_get_inode_nodes: Eep. No valid nodes for ino #131. [ 632.97] jffs2: warning: (361) jffs2_do_read_inode_internal: no data nodes found for ino #131 and some files (e.g. netifd) could'nt be loaded anymore, so the only possible solution to bootup somehow was failsafe, but 'firstboot' hangs forever. should a do more tests before reflashing via serial console? bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Ubiquiti AirOS7 is based on openwrt r40432
* Nemesis neme...@ninux.org [12.03.2015 14:08]: Anybody else has studied this code and found out anything interesting? 8-))) see, they use an acient php from: http://museum.php.net/php2/ bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Multiple OpenWrt devices collectively managed?
* Janne Cederberg janne.cederb...@gmail.com [24.03.2015 12:56]: Oh, sorry Bastian I forgot to comment on your suggestion earlier! Question: how does that constant restarting affect network QoS/throughput? the 'wifi up' command is only issued when a) the last client leaves. each 60secs there is a check with for DEV in $WIFIDEVS; do iw dev $DEV station dump | grep -c ^'Station' $counter done so we know when there is a change from X to '0' clients - 'wifi up' see: https://github.com/bittorf/kalua/blob/master/openwrt-addons/etc/kalua/watch#L1818 b) around every 60-90 minutes when there is no client. this triggers also a new acs_survey/channel-section. because this is only done without clients, there is no change in network QoS/throughput? bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Multiple OpenWrt devices collectively managed?
* David Lang da...@lang.hm [24.03.2015 12:56]: If a client tries to connect right after it has gone idle, they will just end up connecting to a more remote AP (assuming there is one in range) you are right, because everything is polluted with access-points, there is always another one in range... bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Is PPPoE broken in Barrier Breaker?
* valent.turko...@gmail.com valent.turko...@gmail.com [25.03.2015 09:25]: people who have success with PPPoE on OpenWrt? yes, we have several active routers with recent openwrt running PPPoE in Germany and Vietnam. bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] uci -P no longer working correctly
* Yousong Zhou yszhou4t...@gmail.com [31.03.2015 19:20]: I just sent a patch for this with you in the cc list. Could you give it a try and tell if it can work for you? this does not fix the issue for me, just tried r45160 - see also: https://dev.openwrt.org/ticket/19361 bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] uci -P no longer working correctly
* Yousong Zhou yszhou4t...@gmail.com [31.03.2015 19:20]: I just sent a patch for this with you in the cc list. Could you give it a try and tell if it can work for you? please ignore my last mail - uci was not recompiled - will check again. bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] uci -P no longer working correctly
* Yousong Zhou yszhou4t...@gmail.com [31.03.2015 19:20]: I just sent a patch for this with you in the cc list. Could you give it a try and tell if it can work for you? fixed for me too - thank you! - bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Rebuilding for specific hardware, example ar71xx/image for TP-Link TL-WR841ND
* Jean-Michel Pouré - GOOZE jmpo...@gooze.eu [23.03.2015 13:30]: Obviously, I need a default .config file before using buildroot. Where is it stored and published? just type 'make defconfig'. this is maybe not the config you have found somewhere, but it works and you can tweak it individually via 'make menuconfig'. what we do here, is e.g.: echo .config 'CONFIG_TARGET_ar71xx_generic_TLWR1043=y' echo .config 'some more symbols...' make defconfig make (this build a custom-image for TP-LINK TL-WR1043ND) bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Rebuilding for specific hardware, example ar71xx/image for TP-Link TL-WR841ND
* Jean-Michel Pouré - GOOZE jmpo...@gooze.eu [23.03.2015 11:28]: Will it select automatically this .config file: target/linux/ar71xx/config-3.18 yes. the number is taken from 'include/kernel-version.mk' bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Rebuilding for specific hardware, example ar71xx/image for TP-Link TL-WR841ND
* Arjen de Korte arjen+open...@de-korte.org [23.03.2015 16:06]: So I need to activate compilation with: echo .config 'CONFIG_PACKAGE_luci=y' No, you have to run 'make menuconfig' and select the luci package in there. In many cases, other packages are needed when you select a package. This is exactly what menuconfig automates (so making changes by hand in the generated .config file is usually a bad idea, just like the top lines of this file will tell you). but it is possible and valid to do: echo .config 'CONFIG_PACKAGE_luci=y' make defconfig # (this solves the dependencies) make bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] procd / crash of PID 1
our PID 1 sometimes crashs: if this happens the last lines in log show this: Tue Feb 24 11:40:04 2015 user.emerg syslog: Rebooting as procd has crashed Tue Feb 24 11:40:04 2015 user.emerg syslog: reboot in our firmware we evaluate the file /sys/kernel/debug/crashlog after each reboot. if procd crashes, this file keeps empty - which looks like a power-cycle - very bad. what can be a good solution for this? (ofcourse fixing the crash itself is the best 8-) here we introduced a crashreboot for manually invoking a reboot with a reason code, so we know why a router rebooted. it is just a special string in the crashdump when doing echo 'c' /proc/sysrq-trigger i think thats too special for the PID1 case, but maybe somebody has an idea, how to write something into /sys/kernel/debug/crashlog when procd enforces a reboot. bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Multiple OpenWrt devices collectively managed?
* David Lang da...@lang.hm [23.03.2015 20:19]: question is around having something to automatically assign channels amoung the different APs to minimize interference between the APs and between the APs and other things in the area. we just use hostapd athXk acs-survey/channel=auto...why dont you? bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Multiple OpenWrt devices collectively managed?
* Janne Cederberg janne.cederb...@gmail.com [23.03.2015 22:13]: So there's the auto mode in OpenWrt but that only considers the state of the wifi spectrum at the ifup of the wifi adapter, correct? So if things drastically change later, the AP would stay on the same channel and not switch. what we do in our custom solution: restart the wifi after the last station has left. that triggers often and reshuffles the channels... bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] busybox: replace hotfix with upstream commit de5edadee2dca2896492f97ab3a56e389305e74d
with this patch the hotfix from r45471 is replaced. compile and runtested with ar71xx / r45568 the file 'shell/ash_test/ash-heredoc/heredoc1.right' is not included, because it does not apply on our busybox. when upgrading to next busybox-release, this patch can be dropped. Signed-off-by: Bastian Bittorf bitt...@bluebottle.com --- ...-a-regression-in-handling-local-variables.patch | 75 --- .../290-ash-fix-handling-of-duplicate-local.patch | 204 2 files changed, 204 insertions(+), 75 deletions(-) delete mode 100644 package/utils/busybox/patches/290-ash-fix-a-regression-in-handling-local-variables.patch create mode 100644 package/utils/busybox/patches/290-ash-fix-handling-of-duplicate-local.patch diff --git a/package/utils/busybox/patches/290-ash-fix-a-regression-in-handling-local-variables.patch b/package/utils/busybox/patches/290-ash-fix-a-regression-in-handling-local-variables.patch deleted file mode 100644 index 0ac1925..000 --- a/package/utils/busybox/patches/290-ash-fix-a-regression-in-handling-local-variables.patch +++ /dev/null @@ -1,75 +0,0 @@ -From: Felix Fietkau n...@openwrt.org -Date: Fri, 17 Apr 2015 01:54:51 +0200 -Subject: [PATCH] ash: fix a regression in handling local variables - -commit 109ee5d33694a03cda3424b4846584250832ba8e -ash: make locak VAR unset VAR (bash does that) - -This commit introduced a regression where calling local on an already -local variable unsets it. This does not match bash behavior. - -Update test case to check for this behavior - -Signed-off-by: Felix Fietkau n...@openwrt.org - a/shell/ash.c -+++ b/shell/ash.c -@@ -8961,6 +8961,21 @@ parse_command_args(char **argv, const ch - } - #endif - -+static bool -+findlocal(struct var *vp) -+{ -+ struct localvar *lvp = localvars; -+ -+ while (lvp) { -+ if (lvp-vp == vp) -+ return true; -+ -+ lvp = lvp-next; -+ } -+ -+ return false; -+} -+ - /* - * Make a variable a local variable. When a variable is made local, it's - * value and flags are saved in a localvar structure. The saved values -@@ -9000,7 +9015,7 @@ mklocal(char *name) - vp-flags |= VSTRFIXED|VTEXTFIXED; - if (eq) - setvareq(name, 0); -- else -+ else if (!findlocal(vp)) - /* local VAR unsets VAR: */ - setvar(name, NULL, 0); - } a/shell/ash_test/ash-misc/local1.right -+++ b/shell/ash_test/ash-misc/local1.right -@@ -1,4 +1,5 @@ - A1:'A' - A2:'' --A3:'' --A4:'A' -+A3:'B' -+A4:'' -+A5:'A' a/shell/ash_test/ash-misc/local1.tests -+++ b/shell/ash_test/ash-misc/local1.tests -@@ -3,9 +3,12 @@ f() { - local a - # the above line unsets $a - echo A2:'$a' -- unset a -+ a=B -+ local a - echo A3:'$a' -+ unset a -+ echo A4:'$a' - } - echo A1:'$a' - f --echo A4:'$a' -+echo A5:'$a' diff --git a/package/utils/busybox/patches/290-ash-fix-handling-of-duplicate-local.patch b/package/utils/busybox/patches/290-ash-fix-handling-of-duplicate-local.patch new file mode 100644 index 000..71c2162 --- /dev/null +++ b/package/utils/busybox/patches/290-ash-fix-handling-of-duplicate-local.patch @@ -0,0 +1,204 @@ +From 0a0acb55db8d7c4dec445573f1b0528d126b9e1f Mon Sep 17 00:00:00 2001 +From: Denys Vlasenko vda.li...@googlemail.com +Date: Sat, 18 Apr 2015 19:36:38 +0200 +Subject: [PATCH] ash: fix handling of duplicate local + +Signed-off-by: Denys Vlasenko vda.li...@googlemail.com +--- + shell/ash.c | 51 +-- + shell/ash_test/ash-vars/var3.right| 5 +++ + shell/ash_test/ash-vars/var3.tests| 1 + + 4 files changed, 42 insertions(+), 17 deletions(-) + create mode 100644 shell/ash_test/ash-vars/var3.right + create mode 100755 shell/ash_test/ash-vars/var3.tests + +diff --git a/shell/ash.c b/shell/ash.c +index b568013..697a64f 100644 +--- a/shell/ash.c b/shell/ash.c +@@ -2030,7 +2030,7 @@ varcmp(const char *p, const char *q) + int c, d; + + while ((c = *p) == (d = *q)) { +- if (!c || c == '=') ++ if (c == '\0' || c == '=') + goto out; + p++; + q++; +@@ -2247,7 +2247,7 @@ setvar(const char *name, const char *val, int flags) + } + + static void FAST_FUNC +-setvar2(const char *name, const char *val) ++setvar0(const char *name, const char *val) + { + setvar(name, val, 0); + } +@@ -2310,7 +2310,7 @@ unsetvar(const char *s) + free(vp); + INT_ON; + } else { +- setvar2(s, 0); ++ setvar0(s, NULL); + vp-flags = ~VEXPORT; + } + ok: +@@ -5505,7 +5505,7 @@ ash_arith(const char *s) + arith_t result; + + math_state.lookupvar
Re: [OpenWrt-Devel] Thoughts on shellcheck?
* Eric Schultz eschu...@prplfoundation.org [03.05.2015 20:28]: Hey, I wanted to let folks know about this open source tool for finding errors in shell scripts that I stumbled on: https://github.com/koalaman/shellcheck. Not sure on how applicable it will be to the complex features that OpenWrt uses but if it worked well, maybe it could be added and used for verifying new shell script modifications. We did some experiments with that and came to the conclusion, that it does not make sense. it's more an approach for beginners the get good hints... a better way for checking shellscripts it to write tests. bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] wrong configured spam-filter for openwrt-dev
while sending a mail to openwrt-dev, i got this answer, which doesnt make any sense, because the list only accepts registered users anyway: openwrt-devel@lists.openwrt.org: host mail.openwrt.org[78.24.191.176] said: 554 5.7.1 Service unavailable; Client host [176.9.57.138] blocked using bl.spamcop.net; Blocked - see http://www.spamcop.net/bl.shtml?176.9.57.138 (in reply to RCPT TO command) so: first check, if the user is 'registered', if not ask do spamchecking. who feels responsible for that? bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] uhttpd / startup-error without a message
today I was searching for a non-running uhttpd and recognized, that there are no error messages anymore if something goes wrong. in 62ff68fb / r38023 # procd: convert various packages to procd style init.d scripts # Signed-off-by: John Crispin blo...@openwrt.org the debug-output was commented out. was this intended? (see line 135 in package/network/services/uhttpd/files/uhttpd.init) bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] uhttpd / startup-error without a message
* Jo-Philipp Wich j...@openwrt.org [11.05.2015 10:29]: this is already fixed in trunk. The uhttpd stderr is relayed to syslog there. thank you - i see: this is not very intuitive. can this be send to console when user is interactive? (like: loggger -s message) bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] uhttpd / startup-error without a message / procd interactive logging
* Jo-Philipp Wich j...@openwrt.org [11.05.2015 11:47]: this is not very intuitive. can this be send to console when user is interactive? (like: loggger -s message) Not easily as it is procd logging the services stderr. One can implement a test or debug start action though which would calculate the commandline and start the daemon in foreground without actually registering it with procd. it think thats too special - there should be a generic way to get direct feedback on the commandline when something fails without doing magic. what if we e.g. 'export INTERACTIVE=1' via /etc/profile so procd / a called script is aware of this? bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] uhttpd / startup-error without a message / procd interactive logging
* Jo-Philipp Wich j...@openwrt.org [11.05.2015 12:34]: it think thats too special - there should be a generic way to get direct feedback on the commandline when something fails without doing magic. what if we e.g. 'export INTERACTIVE=1' via /etc/profile so procd / a called script is aware of this? Whats too special with /etc/init.d/$SERVICE debug ? it has to be implemented for every service - or are you thinking of doing it generic via rc.common? (then I am fine with 'debug') also: if the service fails to start, there should be at least a 'hint-message' to use 'debug'. bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] linux / overlay / OpenWrt / problems with full working dir
* Miklos Szeredi mik...@szeredi.hu [19.05.2015 11:19]: The work directory is needed for atomic copy-up and similar. It is not actually necessary to mount a read-only overlay. Post 4.0 it is possible to mount the overlay without workdir (but even then it won't happen automatically in case the upper fs is full, so this should be fixed in the latest kernel too). Could you please try the following patch? If the workdir can't be created it will fall back to mounting the overlay read-only. Thank you! I applied it on top of 3.18 and it works. Here some output with full 'work-dir'/jffs2: ... [8.80] jffs2: notice: (323) jffs2_build_xattr_subsystem: complete building xattr subsystem, 2 of xdatum (2 unc hecked, 0 orphan) and 2 of xref (0 dead, 0 orphan) found. [8.82] mount_root: switching to jffs2 overlay [9.03] overlayfs: failed to work directory (EROFS), mounting read-only ... root@box:~ df -h FilesystemSize Used Available Use% Mounted on rootfs 576.0K532.0K 44.0K 92% / /dev/root 2.3M 2.3M 0 100% /rom tmpfs14.0M 1.2M 12.8M 8% /tmp /dev/mtdblock3 576.0K532.0K 44.0K 92% /overlay overlayfs:/overlay 576.0K532.0K 44.0K 92% / tmpfs 512.0K 0512.0K 0% /dev root@box:~ mount rootfs on / type rootfs (rw) /dev/root on /rom type squashfs (ro,relatime) proc on /proc type proc (rw,noatime) sysfs on /sys type sysfs (rw,noatime) tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime) /dev/mtdblock3 on /overlay type jffs2 (rw,noatime) overlayfs:/overlay on / type overlay (ro,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work) tmpfs on /dev type tmpfs (rw,relatime,size=512k,mode=755) devpts on /dev/pts type devpts (rw,relatime,mode=600) debugfs on /sys/kernel/debug type debugfs (rw,noatime) please apply it on your git, and we will cherrypick/backport it for OpenWrt. (and close ticket https://dev.openwrt.org/ticket/19564) bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] -ash: changed behaviour of local vars / v1.22.1 - v1.23.2
while heavy testing of recent OpenWrt i discovered the following problem: x() { local x=1; echo $x; local x; echo $x; } older busybox will output 1 1 and v1.23.2 will only output 1 this means: 'local varname' will empty the var. is this a problem with a changed config? at least i cannot find a corresponding changeset regarding ash.c bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] [kernel] upstream fix: mount overlayfs r/o if workdir cannot be created
runtime tested on ar71xx with kernel 3.18.11 this paritially fixes #19564 Signed-off-by: Bastian Bittorf bitt...@bluebottle.com --- ...unt-read-only-if-workdir-can-t-be-created.patch | 114 1 file changed, 114 insertions(+) create mode 100644 target/linux/ar71xx/patches-3.18/910-overlayfs-mount-read-only-if-workdir-can-t-be-created.patch diff --git a/target/linux/ar71xx/patches-3.18/910-overlayfs-mount-read-only-if-workdir-can-t-be-created.patch b/target/linux/ar71xx/patches-3.18/910-overlayfs-mount-read-only-if-workdir-can-t-be-created.patch new file mode 100644 index 000..e563398 --- /dev/null +++ b/target/linux/ar71xx/patches-3.18/910-overlayfs-mount-read-only-if-workdir-can-t-be-created.patch @@ -0,0 +1,114 @@ +From cc6f67bcafcb62d1be1603dcd95125a52800 Mon Sep 17 00:00:00 2001 +From: Miklos Szeredi mszer...@suse.cz +Date: Tue, 19 May 2015 14:30:12 +0200 +Subject: [PATCH] ovl: mount read-only if workdir can't be created + +OpenWRT folks reported that overlayfs fails to mount if upper fs is full, +because workdir can't be created. Wordir creation can fail for various +other reasons too. + +There's no reason that the mount itself should fail, overlayfs can work +fine without a workdir, as long as the overlay isn't modified. + +So mount it read-only and don't allow remounting read-write. + +Add a couple of WARN_ON()s for the impossible case of workdir being used +despite being read-only. + +Reported-by: Bastian Bittorf bitt...@bluebottle.com +Signed-off-by: Miklos Szeredi mszer...@suse.cz +Cc: sta...@vger.kernel.org # v3.18+ +Signed-off-by: Bastian Bittorf bitt...@bluebottle.com + +--- + fs/overlayfs/copy_up.c |3 +++ + fs/overlayfs/dir.c |9 + + fs/overlayfs/super.c | 10 +- + 3 files changed, 17 insertions(+), 5 deletions(-) + +diff --git a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c +index 24f6404..84d693d 100644 +--- a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c +@@ -299,6 +299,9 @@ int ovl_copy_up_one(struct dentry *parent, struct dentry *dentry, + struct cred *override_cred; + char *link = NULL; + ++ if (WARN_ON(!workdir)) ++ return -EROFS; ++ + ovl_path_upper(parent, parentpath); + upperdir = parentpath.dentry; + +diff --git a/fs/overlayfs/dir.c b/fs/overlayfs/dir.c +index 2578a0c..692ceda 100644 +--- a/fs/overlayfs/dir.c b/fs/overlayfs/dir.c +@@ -222,6 +222,9 @@ static struct dentry *ovl_clear_empty(struct dentry *dentry, + struct kstat stat; + int err; + ++ if (WARN_ON(!workdir)) ++ return ERR_PTR(-EROFS); ++ + err = ovl_lock_rename_workdir(workdir, upperdir); + if (err) + goto out; +@@ -322,6 +325,9 @@ static int ovl_create_over_whiteout(struct dentry *dentry, struct inode *inode, + struct dentry *newdentry; + int err; + ++ if (WARN_ON(!workdir)) ++ return -EROFS; ++ + err = ovl_lock_rename_workdir(workdir, upperdir); + if (err) + goto out; +@@ -506,6 +512,9 @@ static int ovl_remove_and_whiteout(struct dentry *dentry, bool is_dir) + struct dentry *opaquedir = NULL; + int err; + ++ if (WARN_ON(!workdir)) ++ return -EROFS; ++ + if (is_dir) { + if (OVL_TYPE_MERGE_OR_LOWER(ovl_path_type(dentry))) { + opaquedir = ovl_check_empty_and_clear(dentry); +diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c +index 5f0d199..bf8537c 100644 +--- a/fs/overlayfs/super.c b/fs/overlayfs/super.c +@@ -529,7 +529,7 @@ static int ovl_remount(struct super_block *sb, int *flags, char *data) + { + struct ovl_fs *ufs = sb-s_fs_info; + +- if (!(*flags MS_RDONLY) !ufs-upper_mnt) ++ if (!(*flags MS_RDONLY) (!ufs-upper_mnt || !ufs-workdir)) + return -EROFS; + + return 0; +@@ -925,9 +925,10 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent) + ufs-workdir = ovl_workdir_create(ufs-upper_mnt, workpath.dentry); + err = PTR_ERR(ufs-workdir); + if (IS_ERR(ufs-workdir)) { +- pr_err(overlayfs: failed to create directory %s/%s\n, +- ufs-config.workdir, OVL_WORKDIR_NAME); +- goto out_put_upper_mnt; ++ pr_warn(overlayfs: failed to create directory %s/%s (errno: %i); mounting read-only\n, ++ ufs-config.workdir, OVL_WORKDIR_NAME, -err); ++ sb-s_flags |= MS_RDONLY; ++ ufs-workdir = NULL; + } + } + +@@ -997,7 +998,6 @@ out_put_lower_mnt: + kfree(ufs-lower_mnt); + out_put_workdir: + dput(ufs-workdir); +-out_put_upper_mnt: + mntput(ufs-upper_mnt); + out_put_lowerpath: + for (i = 0; i numlower; i++) +-- +1.7.10.4 + -- 1.7.10.4 ___ openwrt-devel mailing list
[OpenWrt-Devel] Trac / disk-full? (error while writing to spool file)
while editing a ticket, i saw: Warning: The change has been saved, but an error occurred while sending notifications: (451, 'Error while writing spool file') bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Chaos Calmer 15.05-rc1 / git-checkout
* Steven Barth cy...@openwrt.org [20.05.2015 19:43]: http://downloads.openwrt.org/chaos_calmer/15.05-rc1/ Thank you! when will this work?: git clone git://git.openwrt.org/15.05/openwrt.git * Known Issues - libusb-1.0 is currently not installable (#19668). This is already this is a joke 8-) there are ~3000 open tickets... bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] [base-files] show hint when JFFS2-partition is full and overlayfs mounted read-only
since r45833 and r45848 the overlayfs is automatically mounted read-only (and blocks remounts as r/w) when JFFS2 is full. see ticket #19564 because of this normal file deletion is not possible anymore. if a user logins interactively (e.g. SSH) show a hint for this, that files must be removed in /overlay/upper/... Signed-off-by: Bastian Bittorf bitt...@bluebottle.com --- package/base-files/files/etc/profile |4 1 file changed, 4 insertions(+) diff --git a/package/base-files/files/etc/profile b/package/base-files/files/etc/profile index 3dd58e1..007baf0 100644 --- a/package/base-files/files/etc/profile +++ b/package/base-files/files/etc/profile @@ -1,6 +1,10 @@ #!/bin/sh [ -f /etc/banner ] cat /etc/banner [ -e /tmp/.failsafe ] cat /etc/banner.failsafe +fgrep -sq '/ overlay ro,' /proc/mounts { + echo 'Your JFFS2-partition seems full and overlayfs is mounted read-only.' + echo 'Please try to remove files from /overlay/upper/... and reboot!' +} export PATH=/usr/bin:/usr/sbin:/bin:/sbin export HOME=$(grep -e ^${USER:-root}: /etc/passwd | cut -d : -f 6) -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [gre...@linuxfoundation.org: Patch ovl: mount read-only if workdir can't be created has been added to the 4.0-stable tree]
https://dev.openwrt.org/ticket/19564 we use it since r45848 - just to inform, that there is no need for a special 4.0 patch when it get merged. bye, bastian - Forwarded message from gre...@linuxfoundation.org - Date: Wed, 03 Jun 2015 10:15:11 +0900 From: gre...@linuxfoundation.org To: mszer...@suse.cz, bitt...@bluebottle.com, gre...@linuxfoundation.org Cc: sta...@vger.kernel.org, stable-comm...@vger.kernel.org Subject: Patch ovl: mount read-only if workdir can't be created has been added to the 4.0-stable tree This is a note to let you know that I've just added the patch titled ovl: mount read-only if workdir can't be created to the 4.0-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: ovl-mount-read-only-if-workdir-can-t-be-created.patch and it can be found in the queue-4.0 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let sta...@vger.kernel.org know about it. From cc6f67bcafcb62d1be1603dcd95125a52800 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi mszer...@suse.cz Date: Tue, 19 May 2015 14:30:12 +0200 Subject: ovl: mount read-only if workdir can't be created From: Miklos Szeredi mszer...@suse.cz commit cc6f67bcafcb62d1be1603dcd95125a52800 upstream. OpenWRT folks reported that overlayfs fails to mount if upper fs is full, because workdir can't be created. Wordir creation can fail for various other reasons too. There's no reason that the mount itself should fail, overlayfs can work fine without a workdir, as long as the overlay isn't modified. So mount it read-only and don't allow remounting read-write. Add a couple of WARN_ON()s for the impossible case of workdir being used despite being read-only. Reported-by: Bastian Bittorf bitt...@bluebottle.com Signed-off-by: Miklos Szeredi mszer...@suse.cz Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org --- fs/overlayfs/copy_up.c |3 +++ fs/overlayfs/dir.c |9 + fs/overlayfs/super.c | 10 +- 3 files changed, 17 insertions(+), 5 deletions(-) --- a/fs/overlayfs/copy_up.c +++ b/fs/overlayfs/copy_up.c @@ -299,6 +299,9 @@ int ovl_copy_up_one(struct dentry *paren struct cred *override_cred; char *link = NULL; + if (WARN_ON(!workdir)) + return -EROFS; + ovl_path_upper(parent, parentpath); upperdir = parentpath.dentry; --- a/fs/overlayfs/dir.c +++ b/fs/overlayfs/dir.c @@ -222,6 +222,9 @@ static struct dentry *ovl_clear_empty(st struct kstat stat; int err; + if (WARN_ON(!workdir)) + return ERR_PTR(-EROFS); + err = ovl_lock_rename_workdir(workdir, upperdir); if (err) goto out; @@ -322,6 +325,9 @@ static int ovl_create_over_whiteout(stru struct dentry *newdentry; int err; + if (WARN_ON(!workdir)) + return -EROFS; + err = ovl_lock_rename_workdir(workdir, upperdir); if (err) goto out; @@ -506,6 +512,9 @@ static int ovl_remove_and_whiteout(struc struct dentry *opaquedir = NULL; int err; + if (WARN_ON(!workdir)) + return -EROFS; + if (is_dir) { if (OVL_TYPE_MERGE_OR_LOWER(ovl_path_type(dentry))) { opaquedir = ovl_check_empty_and_clear(dentry); --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@ -529,7 +529,7 @@ static int ovl_remount(struct super_bloc { struct ovl_fs *ufs = sb-s_fs_info; - if (!(*flags MS_RDONLY) !ufs-upper_mnt) + if (!(*flags MS_RDONLY) (!ufs-upper_mnt || !ufs-workdir)) return -EROFS; return 0; @@ -925,9 +925,10 @@ static int ovl_fill_super(struct super_b ufs-workdir = ovl_workdir_create(ufs-upper_mnt, workpath.dentry); err = PTR_ERR(ufs-workdir); if (IS_ERR(ufs-workdir)) { - pr_err(overlayfs: failed to create directory %s/%s\n, - ufs-config.workdir, OVL_WORKDIR_NAME); - goto out_put_upper_mnt; + pr_warn(overlayfs: failed to create directory %s/%s (errno: %i); mounting read-only\n, + ufs-config.workdir, OVL_WORKDIR_NAME, -err); + sb-s_flags |= MS_RDONLY; + ufs-workdir = NULL; } } @@ -997,7 +998,6 @@ out_put_lower_mnt: kfree(ufs-lower_mnt); out_put_workdir: dput(ufs-workdir); -out_put_upper_mnt: mntput(ufs-upper_mnt); out_put_lowerpath: for (i = 0; i numlower; i++) Patches currently in stable-queue which might be from mszer...@suse.cz are queue-4.0/ovl-don-t-remove-non-empty-opaque-directory.patch queue-4.0/ovl-mount-read-only-if-workdir-can-t-be-created.patch - End forwarded message - mit drahtlosen Grüßen
Re: [OpenWrt-Devel] [PATCH] base-files: add /etc/profile.d support
* Hendrik Lüth hend...@linux-nerds.de [10.06.2015 12:58]: + for i in /etc/profile.d/* ; do +if [ -r $i ]; then + . $i +fi + done + unset i +fi i like the idea, but please use at least: command . $i or ( . $i ) otherwise a syntax error / file error will prevent a login. also use the unofficial simplified OpenWrt style here, it is OK to: for FILE in /etc/profile.d/*; do [ -e $FILE ] ( . $FILE ) done i'am also unsure if 'unset FILE' is maybe overkill... bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] base-files: add /etc/profile.d support
* Matthias Schiffer mschif...@universe-factory.net [10.06.2015 14:26]: Why should errors in these files cause login issues? This is shell and there's no -e, problematic lines will print an error and be skipped. i have seen a lot of strange things. think about flash readerrors or stack corruption or $youridea 8-) i think we can agree that we will not use a subshell, but ignore profile.d in failsafe mode, ok? the 'sh -n' thing is just a small 'insurance' - do you think it hurts/is too much? bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] base-files: add /etc/profile.d support
* thomas.lan...@lantiq.com thomas.lan...@lantiq.com [10.06.2015 13:59]: I think this will not work, as /etc/profile (and these additional files) is expected to be executed in the current shell context. Otherwise adding shell variables or extending $PATH will not work. So you cannot execute them in a subshell. ok, then please: [ -e $FILE ] sh -n $FILE . $FILE Maybe it is possible to skip this for FAILSAFE mode? If there are errors, they can be corrected in this way. this is a good point: [ -z $FAILSAFE ] { ...yourlogic... } bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] How to keep disabled services disabled after sysupgrade
* Stefan Tomanek stefan.tomanek+open...@wertarbyte.de [18.06.2015 15:39]: Can anyone supply any different ideas or provide some feedback? maybe: disabled services are stored during sysupgrade in e.g. /lib/upgrade/keep.d/services_disabled and this file will be read line by line during firstboot/uci-defaults (and services diabled again) and the file is then deleted. bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Presentation on Linux Containers (LXC)
* Javier Domingo Cansino javier...@gmail.com [26.06.2015 17:22]: Thanks for sharing!! short comment from myself (for the next hangout). everyone who is speaking should do a short introduce myself with background. bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] base-files: add /etc/profile.d support
* Hendrik Lüth hend...@linux-nerds.de [10.06.2015 20:38]: Weather a script needs to get called in failsafe mode or not depends on the script, so I'd like to not skip it. no, failsafe is failsafe is failsafe and should do mostly nothing. bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] base-files: add /etc/profile.d support
* Yousong Zhou yszhou4t...@gmail.com [10.06.2015 20:38]: distributions. This allows packages to install their own scripts into /etc/profile.d/. IMO, OpenWrt is not like most of other Linux distributions. So what are those other packages that need this and the current specific use cases? I agree, that OpenWrt differs - and i have a usecase: 1) we like to have special helpers like alias n='wget -qO - http://127.0.0.1:2006/neighbours' (for OLSRd) and we source/include a special 'metascript' which makes adminstration much easier. for now we patch /etc/profile but having it in profile.d is more clean and: it is automatically removed if package XY is also removed... bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCHv2] ppp : Unnumbered support
* Hans Dedecker dedec...@gmail.com [12.06.2015 12:15]: + if [ -n $res_mask -a $mask != 32 ]; then + [ $mask -gt $res_mask ] || [ $res_mask = 32 ] { if you send a v3, please use here: [ $mask -gt $res_mask -o $res_mask = 32 ] { ... } + [ -n $localip ] || { here please use (dont use negation of negation): [ -z $localip ] { ... } bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] opkg.conf as preserved config file in sysupgrade is creating problems (especially after package signing)
* Hannu Nyman hannu.ny...@iki.fi [18.06.2015 11:06]: Other possibility could be divide opkg.conf into two: a build-specific default download repo list (to be overwritten in sysupgrade) and a user-specific config file with config options and possible additional download locations (to be preserved). IMHO this is a good idea. A solution can be to have /var/opkg.conf (in ramdisk) and let symlink /etc/opkg.conf to it. the one in the ramdisk is dynamically built from /etc/opkg.conf (buildspecific) and /etc/opkg_user.conf or just patching opkg for loading both (ATM it only supports 1 conffile) bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] [generic] ramips: adding support for OYE-0001 Wireless Router
* younfan33 younfa...@hotmail.com [17.06.2015 08:52]: --- target/linux/ramips/base-files/lib/preinit/06_set_iface_mac(revision 0) +++ target/linux/ramips/base-files/lib/preinit/06_set_iface_mac(revision 0) @@ -0,0 +1,113 @@ +# +# Copyright (C) 2011 OpenWrt.org +# + +preinit_set_mac_address() { here must be something wrong - why are there so many added lines? bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] can netifd automatically restart a service?
* Nikos Mavrogiannopoulos n...@gnutls.org [11.06.2015 09:35]: individual service). However, a way to reduce the impact would be for netifd to restart transmission if crashed. Can that be done already, or inittab is the only option? you can convert the initscript for using 'procd'. take as an example the file '/etc/init.d/log'. you can just try: # pidof logd # killall logd # sleep 10 # pidof logd (the pid has changed) bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v2] base-files: add /etc/profile.d support
* Hendrik hend...@linux-nerds.de [15.06.2015 09:02]: i just wanted to ask for your oppinions on the second verison of my patch. why didnt you pay attention for all the suggestions? bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] menuconfig: unselect usign / build without opkg
while working on a minimal image, i tried to build without usign. is it possible to let it depend on opkg? can i send a patch for this? bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v4] [kernel] upstream fix: mount overlayfs r/o if workdir cannot be created
* Christian Mehlis christ...@m3hlis.de [29.05.2015 19:00]: this patch is superfluous because it's already merged... Thomas is right, i send it only for ar71xx, but it should be in the generic 3.18-patchfolder. I'am already compiling some other platforms and test it. if ok, i will send v5 which will revert the old and place the patch in generic... bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] odhcp6c: script: only call firewall, if installed
We dont use fw3, so i was wondering about error-messages in syslog about fw3. check if 'fw3' is in place, before calling it. Signed-off-by: Bastian Bittorf bitt...@bluebottle.com --- package/network/ipv6/odhcp6c/files/dhcpv6.script |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.script b/package/network/ipv6/odhcp6c/files/dhcpv6.script index a2adf39..886d643 100755 --- a/package/network/ipv6/odhcp6c/files/dhcpv6.script +++ b/package/network/ipv6/odhcp6c/files/dhcpv6.script @@ -118,7 +118,9 @@ setup_interface () { MAPRULE=$LW4O6 fi - [ -n $ZONE ] || ZONE=$(fw3 -q network $INTERFACE) + [ -n $ZONE ] || { + [ -e '/sbin/fw3' ] ZONE=$(fw3 -q network $INTERFACE) + } if [ $IFACE_MAP != 0 -a -n $MAPTYPE -a -n $MAPRULE ]; then [ -z $IFACE_MAP -o $IFACE_MAP = 1 ] IFACE_MAP=${INTERFACE}_4 -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH/resend] [odhcp6c] script: only call firewall, if installed
* Steven Barth cy...@openwrt.org [31.05.2015 20:56]: The patch is malformed and cannot be applied. i just sent a rebased version (the old was from 2014). bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] odhcp6c: script: only call firewall, if installed
* Steven Barth cy...@openwrt.org [01.06.2015 10:46]: Is that okay with you as well https://dev.openwrt.org/changeset/45867 ? it's ok for me, but IMHO not the proper way, because you are hiding errors, if there are any... bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] zram-swap: set a high priority for the swap
* Juan Orti Alcaine j.orti.alca...@gmail.com [26.05.2015 07:59]: - swapon $zram_dev + swapon -p 100 $zram_dev please use at least: swapon -p X $dev || swapon $dev so it can work even without '-p' option, which is optional in busybox. bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2] [kernel] upstream fix: mount overlayfs r/o if workdir cannot be created
This is the case e.g. if JFFS2 partition is full. see: https://www.mail-archive.com/linux-unionfs@vger.kernel.org/msg00246.html runtime tested on ar71xx with kernel 3.18.14 and r45772 (rebased) this paritially fixes #19564 Signed-off-by: Bastian Bittorf bitt...@bluebottle.com --- ...-overlayfs-fallback-to-readonly-when-full.patch | 109 1 file changed, 109 insertions(+) create mode 100644 target/linux/ar71xx/patches-3.18/910-overlayfs-fallback-to-readonly-when-full.patch diff --git a/target/linux/ar71xx/patches-3.18/910-overlayfs-fallback-to-readonly-when-full.patch b/target/linux/ar71xx/patches-3.18/910-overlayfs-fallback-to-readonly-when-full.patch new file mode 100644 index 000..21f11fd --- /dev/null +++ b/target/linux/ar71xx/patches-3.18/910-overlayfs-fallback-to-readonly-when-full.patch @@ -0,0 +1,109 @@ +[linux-unionfs added to Cc] + +On Tue, May 19, 2015 at 09:51:20AM +0200, Bastian Bittorf wrote: + Hi Miklos, + + sorry for writing directly to you, feel free to forward + this to the appropriate mailinglist. + + we have a problem with mainline overlay filesystem on kernel 3.18: + https://dev.openwrt.org/ticket/19564 + + 2 things are odd: + when the working filesystem is full, overlays fails with: + + overlayfs: failed to create directory /overlay/work/work + + what is strange, that we call it with: + + mount(overlay, /mnt, overlay, MS_NOATIME, lowerdir) + + see here: + http://nbd.name/gitweb.cgi?p=fstools.git;a=blob;f=libfstools/mount.c;h=81176ce399b4cd8e2d347c0008c13dec92407f55;hb=e6004000ff15d7bd32cf5663e8690fc94d7ec747#l125 + + do you have an idea whats wrong? + 1) is it really needed, that we need space for creating dir /overlay/work? + 2) why does overlay need /overlay/work/work? + +The work directory is needed for atomic copy-up and similar. It is not actually +necessary to mount a read-only overlay. Post 4.0 it is possible to mount the +overlay without workdir (but even then it won't happen automatically in case the +upper fs is full, so this should be fixed in the latest kernel too). + +Could you please try the following patch? If the workdir can't be created it +will fall back to mounting the overlay read-only. + +Thanks, +Miklos + +--- + fs/overlayfs/copy_up.c |3 +++ + fs/overlayfs/dir.c |9 + + fs/overlayfs/super.c | 12 +--- + 3 files changed, 21 insertions(+), 3 deletions(-) + +--- a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c +@@ -300,6 +300,9 @@ int ovl_copy_up_one(struct dentry *paren + struct cred *override_cred; + char *link = NULL; + ++ if (WARN_ON(!workdir)) ++ return -EROFS; ++ + ovl_path_upper(parent, parentpath); + upperdir = parentpath.dentry; + +--- a/fs/overlayfs/dir.c b/fs/overlayfs/dir.c +@@ -222,6 +222,9 @@ static struct dentry *ovl_clear_empty(st + struct kstat stat; + int err; + ++ if (WARN_ON(!workdir)) ++ return ERR_PTR(-EROFS); ++ + err = ovl_lock_rename_workdir(workdir, upperdir); + if (err) + goto out; +@@ -322,6 +325,9 @@ static int ovl_create_over_whiteout(stru + struct dentry *newdentry; + int err; + ++ if (WARN_ON(!workdir)) ++ return -EROFS; ++ + err = ovl_lock_rename_workdir(workdir, upperdir); + if (err) + goto out; +@@ -506,6 +512,9 @@ static int ovl_remove_and_whiteout(struc + struct dentry *opaquedir = NULL; + int err; + ++ if (WARN_ON(!workdir)) ++ return -EROFS; ++ + if (is_dir) { + opaquedir = ovl_check_empty_and_clear(dentry); + err = PTR_ERR(opaquedir); +--- a/fs/overlayfs/super.c b/fs/overlayfs/super.c +@@ -740,9 +740,15 @@ static int ovl_fill_super(struct super_b + ufs-workdir = ovl_workdir_create(ufs-upper_mnt, workpath.dentry); + err = PTR_ERR(ufs-workdir); + if (IS_ERR(ufs-workdir)) { +- pr_err(overlayfs: failed to create directory %s/%s\n, +- ufs-config.workdir, OVL_WORKDIR_NAME); +- goto out_put_lower_mnt; ++ if (err == -ENOSPC || err == -EROFS) { ++ pr_warning(overlayfs: failed to work directory (%s), mounting read-only\n, err == ENOSPC ? ENOSPC : EROFS); ++ sb-s_flags |= MS_RDONLY; ++ ufs-workdir = NULL; ++ } else { ++ pr_err(overlayfs: failed to create directory %s/%s\n, ++ ufs-config.workdir, OVL_WORKDIR_NAME); ++ goto out_put_lower_mnt; ++ } + } + + /* -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v3] [kernel] upstream fix: mount overlayfs r/o if workdir cannot be created
This is the case e.g. if JFFS2 partition is full. see: https://www.mail-archive.com/linux-unionfs@vger.kernel.org/msg00246.html (a small error in a logmessage was changed and reported upstream) runtime tested on ar71xx with kernel 3.18.11 and r45772 this paritially fixes #19564 Signed-off-by: Bastian Bittorf bitt...@bluebottle.com --- ...-overlayfs-fallback-to-readonly-when-full.patch | 109 1 file changed, 109 insertions(+) create mode 100644 target/linux/ar71xx/patches-3.18/910-overlayfs-fallback-to-readonly-when-full.patch diff --git a/target/linux/ar71xx/patches-3.18/910-overlayfs-fallback-to-readonly-when-full.patch b/target/linux/ar71xx/patches-3.18/910-overlayfs-fallback-to-readonly-when-full.patch new file mode 100644 index 000..21f11fd --- /dev/null +++ b/target/linux/ar71xx/patches-3.18/910-overlayfs-fallback-to-readonly-when-full.patch @@ -0,0 +1,109 @@ +[linux-unionfs added to Cc] + +On Tue, May 19, 2015 at 09:51:20AM +0200, Bastian Bittorf wrote: + Hi Miklos, + + sorry for writing directly to you, feel free to forward + this to the appropriate mailinglist. + + we have a problem with mainline overlay filesystem on kernel 3.18: + https://dev.openwrt.org/ticket/19564 + + 2 things are odd: + when the working filesystem is full, overlays fails with: + + overlayfs: failed to create directory /overlay/work/work + + what is strange, that we call it with: + + mount(overlay, /mnt, overlay, MS_NOATIME, lowerdir) + + see here: + http://nbd.name/gitweb.cgi?p=fstools.git;a=blob;f=libfstools/mount.c;h=81176ce399b4cd8e2d347c0008c13dec92407f55;hb=e6004000ff15d7bd32cf5663e8690fc94d7ec747#l125 + + do you have an idea whats wrong? + 1) is it really needed, that we need space for creating dir /overlay/work? + 2) why does overlay need /overlay/work/work? + +The work directory is needed for atomic copy-up and similar. It is not actually +necessary to mount a read-only overlay. Post 4.0 it is possible to mount the +overlay without workdir (but even then it won't happen automatically in case the +upper fs is full, so this should be fixed in the latest kernel too). + +Could you please try the following patch? If the workdir can't be created it +will fall back to mounting the overlay read-only. + +Thanks, +Miklos + +--- + fs/overlayfs/copy_up.c |3 +++ + fs/overlayfs/dir.c |9 + + fs/overlayfs/super.c | 12 +--- + 3 files changed, 21 insertions(+), 3 deletions(-) + +--- a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c +@@ -300,6 +300,9 @@ int ovl_copy_up_one(struct dentry *paren + struct cred *override_cred; + char *link = NULL; + ++ if (WARN_ON(!workdir)) ++ return -EROFS; ++ + ovl_path_upper(parent, parentpath); + upperdir = parentpath.dentry; + +--- a/fs/overlayfs/dir.c b/fs/overlayfs/dir.c +@@ -222,6 +222,9 @@ static struct dentry *ovl_clear_empty(st + struct kstat stat; + int err; + ++ if (WARN_ON(!workdir)) ++ return ERR_PTR(-EROFS); ++ + err = ovl_lock_rename_workdir(workdir, upperdir); + if (err) + goto out; +@@ -322,6 +325,9 @@ static int ovl_create_over_whiteout(stru + struct dentry *newdentry; + int err; + ++ if (WARN_ON(!workdir)) ++ return -EROFS; ++ + err = ovl_lock_rename_workdir(workdir, upperdir); + if (err) + goto out; +@@ -506,6 +512,9 @@ static int ovl_remove_and_whiteout(struc + struct dentry *opaquedir = NULL; + int err; + ++ if (WARN_ON(!workdir)) ++ return -EROFS; ++ + if (is_dir) { + opaquedir = ovl_check_empty_and_clear(dentry); + err = PTR_ERR(opaquedir); +--- a/fs/overlayfs/super.c b/fs/overlayfs/super.c +@@ -740,9 +740,15 @@ static int ovl_fill_super(struct super_b + ufs-workdir = ovl_workdir_create(ufs-upper_mnt, workpath.dentry); + err = PTR_ERR(ufs-workdir); + if (IS_ERR(ufs-workdir)) { +- pr_err(overlayfs: failed to create directory %s/%s\n, +- ufs-config.workdir, OVL_WORKDIR_NAME); +- goto out_put_lower_mnt; ++ if (err == -ENOSPC || err == -EROFS) { ++ pr_warning(overlayfs: failed to create work directory (%s), mounting read-only\n, err == ENOSPC ? ENOSPC : EROFS); ++ sb-s_flags |= MS_RDONLY; ++ ufs-workdir = NULL; ++ } else { ++ pr_err(overlayfs: failed to create directory %s/%s\n, ++ ufs-config.workdir, OVL_WORKDIR_NAME); ++ goto out_put_lower_mnt; ++ } + } + + /* -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v2] [kernel] upstream fix: mount overlayfs r/o if workdir cannot be created
* Jo-Philipp Wich j...@openwrt.org [27.05.2015 18:40]: This should get corrected (and upstream notified about it as well). e.g. 'failed to create work directory'? bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH/resend] [odhcp6c] script: only call firewall, if installed
* Bastian Bittorf bitt...@bluebottle.com [23.10.2014 11:28]: odhcp6c: script: only call firewall, if installed we dont use fw3, so i was wondering about error-messages in syslog about fw3. check if 'fw3' is in place, before calling it. Signed-off-by: Bastian Bittorf bitt...@bluebottle.com --- package/network/ipv6/odhcp6c/files/dhcpv6.script |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.script b/package/network/ipv6/odhcp6c/files/dhcpv6.script index 1acad19..6c47132 100755 --- a/package/network/ipv6/odhcp6c/files/dhcpv6.script +++ b/package/network/ipv6/odhcp6c/files/dhcpv6.script @@ -111,7 +111,9 @@ setup_interface () { MAPRULE=$LW4O6 fi - [ -n $ZONE ] || ZONE=$(fw3 -q network $INTERFACE) + [ -z $ZONE ] { + [ -e '/sbin/fw3' ] ZONE=$(fw3 -q network $INTERFACE) + } if [ $IFACE_MAP != 0 -a -n $MAPTYPE -a -n $MAPRULE ]; then [ -z $IFACE_MAP -o $IFACE_MAP = 1 ] IFACE_MAP=${INTERFACE}_map -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Dualradio 2.4/5GHz ath9k-Hardware which is deliverable?
In our community we are struggling now, what we can buy. TP-Link 4900 and 4300 are EOL now in Germany. What else is there? - 8mb+ flash - 450 mbit ath9k 2.4 GHz - 450 mbit ath9k 5 GHz - 128mb ram - 5 gigabit ports - OpenWrt 8-) bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Dualradio 2.4/5GHz ath9k-Hardware which is deliverable?
* Jonathan Bennett jbscienc...@gmail.com [01.07.2015 20:33]: I have had great success with the tp-link Archer c7. It fits the bid nicely, if it is available. no, it does not fit. it has only an ath10k-radio for 5ghz. bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] This patch fixes a line that appears to clear beacon_int variable, prevent setting beacon interval for adhoc.
* ben b...@gowasabi.net [30.06.2015 06:48]: Signed-off-by: ben b...@gowasabi.net --- package/network/services/hostapd/files/netifd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh index 23d2e7e..f148544 100644 --- a/package/network/services/hostapd/files/netifd.sh +++ b/package/network/services/hostapd/files/netifd.sh @@ -632,7 +632,7 @@ wpa_supplicant_add_network() { ;; esac } - local beacon_int brates mrate + local brates mrate [ -n $bssid ] append network_data bssid=$bssid $N$T [ -n $beacon_int ] append network_data beacon_int=$beacon_int $N$T this is a bug only for busybox 1.22.1 http://lists.busybox.net/pipermail/busybox/2015-April/082780.html beside this: we should take more care in the shellscripts, so that local vars are 'lowercase' and global vars are 'UPPERCASE'. thus it should read e.g.: hostapd_prepare_device_config() { ... local country country_ie beacon_int doth require_mode json_get_vars country country_ie beacon_int doth require_mode ... } are doesnt this work and 'json_get_vars' is always global? bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Dualradio 2.4/5GHz ath9k-Hardware which is deliverable?
* Emmanuel Deloget log...@free.fr [01.07.2015 21:50]: You should try Aliexpress - it seems they still have some 4900 (be aware that prices might be a bit weird). my question is not about tricks to get these devices. it's about what can be found everywhere. is 2.4+5ghz ath9k really outdated? bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [Olsr-dev] [ANNOUNCE - v1] olsrd v0.9.0.2 released
* Ferry Huberts maili...@hupie.com [30.06.2015 18:38]: We did a bug-fix release of olsrd v1. yesterday i updated the OpenWrt routing-packages for trunk|14.07|15.05 - thank you all! BTW: no issues so far when using 'musl' libc. as always: please compile, test and report 8-) bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Dualradio 2.4/5GHz ath9k-Hardware which is deliverable?
* Etienne Champetier champetier.etie...@gmail.com [02.07.2015 10:51]: is 2.4+5ghz ath9k really outdated? bye, bastian maybe you can explain why only ath9k (mesh? binary blob?) We like on 4 things: - ratecontrol in userspace (minstrel) - powercontrol in userspace (not upstream yet) - IBSS/adhoc together with AP-mode - a working driver (ath10k is far away from that) bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Fwd: iwinfo lua scanlist issue
* Peter Uithoven pe...@peteruithoven.nl [29.06.2015 15:27]: If I understand the OpenWRT wiki hotplug is replaced by procd? no. netifd will start hotplug if an interface comes up. But, why does the wiki say this then? Is that info incorrect? Is netifd an exception? you are right - procd will call '/sbin/hotplug $args' which is invoked from netifd via ubus...(hope you are confused now...) 8-) bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Fwd: iwinfo lua scanlist issue
* Peter Uithoven pe...@peteruithoven.nl [29.06.2015 13:20]: We do a little bit of our own wifi config. We try to find (using scanlist) known wifi networks and connect to them, when non appropriate are found we create a accesspoint. In the future, when connecting to a known networks fails it should also become a accesspoint. ok...then you can maybe with hotplug wait for ACTION='ifup' maybe something like this (will not work, but you get the idea) #!/bin/sh # hotplug-script: SCANNED='/your/path' MYCHANNELS='1 2 3 154 168' [ $ACTION = 'ifup' -a -e $SCANNED ] { scan_for_known_networks | while read NETWORK_SETTINGS ; do connect $NETWORK_SETTINGS # ssid, channel, pass etc. rm $SCANNED done } [ $ACTION = 'ifup' -a $INTERFACE = 'mywifi' ] { for CHAN in $MYCHANNELS; do create_adhoc $CHAN touch 'SCANNED' wifi done } If I understand the OpenWRT wiki hotplug is replaced by procd? no. netifd will start hotplug if an interface comes up. bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] watchping
* Bruno Randolf b...@einfach.org [03.07.2015 13:15]: I am writing here to ask wether someone has done this already, or if there are any other concerns or opinions. Please let me know! I think nearly every wireless community has something like this. A good approach is IMHO the sven-ola check different routing-tables via traceroute thing. Check out the this cron.minutely script for that. I think you must have in mind is, that after 'ifup' there is an delay till internet is working. (and you need a threshold) bye, bastian / weimarnetz.de ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] watchping
* Bruno Randolf b...@einfach.org [03.07.2015 13:15]: I am writing here to ask wether someone has done this already, or if there are any other concerns or opinions. Please let me know! IMHO useful would be to have a hotplug-events during every change of default-route (for every interface). (e.g. new|change|del) I asked 'nbd' about that some time ago, but he did'nt like the idea. bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] error 421 while creating new ticket
just for the admin: Warning: The ticket has been created, but an error occurred while sending notifications: (421, 'Unexpected failure, please try later') while submitting this new ticket: https://dev.openwrt.org/ticket/20029 bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] working with quilt from './staging_dir/host/bin/quilt'
* Jo-Philipp Wich j...@openwrt.org [21.05.2015 20:50]: meanwhile yes, but it does not work like i exspected. should'nt quilt open, when a patch cannot be applied cleanly? Uhm no. At least I never encountered such behavior. ok, lets say i have copied a patch into the kernel-patches folder which cannot be applied cleanly. what is the workflow for e.g. rebasing or automerging and changing the patch to be (line-)correct. my idea was to use this: make target/linux/{clean,prepare} V=s QUILT=1 but at least it seems not to be the way thanks in advance - bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] working with quilt from './staging_dir/host/bin/quilt'
on my buildserver i cannot install packages and must use e.g. './staging_dir/host/bin/quilt'. but quilt does not start with: make target/linux/{clean,prepare} V=s QUILT=1 bastian@gcc20:~/openwrt$ which quilt || echo missing missing bastian@gcc20:~/openwrt$ ./staging_dir/host/bin/quilt --version 0.63 is this possible or is admin-interaction needed on my site? bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] [kernel] upstream fix: mount overlayfs r/o if workdir cannot be created
* Christian Mehlis christ...@m3hlis.de [21.05.2015 12:49]: +--- a/fs/overlayfs/super.c b/fs/overlayfs/super.c +@@ -529,7 +529,7 @@ static int ovl_remount(struct super_block *sb, int *flags, char *data) this function was added with linux 4.0, so your patch for 3.18 does not apply. Can you give me a hint to make it work with 3.18? i will investigate - it applied locally here with 3.18 - will check why... bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] [kernel] upstream fix: mount overlayfs r/o if workdir cannot be created
* Christian Mehlis christ...@m3hlis.de [21.05.2015 12:49]: Can you give me a hint to make it work with 3.18? can you please try to apply the appended patch with git am $file make target/linux/clean make bye, bastian From f5d917da8665f1a3c79e5beb34acea7daf019ff5 Mon Sep 17 00:00:00 2001 From: Bastian Bittorf bitt...@bluebottle.com Date: Thu, 21 May 2015 13:55:00 +0200 Subject: [PATCH] [kernel] upstream fix: mount overlayfs r/o if workdir cannot be created see: https://www.mail-archive.com/linux-unionfs@vger.kernel.org/msg00246.html runtime tested on ar71xx with kernel 3.18.11 and r45705 this paritially fixes #19564 Signed-off-by: Bastian Bittorf bitt...@bluebottle.com --- ...-overlayfs-fallback-to-readonly-when-full.patch | 109 1 file changed, 109 insertions(+) create mode 100644 target/linux/ar71xx/patches-3.18/910-overlayfs-fallback-to-readonly-when-full.patch diff --git a/target/linux/ar71xx/patches-3.18/910-overlayfs-fallback-to-readonly-when-full.patch b/target/linux/ar71xx/patches-3.18/910-overlayfs-fallback-to-readonly-when-full.patch new file mode 100644 index 000..3433cbc --- /dev/null +++ b/target/linux/ar71xx/patches-3.18/910-overlayfs-fallback-to-readonly-when-full.patch @@ -0,0 +1,109 @@ +[linux-unionfs added to Cc] + +On Tue, May 19, 2015 at 09:51:20AM +0200, Bastian Bittorf wrote: + Hi Miklos, + + sorry for writing directly to you, feel free to forward + this to the appropriate mailinglist. + + we have a problem with mainline overlay filesystem on kernel 3.18: + https://dev.openwrt.org/ticket/19564 + + 2 things are odd: + when the working filesystem is full, overlays fails with: + + overlayfs: failed to create directory /overlay/work/work + + what is strange, that we call it with: + + mount(overlay, /mnt, overlay, MS_NOATIME, lowerdir) + + see here: + http://nbd.name/gitweb.cgi?p=fstools.git;a=blob;f=libfstools/mount.c;h=81176ce399b4cd8e2d347c0008c13dec92407f55;hb=e6004000ff15d7bd32cf5663e8690fc94d7ec747#l125 + + do you have an idea whats wrong? + 1) is it really needed, that we need space for creating dir /overlay/work? + 2) why does overlay need /overlay/work/work? + +The work directory is needed for atomic copy-up and similar. It is not actually +necessary to mount a read-only overlay. Post 4.0 it is possible to mount the +overlay without workdir (but even then it won't happen automatically in case the +upper fs is full, so this should be fixed in the latest kernel too). + +Could you please try the following patch? If the workdir can't be created it +will fall back to mounting the overlay read-only. + +Thanks, +Miklos + +--- + fs/overlayfs/copy_up.c |3 +++ + fs/overlayfs/dir.c |9 + + fs/overlayfs/super.c | 12 +--- + 3 files changed, 21 insertions(+), 3 deletions(-) + +--- a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c +@@ -300,6 +300,9 @@ int ovl_copy_up_one(struct dentry *paren + struct cred *override_cred; + char *link = NULL; + ++ if (WARN_ON(!workdir)) ++ return -EROFS; ++ + ovl_path_upper(parent, parentpath); + upperdir = parentpath.dentry; + +--- a/fs/overlayfs/dir.c b/fs/overlayfs/dir.c +@@ -222,6 +222,9 @@ static struct dentry *ovl_clear_empty(st + struct kstat stat; + int err; + ++ if (WARN_ON(!workdir)) ++ return ERR_PTR(-EROFS); ++ + err = ovl_lock_rename_workdir(workdir, upperdir); + if (err) + goto out; +@@ -322,6 +325,9 @@ static int ovl_create_over_whiteout(stru + struct dentry *newdentry; + int err; + ++ if (WARN_ON(!workdir)) ++ return -EROFS; ++ + err = ovl_lock_rename_workdir(workdir, upperdir); + if (err) + goto out; +@@ -506,6 +512,9 @@ static int ovl_remove_and_whiteout(struc + struct dentry *opaquedir = NULL; + int err; + ++ if (WARN_ON(!workdir)) ++ return -EROFS; ++ + if (is_dir) { + opaquedir = ovl_check_empty_and_clear(dentry); + err = PTR_ERR(opaquedir); +--- a/fs/overlayfs/super.c b/fs/overlayfs/super.c +@@ -740,9 +740,15 @@ static int ovl_fill_super(struct super_b + ufs-workdir = ovl_workdir_create(ufs-upper_mnt, workpath.dentry); + err = PTR_ERR(ufs-workdir); + if (IS_ERR(ufs-workdir)) { +- pr_err(overlayfs: failed to create directory %s/%s\n, +- ufs-config.workdir, OVL_WORKDIR_NAME); +- goto out_put_lower_mnt; ++ if (err == -ENOSPC || err == -EROFS) { ++ pr_warning(overlayfs: failed to work directory (%s), mounting read-only\n, err == ENOSPC ? ENOSPC : EROFS); ++ sb-s_flags |= MS_RDONLY; ++ ufs-workdir = NULL; ++ } else { ++ pr_err(overlayfs: failed to create directory %s/%s\n, ++ ufs-config.workdir, OVL_WORKDIR_NAME); ++ goto out_put_lower_mnt; ++ } + } + + /* -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] working with quilt from './staging_dir/host/bin/quilt'
* Jo-Philipp Wich j...@openwrt.org [21.05.2015 15:18]: Did you try something like export PATH=$PATH:/home/bastian/openwrt/staging_dir/host/bin ? meanwhile yes, but it does not work like i exspected. should'nt quilt open, when a patch cannot be applied cleanly? bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v2] busybox: lock: implement -n Fail rather than wait
* Alexander Couzens lyn...@fe80.eu [07.08.2015 20:48]: lock -n is similiar to flock -n. If the lock was already taken, fail with exit code = 1 and write error message to stderr. see: http://mywiki.wooledge.org/BashFAQ/045 internally we are using 'mkdir' which is called via a 'lock()' function: if mkdir /tmp/lock_$reason; then return 0 else return 1 fi bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] busybox: lock: implement -n Fail rather than wait
* Alexander Couzens lyn...@fe80.eu [06.08.2015 19:05]: lock -n is similiar to flock -n. If the lock was already taken, fail with exit code = 1 and write error message to stderr. sorry, forget to ask: is this more atomic than 'mkdir mypath || return'? bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Separate Default SSID for 2.4GHz and 5GHz
* Sami Olmari s...@olmari.fi [07.08.2015 15:48]: In openwrt you are free to configure each and every radio as own unit, so use whatever SSID you see fit for each radio. This is default basic OpenWrt stuff :) seems that Afkar has 1 radio which must be switched between 2.4 and 5 GHz, Afkar? bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] iproute2/tc does not apply or show filters
While working with 'tc' we found something strange: Our filters apply without errors, but we cannot see them with 'tc filter show dev $dev'. Also when running 'tc monitor' in another terminal, we only see 'qdisc' related things, but not filters. It seems that it happens from r37xxx till now/trunk. Sometimes we can see: root@box:~ tc filter show dev $dev filter parent 1: protocol ip pref 1 u32 filter parent 1: protocol ip pref 1 u32 fh 800: ht divisor 1 sometimes we see: root@box:~ tc filter show dev $dev filter parent 1: protocol ip pref 1 u32 filter parent 1: protocol ip pref 1 u32 fh 800: ht divisor 1 filter parent 1: protocol ip pref 1 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:1 match 0011/00ff at 8 match 02ba/ at 20 we we add 5 or even 11 rules - where are they? maybe they are internally used but not shown? bye, bastian / weimarnetz.de PS: our ruleset for easy trying out: https://github.com/weimarnetz/weimarnetz/blob/master/openwrt-addons/etc/init.d/S90olsr-prio or this one with more documentation: https://github.com/bittorf/kalua/blob/master/openwrt-addons/etc/kalua/netfilter#L2072 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] RFC: adding 'traceroute6' to busybox / base
i build it for ar71xx, and these are the numbers [bytes]: before: 359736 build_dir/target-mips_34kc_musl-1.1.10/busybox-1.23.2/busybox 208071 bin/ar71xx/packages/base/busybox_1.23.2-1_ar71xx.ipk after: 359884 build_dir/target-mips_34kc_musl-1.1.10/busybox-1.23.2/busybox 209115 bin/ar71xx/packages/base/busybox_1.23.2-1_ar71xx.ipk so it adds ~1k to the image. (strange that uncompressed ~148 bytes) it's as simple as adding CONFIG_BUSYBOX_CONFIG_TRACEROUTE6=y what do you think? bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] base-files: rework reset button script to indicate factory reset
* Rafał Miłecki zaj...@gmail.com [11.08.2015 21:01]: is there a special reason, that you are using exec /sbin/poweroff instead of just /sbin/poweroff bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] base-files: rework reset button script to indicate factory reset
* Rafał Miłecki zaj...@gmail.com [12.08.2015 15:10]: I think you're commenting on a wrong patch. sorry, yes - the comment applies to: a643de25/r40909 and i just stumpled upon this while reading the affected sources of your patch. @stefan: why is this 'exec' needed? bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] bugfix: FORCE=1 doesn't work to override prereq checks
* Lawrence D'Anna la...@elder-gods.org [26.07.2015 16:39]: What prereq can be forced that makes force even a worthwhile option? If it works anyway, why not just drop the prereq check? If it still won't work, what's the point in allowing a force? In my case it was because the prereq checks didn’t think I had openssl because they didn’t use HOST_CPPFLAGS. here i had problems on IBM Power7/8 with AIX. i think for the 'brave' a FORCE makes sense for tracking down problems. e.g. simply aborting, because 'GNU find' is not there is...because of GNU? 8-) bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] RFC: Preserving smbpasswd dnsmasq.time across sysupgrade
* Kevin Darbyshire-Bryant ke...@darbyshire-bryant.me.uk [26.07.2015 16:35]: The next question is how? It looks like a few other packages create a subdir in 'keep.d' with a file containing a list of files that should be preserved by default. I would anticipate creating 'samba' 'dnsmasq' subdirs though the package Makefiles. A better way? they should just be marked as 'conffiles' in the package itself andi these files are automatically choosen for including into sysupgrade.tgz the magic is done in add_uci_conffiles() line 100 in file package/base-files/files/sbin/sysupgrade - /sbin/sysupgrade bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] busybox: update to version 1.24.1
* Magnus Kroken[26.10.2015 07:11]: > Patches applied upstream and dropped: > 280-fix_find_regression.patch > 300-ip-addr-improvements.patch > > Signed-off-by: Magnus Kroken > --- > Run-time tested on ar71xx (TL-WDR4300). Compile-tested on mpc85xx and mvebu. > > Size comparison: > 210569 busybox_1.23.2-3_ar71xx.ipk > 209573 busybox_1.24.1-1_ar71xx.ipk > > 247588 busybox_1.23.2-3_mpc85xx.ipk > 246458 busybox_1.24.1-1_mpc85xx.ipk > > 224013 busybox_1.23.2-3_mvebu.ipk > 222554 busybox_1.24.1-1_mvebu.ipk > > package/utils/busybox/Makefile | 6 +- > .../patches/120-remove_uclibc_rpc_check.patch | 2 +- > .../busybox/patches/200-udhcpc_reduce_msgs.patch | 4 +- > .../patches/201-udhcpc_changed_ifindex.patch | 2 +- > .../patches/203-udhcpc_renew_no_deconfig.patch | 2 +- > .../busybox/patches/204-udhcpc_src_ip_rebind.patch | 10 +-- > .../busybox/patches/210-add_netmsg_util.patch | 2 +- > .../busybox/patches/230-ntpd_delayed_resolve.patch | 6 +- > .../patches/270-libbb_make_unicode_printable.patch | 4 +- > .../busybox/patches/280-fix_find_regression.patch | 31 - > ...-a-regression-in-handling-local-variables.patch | 6 +- ^^^ this one is also fixed upstream and not needed anymore. (see busybox commits around 1285aa62f914ba894b82880e57bd81cfbc41f180) bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Extra file permissions
* David H. Madden[27.10.2015 08:16]: > I have been adding ssh authorized_keys files to my OpenWRT devices, > and would like to have them built into the sysupgrade image, rather > than adding to /overlay afterward. However, the process that copies > files from .../files to the final image resets permissions to > u+rw,g+r,o+r, which wrecks the 700 permission for ~root/.ssh. I > modified include/image.mk to not do the permission "fixing." This IMHO it is better to explicitely set 0700 for the SSH stuff? so the user can just copy the files without tweaking the bits. bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] How to get uhttpd logs
* Pratik Prajapati[29.10.2015 12:41]: > So how to get uhttpd logs ? 1) run the daemon in foreground: look out for the exact option string with 'ps'. here i have to run e.g.: /usr/sbin/uhttpd -f -h /www -r EG-labor-AP -c /etc/httpd.conf -x /cgi-bin -u /ubus -t 60 -T 30 -k 20 -A 1 -E /cgi-bin-404.sh -n 3 -N 100 -p 80 -i .sh=/bin/ash -I cgi-bin-404.sh -C /etc/uhttpd.crt -K /etc/uhttpd now you should see messages. 2) there is even more, when: compile with [x] logging enabled (via menuconfig) bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Memory leak in ash with script using "local" incorrectly
* Rafał Miłecki[29.10.2015 07:29]: > However I guess it would be nice thing to stop memory leak, even if > script code is incorrect. Could someone take a look at this, please? > > My BusyBox/ash version: > BusyBox v1.23.2 (2015-07-12 11:22:27 CEST) built-in shell (ash) i just tested v1.24.1 on OpenWrt[1] and there is *no* leak. i run this script up to i=100.000: i=0;while :; do i=$(( i + 1 )); local foo=$(:); case "$i" in *'00') free; echo $i;;esac; done (it was leaking to oom on OpenWrt with 1.23.2 + dist-patches) bye, bastian [1] https://patchwork.ozlabs.org/patch/536171/ ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] UCI???
* smile...@gmail.com[11.11.2015 20:11]: > How can i get the functions including in the script > i.e. /lib/functions/olsrd.sh > Is there a way without to read the sources? please use for external packages this tracker: https://github.com/openwrt/packages/ (olsr-package is maintained there) bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] polluted env-space after running OpenWrt-helper scripts
* Jo-Philipp Wich[03.11.2015 12:44]: > > but i'am unsure how to unset all these vars: > > Whenever a script calls uci_load(), the previous state vars are > discarded, see the declaration of uci_load in /lib/config/uci.sh > > You can force an unconditional unload with calling uci_load() on an > invalid package name, e.g. "uci_load %" . thanks for the hint. i understand, but it does not solve the problem here. i tuned the service_start() from /lib/functions/service.sh like this: service_start() { { echo echo "service_start: $@" echo "envsize: $( set | wc -c )" network_flush_cache echo "envsize_cleaned1: $( set | wc -c )" uci_load % echo "envsize_cleaned2: $( set | wc -c )" set } >>/tmp/FOO service -S "$@" } and still have ~8k vars after 'envsize_cleaned2:' when starting up /etc/init.d/olsrd (there is no change after running 'uci_load %'. bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] polluted env-space after running OpenWrt-helper scripts
* Felix Fietkau[03.11.2015 13:23]: > I think if you're worried about the overhead of that stuff, you should > help migrate init scripts away from this legacy API. > > Services started via procd are not affected by that kind of env-space > pollution. thank you, i will do it that way. bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH][ar71xx] add support for tp-link wr841n v10 image generation
* Bastian Bittorf <bitt...@bluebottle.com> [11.10.2015 21:31]: > * John Crispin <blo...@openwrt.org> [11.10.2015 20:40]: > > also please prefix your patches with ar71xx: and not [ar71xx] > > can please somebody change the text in > https://dev.openwrt.org/wiki/SubmittingPatches > @ "13. The canonical patch format" > > -> Subject: [PATCH 001/123] [section] summary phrase > > i made this mistake several times by looking at this > link and it seems a lot of other people too. Still not fixed. Seems this can only be changed with an admin-account. So Felix, John? bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] base-files: sysupgrade: respect new profile.d infrastructure
* Bastian Bittorf <bitt...@bluebottle.com> [11.10.2015 21:48]: > i got a patchwork mail[1] with the short message > "patch is superseeded" - but no further comments, > so the question is: > > 1) who closed the patch? > 2) why is it 'superseeded', but not fixed? > > [1] http://patchwork.ozlabs.org/patch/528164/ any new about this? bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] busybox: enable find mtime support by default
* Dirk Brenken[16.10.2015 12:58]: > busybox binary in openwrt neither supports stat nor find mtime. This > patch adds find mtime support by default. please show at least 2 platforms, how much bloat it adds (stripped/unstripped) bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] base-files: sysupgrade: respect new profile.d infrastructure
i got a patchwork mail[1] with the short message "patch is superseeded" - but no further comments, so the question is: 1) who closed the patch? 2) why is it 'superseeded', but not fixed? bye, bastian [1] http://patchwork.ozlabs.org/patch/528164/ ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH][ar71xx] add support for tp-link wr841n v10 image generation
* John Crispin[11.10.2015 20:40]: > also please prefix your patches with ar71xx: and not [ar71xx] can please somebody change the text in https://dev.openwrt.org/wiki/SubmittingPatches @ "13. The canonical patch format" -> Subject: [PATCH 001/123] [section] summary phrase i made this mistake several times by looking at this link and it seems a lot of other people too. bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] SVN to GIT transition / paid patch-checking
* Nemesis[12.10.2015 12:17]: > The Django Framework moved from SVN to github in 2012but they kept their > own bug tracker (which they redesigned with some funding to make it more > usable): https://code.djangoproject.com/ > > I think they're a good example of an open source community which went > through the process of improving the way people can join the community > and contribute, they also raise funds to pay for hard tasks like > redesigning the website, organizing sprints, periodically hire a > "fellow" which reviews (accepts/closes and occasionally fixes) tickets > and so on. > Since they started doing this django has improved massively. I think that is a good point. The active OpenWrt-Team seems to consist of 3-4 people. Has somebody of them considered to work fulltime for the project? This way the always growing Patchwork (~100 open patches) and Ticketsystem (>3000 open Tickets) would benefit. It should be easy possible to get funding from all the companies which work with OpenWrt. Is this in option? bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] SVN to GIT transition / paid patch-checking
* Daniel Golle[13.10.2015 16:53]: > If you want an industry-driven fork, go ahead. But don't force that > model upon an existing community without understanding how major parts > of that said community is operating. What I see since a long time, is that there is simply not enough manpower for reviewing patches and "simple" maintainance work (trac, buildbots) and this more and more leads to an unhappy community and overloaded devs. commercial pressure is'nt good, i agree - but maybe there is a way to have at least 1 fulltime or 2 parttime devs. bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2] base-files: show hint when JFFS2-partition is full and overlayfs mounted read-only
since r45833 and r45848 the overlayfs is automatically mounted read-only (and blocks remounts as r/w) when JFFS2 is full. see ticket #19564 because of this normal file deletion is not possible anymore. if a user logins interactively (e.g. SSH) show a hint for this, that files must be removed in /overlay/upper/... v2: fix subject line Signed-off-by: Bastian Bittorf <bitt...@bluebottle.com> --- package/base-files/files/etc/profile |4 1 file changed, 4 insertions(+) diff --git a/package/base-files/files/etc/profile b/package/base-files/files/etc/profile index 3dd58e1..007baf0 100644 --- a/package/base-files/files/etc/profile +++ b/package/base-files/files/etc/profile @@ -1,6 +1,10 @@ #!/bin/sh [ -f /etc/banner ] && cat /etc/banner [ -e /tmp/.failsafe ] && cat /etc/banner.failsafe +fgrep -sq '/ overlay ro,' /proc/mounts && { + echo 'Your JFFS2-partition seems full and overlayfs is mounted read-only.' + echo 'Please try to remove files from /overlay/upper/... and reboot!' +} export PATH=/usr/bin:/usr/sbin:/bin:/sbin export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6) -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] base-files: sysupgrade: respect new profile.d infrastructure
since switch to profile.d infrastructure with r46965 it is not the right way to make changes in /etc/profile, but have own files under /etc/profile.d/*.sh - keep these during sysupgrade and dont mark the old file as conffile, otherwise it will be used during sysupgrade by the 'opkg list-changed-conffiles' call in add_uci_conffiles() Signed-off-by: Bastian Bittorf <bitt...@bluebottle.com> --- package/base-files/Makefile |1 - package/base-files/files/lib/upgrade/keep.d/base-files-essential |2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 12f9489..58287b9 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -45,7 +45,6 @@ define Package/base-files/conffiles /etc/group /etc/passwd /etc/shadow -/etc/profile /etc/protocols /etc/services /etc/shells diff --git a/package/base-files/files/lib/upgrade/keep.d/base-files-essential b/package/base-files/files/lib/upgrade/keep.d/base-files-essential index 978d4b5..18a53fb 100644 --- a/package/base-files/files/lib/upgrade/keep.d/base-files-essential +++ b/package/base-files/files/lib/upgrade/keep.d/base-files-essential @@ -3,7 +3,7 @@ /etc/inittab /etc/group /etc/passwd -/etc/profile +/etc/profile.d /etc/shadow /etc/shells /etc/sysctl.conf -- 1.7.10.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v4] base-files: add /etc/profile.d support
* karlp[04.09.2015 12:30]: > Maybe "local" could be used to avoid the unset FILE line, but at least on 2nd tought i must object, that if we use a function, our environment is polluted with a function (how to unload it?), so it's easier to just unset a variable. bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v4] base-files: add /etc/profile.d support
* karlp[04.09.2015 12:30]: > > + for FILE in /etc/profile.d/*.sh; do > > + [ -e "$FILE" ] && . "$FILE" > > Why the -e? You only got existing files in the glob above right? If no, when the directory is empty, you get FILE='/etc/profile.d/*.sh' > Maybe "local" could be used to avoid the unset FILE line, but at least you are right. any other comments? bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v4] base-files: add /etc/profile.d support
* edgar.sol...@web.de[04.09.2015 12:30]: > note from a bystander. this looks wrong - path/file names containing spaces > will be delimited by for. probably better use for the sent patch this works: root@box:~ touch "A 1" root@box:~ touch "A 2" root@box:~ for FILE in A*; do ls -l "$FILE"; done -rw-r--r--1 root root 0 Sep 4 12:22 A 1 -rw-r--r--1 root root 0 Sep 4 12:22 A 2 bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v4] base-files: add /etc/profile.d support
* Karl Palsson[04.09.2015 15:02]: > So let's -d test the directory instead of -e testing every file just in > case the directory didn't exist? even if the directory exists but is empty, the globbing fails. but i get your point. what about: [ -n "$( ls -1 $dir )" ] && { for FILE in $dir/*; do . "$FILE" done } but i dont like it! any other comments bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Fwd: [PATCH] uhttpd: serve precompressed files
* Adrian Kotelba[07.09.2015 11:36]: > Well, it could be useful for low-end devices with small storage > capacity and slow networks, see https://dev.openwrt.org/ticket/14333. > The static content, mostly text-based HTML, Java, and css files, could > be stored as gzip or zopfli precompressed files. Thus, one reduces > storage requirements and improves page loading times. ok, as far as i understand the patch, if somebody tries to http_get file 'xy.html' and the webserver finds 'xy.html.gz' it serves this file, right? the storage-argument is not really valid, because the files are usually compressed anyway (squashfs or jffs2). the "slow networks" argument is ofcourse valid. bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Fwd: [PATCH] uhttpd: serve precompressed files
* Adrian Kotelba[07.09.2015 15:18]: > > ok, as far as i understand the patch, if somebody > > tries to http_get file 'xy.html' and the webserver > > finds 'xy.html.gz' it serves this file, right? > > Right. More preciselly, if somebody tries to http_get file 'xy.html' > and the webserver does find it, then it serves it. > If 'xy.html' is not found, then webserver tries 'xy.html.gz'. If > 'xy.html.gz' is found, then it is served. ok, what you can do is this: check if HTTP_ACCEPT_ENCODING has some of gzip, deflate, sdch or whatever you think makes sense and live-compress if enabled via uci and it _is_ a static file. (i think the cgi-case is more complicated) also take care of the headers, you must set something like: 'Content-Encoding: gzip' unsure what to do with 'content length' because you only know this after compression, but you should do it chunkwise... bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Fwd: [PATCH] uhttpd: serve precompressed files
* Adrian Kotelba[07.09.2015 18:57]: > Thanks for hints. So, in other words, you propose to compress the > files on the fly, right? > I am afraid that low-end devices may not have enough cpu power to do that. this is really fast. gzip compresses at ~1megabyte/sec on a typical router. this means 1/10 sec for a typical large 100k html-file. (which has only 1/8 of the original size) - thats ok for your usecase. bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Fwd: [PATCH] uhttpd: serve precompressed files
* Adrian Kotelba[06.09.2015 20:05]: > Serving precompressed content with uhttpd. please write more about the usecase. it looks useless?! bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel