What's new

RTRMON RTRMON v2.4.0 -Apr 12, 2026- Monitor your Router's Health (New: Wireguard, AMTM, Network Conn/Bandwidth/Diag + Port Scanner + Speedtest)

It seems the environment variables for this new version of screen that came with the latest round of Entware updates is not optimal, and prevents scripts that call screen from being able to start. Do you think this should be addressed with the Screen authors, or is it best to just clutter up the POST-MOUNT with additional code to provide this workaround? Or is there perhaps a better way?
How would I recreate the problem? I installed RTRMON with screen v5.0.1 but don't see how to create the failure state.
 
How would I recreate the problem? I installed RTRMON with screen v5.0.1 but don't see how to create the failure state.
You could add this to your post-mount:

(sleep 30 && /jffs/scripts/rtrmon.sh -screen) &

And reboot.

Expected behavior is that it won't start up in a screen session unless you add those new variables to the top of the post-mount.
 
You could add this to your post-mount:

(sleep 30 && /jffs/scripts/rtrmon.sh -screen) &

And reboot.

Expected behavior is that it won't start up in a screen session unless you add those new variables to the top of the post-mount.
That's strange. I've been trying to see if there's a cleaner way by invoking screen in an /opt/etc/init.d/S99rtrmon-screen kind of script, to avoid a kludgey "sleep 30", but the variables still seem to require explicit definition.
Bash:
#!/bin/sh

PROCS=screen
ARGS="-dmS rtrmon /jffs/scripts/rtrmon.sh -monitor"
PREARGS=
PRECMD="export SCREENDIR=/root/.screen HOME=/root"
POSTCMD=
DESC=$PROCS
ENABLED=yes

. /opt/etc/init.d/rc.func
I don't know how this worked or didn't work on the previous versions of Entware and screen. I don't see many obvious changes to the variable handling in GNU screen to explain it specific to this tool.
 
That's strange. I've been trying to see if there's a cleaner way by invoking screen in an /opt/etc/init.d/S99rtrmon-screen kind of script, to avoid a kludgey "sleep 30", but the variables still seem to require explicit definition.
Bash:
#!/bin/sh

PROCS=screen
ARGS="-dmS rtrmon /jffs/scripts/rtrmon.sh -monitor"
PREARGS=
PRECMD="export SCREENDIR=/root/.screen HOME=/root"
POSTCMD=
DESC=$PROCS
ENABLED=yes

. /opt/etc/init.d/rc.func
I don't know how this worked or didn't work on the previous versions of Entware and screen. I don't see many obvious changes to the variable handling in GNU screen to explain it specific to this tool.
On the previous version of screen, that single command in the post-mount would successfully launch the script inside a screen session in the background.
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top