Rpi4 < $(community_build)


/bin/iptv_debug.sh start; sleep 300; /bin/iptv_debug.sh stop; tar -cvzf /www/IPTVLOGS.tar.gz /tmp/iptv_tcpdump

(make sure you simulate the problem within 5mins that the above is running)

when it is finished... download http://ROUTERIP/IPTVLOGS.tar.gz and upload it somewhere (private)

note: the build you have installed 1.0.13-3 was made before all these new fixes / helper scripts... use a new build before trying above...

1 Like

Just done capturing and uploading with 1.0.13-3 build. Should I do it again after upgrade?

on new builds /etc/custom/everyboot/ does what you think 'startup' would do... as an artifact of some old logic 'startup' right now essentially means 'not firstboot'...

OK good to know

so right now the question is... if you do a /etc/init.d/network restart does your script always need to be run after that?

Yes I need the run the script after a /etc/init.d/network restart

To be more precise: In order to bypass my ISP's Internet box I need to apply CS6 priority to dhcp requests on the wan interface.

I do it with this script taken from there :

#!/bin/sh
ifdown wan
# eth1.832 is the wan interface
set -x
for i in 0 1 2 3 4 5 6 7; do
    ip link set eth1.832 type vlan egress $i:$i >/dev/null
done
    ip link set eth1.832 type vlan egress 1:0 >/dev/null
    ip link set eth1.832 type vlan egress 0:6 >/dev/null

ifup wan
exit 0

without executing this script I don't get an IP address from DHCP requests on the wan interface so no internet .

1 Like

great!... leave it with me...

as it's interface (link) specific... we will find a better place for it...

After the upgrade, dns was not working and I manually restarted dnsmasq and https-dns-proxy.
IPTV stream is working so far.

dmesg | grep https
[   23.632870] 15-services> Stopping and disabling https-dns-proxy [notenabled]
[   25.160209] 15-services> > ENABLEDSERVICES: sqm simple-adblock https-dns-proxy nft-qos banip [/root/wrt.ini] [enable+start]
[   25.281578] 15-services> Starting and enabling https-dns-proxy
[   29.551633] 45311-luci-themes> Argon theme v2.2.3-5[default] courtesy of: https://github.com/jerrykuku/luci-theme-argon
1 Like

these steps will be done for you in the next upgrade (just prep to test now)

NOTE UPDATED SCRIPTS 1.3


curl -sSL http://rpi4.wulfy23.info/misc/07-ifstate-script > /etc/hotplug.d/iface/07-ifstate-script
mkdir -p /etc/custom/ifstate/wan/ifup
curl -sSL http://rpi4.wulfy23.info/misc/10-egressmapping.sh > /etc/custom/ifstate/wan/ifup/10-egressmapping.sh
chmod +x /etc/custom/ifstate/wan/ifup/10-egressmapping.sh
grep -q '^/etc/custom/ifstate/$' /etc/sysupgrade.conf || echo '/etc/custom/ifstate/' >> /etc/sysupgrade.conf

summary

turns out it's just a hotplug script but as its calling up down for wan it needs re-run prevention... (and might be better in net) i added hooks to the build... and a sample above to prevent reruns but you should test/improve it as needed...

sorry it was logread not dmesg... also if you reboot it and the issue happens also PM me the output...

lol.. we keep going in circles on this... (3rd-5th time around!)

we really need to eliminate reboot and client cache from your symptoms... we should probably up the debug level of both of those services too as a next step...

1 Like

no issue so far even after reboot.

1 Like

curl -sSL http://rpi4.wulfy23.info/misc/07-ifstate-script > /etc/hotplug.d/iface/07-ifstate-script mkdir -p /etc/custom/ifstate/wan/ifup curl -sSL http://rpi4.wulfy23.info/misc/10-egressmapping.sh > /etc/custom/ifstate/wan/ifup/10-egressmapping.sh chmod +x /etc/custom/ifstate/wan/ifup/10-egressmapping.sh grep -q '^/etc/custom/ifstate/$' /etc/sysupgrade.conf || echo '/etc/custom/ifstate/' >> /etc/sysupgrade.conf

unfortunately this does not work
After having struggled a bit I found in the logs that hotplug events for the wan interface never occurs

logread -e hotplug-iface
Tue Jan 25 23:28:28 2022 user.notice hotplug-iface: USER=root ACTION=ifup SHLVL=1 HOME=/ HOTPLUG_TYPE=iface LOGNAME=root DEVICENAME= TERM=linux PATH=/usr/sbin:/usr/bin:/sbin:/bin INTERFACE=lan PWD=/ DEVICE=br-lan
Tue Jan 25 23:28:29 2022 user.notice hotplug-iface: USER=root ACTION=ifup SHLVL=1 HOME=/ HOTPLUG_TYPE=iface LOGNAME=root DEVICENAME= TERM=linux PATH=/usr/sbin:/usr/bin:/sbin:/bin INTERFACE=loopback PWD=/ DEVICE=lo
Tue Jan 25 23:28:30 2022 user.notice hotplug-iface: USER=root ACTION=ifup SHLVL=1 HOME=/ HOTPLUG_TYPE=iface LOGNAME=root DEVICENAME= TERM=linux PATH=/usr/sbin:/usr/bin:/sbin:/bin INTERFACE=wg0 PWD=/ DEVICE=wg0

ifup hotplug action only occur after I manually run the script.

I decided to use the net directory after finding this in the logs:

