ComputerSteve
Senior Member
Can anyone else confirm that on the latest Merlin the shortcut is not working. Thanks.merlin firmware 386.7
Can anyone else confirm that on the latest Merlin the shortcut is not working. Thanks.merlin firmware 386.7
user@router: echo $PATH
/usr/sbin:/usr/bin:/sbin:/bin
user@router: which sh
/usr/sbin/sh
user@router: echo $PATH
/opt/bin:/opt/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/home/tlc:/mmc/sbin:/mmc/bin:/mmc/usr/sbin:/mmc/usr/bin:/opt/sbin:/opt/bin:/opt/usr/sbin:/opt/usr/bin
user@router: which sh
/opt/bin/sh
OR in some cases
user@router: which sh
/bin/sh
which $SHELL
returns correctly /bin/sh
for both pre 386.7 and the current latest release.diversion sh-<rest of command>
/opt/bin/diversion sh-<rest of command>
Surprised this behavior can't be changed with /jffs/configs/profile.add or over ridden by some other custom script method.The bad news: It looks like that the beloved and underrated Diversion Shortcuts app is dead with the release of Asuswrt-Merlin 386.7 firmware
My bad: This is something I did not check during the beta test of 386.7 despite the obvious pointers and strong hints, see here and in previous messages by me and other members: https://www.snbforums.com/threads/a...ta-is-now-available.79282/page-17#post-769599
For some reason, logging in with SSH to your router through a standard SSH client e.g. Xshell, any Linux terminal, MobaXterm appears to work.
Using a more exotic client like SmarTTY that @jsbeddow was using or in this very case, the iOS Shortcuts app changes how the $PATH environment is set for the console.
This is something for @RMerlin to re-consider.
The iOS app returns the following when running these commands:
The expected output is the following in previous Asuswrt-Merlin releases, with Entware installed:Code:user@router: echo $PATH /usr/sbin:/usr/bin:/sbin:/bin user@router: which sh /usr/sbin/sh
Code:user@router: echo $PATH /opt/bin:/opt/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/home/tlc:/mmc/sbin:/mmc/bin:/mmc/usr/sbin:/mmc/usr/bin:/opt/sbin:/opt/bin:/opt/usr/sbin:/opt/usr/bin user@router: which sh /opt/bin/sh OR in some cases user@router: which sh /bin/sh
Interestingly, the output ofwhich $SHELL
returns correctly/bin/sh
for both pre 386.7 and the current latest release.
The good news: Changing the iOS Shortcuts app command to the full path of the Diversion file will fix this calamity in technological marvels.
Changing all occurrences in your Diversion iOS Shortcuts app from
toCode:diversion sh-<rest of command>
does the trick for now.Code:/opt/bin/diversion sh-<rest of command>
I will release an update for the Shortcuts app ASAP.
Thanks for your attention and be patient.
Re-consider what? I didn't change anything...This is something for @RMerlin to re-consider.
I think I might have found why this has changed. In the latest Dropbear changelog:Re-consider what? I didn't change anything...
Why are these clients overriding the current default path with an arbitrary (broken) one?
+- Add /usr/sbin and /sbin to $PATH when logging in as root.
+ Patch from Raphaël Hertzog
+ https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=903403
So the shortcut seems to be not working correctly.. I tried the disable diversion service and it didn't actually disable it meaning if I go to the Lan / Diversion tab it says its still on & then I can't actually disable it -- The shortcut also produces some weird output -- I've saved a video to my dropbox heres the link - https://www.dropbox.com/s/vbmxxqi2s9z2lhd/Screen Recording 2022-06-26 at 11.32.08 AM.mov?dl=0iOS Shortcut v1.4 is now available
What's new in v1.4
- Compatibility fix for Asuswrt-Merlin 386.7
- Adds amtm script update check!
amtm can return a list of available script updates through an SSH command and its SSH UI. To make use of the former, I added this command to the Diversion Shortcuts app, rather than create a new amtm Shortcuts app.
So now you can comfortably check for script updates from the comfort of your bed, if you like that sort of thing
How to install on your iOS device
See this page on diversion.ch or read instructions in post #1. Once the new Shortcut is configured and working, you may safely delete older version(s) from your Library.
Sorry, the Diversion Shortcuts app v1.4 requires an as of yet unreleased Diversion update. I will get to it as soon as I can.So the shortcut seems to be not working correctly.. I tried the disable diversion service and it didn't actually disable it meaning if I go to the Lan / Diversion tab it says its still on & then I can't actually disable it -- The shortcut also produces some weird output -- I've saved a video to my dropbox heres the link - https://www.dropbox.com/s/vbmxxqi2s9z2lhd/Screen Recording 2022-06-26 at 11.32.08 AM.mov?dl=0
I don‘t have an Ubuntu system running. Would you be able to compile a version for my RT-AC86U so I can test it?I think I might have found why this has changed. In the latest Dropbear changelog:
Code:+- Add /usr/sbin and /sbin to $PATH when logging in as root. + Patch from Raphaël Hertzog + https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=903403
I haven't reviewed the change, but I suspect it might possibly be adding it at the start of the PATH instead of the end with some clients (why only these clients however I don't know).
If you are able to reproduce the issue, try compiling a test build with that change reverted.
Add /usr/sbin and /sbin to default root PATH · mkj/dropbear@0e04247
When dropbear is used in a very restricted environment (such as in a initrd), the default user shell is often also very restricted and doesn't take care of setting the PATH so the user ends up ...github.com
Or, try just changing the DEFAULT_ROOT_PATH in default_options.h then recompile it.
EDIT: Untested, but in theory should be fixed with https://github.com/RMerl/asuswrt-merlin.ng/commit/eddf5e9f42a3c806d52346f1952fe4d71d1c7b6d .
Here you go:I don‘t have an Ubuntu system running. Would you be able to compile a version for my RT-AC86U so I can test it?
I can confirm that fixes the $PATH issue with these exotic SSH clients, including that with SmarTTY with the option enabled to use "Smart Terminal".
Welcome to Smart Terminal.
user@router:~$ echo $PATH
/bin:/sbin:/usr/bin:/usr/sbin:/opt/bin:/opt/sbin:/opt/usr/bin:/opt/usr/sbin
Will you be pushing an updated release tag for this patch? Or does it only impact certain routers?
I think I might have found why this has changed. In the latest Dropbear changelog:
Code:+- Add /usr/sbin and /sbin to $PATH when logging in as root. + Patch from Raphaël Hertzog + https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=903403
I don't have anything planned yet at this time. If this is the only issue, then it will most likely have to wait for the next major release.Will you be pushing an updated release tag for this patch? Or does it only impact certain routers?
And so shall I.I don't have anything planned yet at this time. If this is the only issue, then it will most likely have to wait for the next major release.
So what is happening with this? Is it going to be fixed in the next release of merlin firmware ?I can confirm that fixes the $PATH issue with these exotic SSH clients, including that with SmarTTY with the option enabled to use "Smart Terminal".
It also fixes the Diversion Shortcuts app v1.3 that users complained about.
Here's the output of SmarTTY:
Code:Welcome to Smart Terminal. user@router:~$ echo $PATH /bin:/sbin:/usr/bin:/usr/sbin:/opt/bin:/opt/sbin:/opt/usr/bin:/opt/usr/sbin
Yes, it will be fixed with the next firmware release. In the meantime I try to get updates out for Diversion, amtm and the Diversion iOS Shortcut.So what is happening with this? Is it going to be fixed in the next release of merlin firmware ?
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!