Tue Jan 25 23:28:31 2022 user.notice hotplug-net: USER=root ACTION=add SHLVL=1 HOME=/ SEQNUM=1391 IFINDEX=20 HOTPLUG_TYPE=net DEVPATH=/devices/virtual/net/eth1.832 LOGNAME=root DEVICENAME=eth1.832 TERM=linux SUBSYSTEM=net PATH=/usr/sbin:/usr/bin:/sbin:/bin INTERFACE=eth1.832 PWD=/ DEVTYPE=vlan

So for now I have this in /etc/hotplug.d/net/07-myscript

[ "$ACTION" != "add" ] && [ "$INTERFACE" != "eth1.832" ] && exit 0

lNET=wan
lDEV=eth1

#######/proc/net/vlan/${lDEV}.832 && exit 0
###################################WITHOUT THIS SCRIPT WILL LOOP ON REPEAT
grep -q '0:6 1:0 2:2 3:3 4:4 5:5 6:6 7:7' /proc/net/vlan/${lDEV}.832 && logger -t "$(basename $0)" "norepeatallsetup"
grep -q '0:6 1:0 2:2 3:3 4:4 5:5 6:6 7:7' /proc/net/vlan/${lDEV}.832 && exit 0

set -x

ifdown $lNET

for i in 0 1 2 3 4 5 6 7; do
    ip link set ${lDEV}.832 type vlan egress $i:$i >/dev/null
done

ip link set ${lDEV}.832 type vlan egress 1:0 >/dev/null
ip link set ${lDEV}.832 type vlan egress 0:6 >/dev/null

ifup $lNET

exit 0

It's working after a reboot and after a /etc/init.d/network restart

1 Like

great work! thanks for the update... :+1:

1 Like

I have one more question not related to this build.
When I try to open shorter links on my mobile device i.e. youtu.be I get nxdomain error when I am using quad9 dns. No issue on desktop. With other DNS servers work fine.

not too sure about that one... probably double check that device is not using it's own DoH or something like that...

you can also run;


fgrep -r youtu.be /tmp/dnsmasq.d/ /tmp/run/simple-adblock.servers 2>/dev/null

to try to eliminate adblocking

probably a topic for another thread (i.e. something to do with quad9? but if it works for pc's/other devices then something to do with stopping it using its own DoH or similar )

1 Like

I bit the bullet and decided to add a specific hack for this

what I have done is add a late hard restart of dnsmasq + https-dns-proxy if it is in your enabled services (basically the same thing you have been doing manually)

it should help with firstboot but I dont know if the modem restarts will still trigger the issue...

1 Like

Thank you so much! :innocent:

1 Like

yes, after wan IP change, internet stopped working.

1 Like

Is there any method to estimate SD card's remaining life when using this build ?

1 Like

alot of variables (card + use mostly)...

what I probably can do is come up with a mean write cycle estimate per month (given typical build settings) or something like that... and you could use that as a guestimate on projected wear...

but in laymans terms... I can all but guarantee you'll get 2years on a good quality card, and sane operating temperatures given default / sane runtime settings... (probably closer to 3)


monitoring for tell tale signs of issues is do-able (and somewhat incorporated already)... tho' we don't really have many data points on this yet... other than frequent fsck-ing or rootfs mounts read only... especially if there has been no power loss...

1 Like

You shouldn't have a problem for years. Turn down logging to emergency only or only write to ram not the SD, that'll reduce writes. If you're worried or want the most reliability just use a "high endurance" microSD card. One like the Samsung PRO Endurance 32GB is only $9.

1 Like

I'm using these
image

1 Like

i've made some 'improvements' to fsck reporting... (but initial... likely minor bugs still to iron out)

on future builds you will be notified both in luci and on command line login if fsck repair took place (before it was mostly transparent to the end user...)

it's easy to test on a newer build ( 5.0.19-137+ ) ... pull the power cord out whilst running... put it back in... then wait 2 mins and login...

dca632 /usbstick 57°# dmesg | grep -E '(unclean|uptime)'
[   17.582765] rc.custom> uptime.last: powerloss
[  219.954176] everyboot_751-bootnotices> fsckparts bootfs [unclean rebootneeded]
[  219.960735] everyboot_751-bootnotices> fsckparts rootfs [unclean rebootneeded]
dca632 /usbstick 58°# fgrep -r uptime /boot/plog/plogread-2022* | cut -d']' -f2-

 rc.custom> uptime.last: shutdown Thu Jan 27 18:44:46 AEDT 2022 up 11 min, load average: 0.08, 0.11, 0.12
 rc.custom> uptime.last: shutdown Thu Jan 27 18:52:21 AEDT 2022 up 6 min, load average: 0.00, 0.17, 0.12
 rc.custom> uptime.last: halt Thu Jan 27 19:06:09 AEDT 2022 up 8 min, load average: 0.00, 0.11, 0.10
 rc.custom> uptime.last: reboot Thu Jan 27 19:23:46 AEDT 2022 up 13 min, load average: 0.00, 0.05, 0.08
 rc.custom> uptime.last: upgrade Thu Jan 27 20:29:09 AEDT 2022 up 1:04, load average: 0.00, 0.01, 0.00
 rc.custom> uptime.last: reboot Thu Jan 27 20:36:40 AEDT 2022 up 4 min, load average: 0.36, 0.63, 0.32
 rc.custom> uptime.last: upgrade Thu Jan 27 20:46:08 AEDT 2022 up 8 min, load average: 0.07, 0.24, 0.19
 rc.custom> uptime.last: upgrade Thu Jan 27 21:56:11 AEDT 2022 up 24 min, load average: 0.02, 0.01, 0.06
 rc.custom> uptime.last: shutdown Fri Jan 28 00:04:03 AEDT 2022 up 2:05, load average: 0.14, 0.03, 0.01

note: changed 'rebootneeded > rebooted' (you don't need to reboot...)

1 Like