Your dead right. I don’t know how I missed all that in such a short post.I think the "gotcha" here is that AMTM also requires to be installed via a one-liner, much like Diversion - i.e. same problem
Your dead right. I don’t know how I missed all that in such a short post.I think the "gotcha" here is that AMTM also requires to be installed via a one-liner, much like Diversion - i.e. same problem
I’m sorry: my earlier reply was not at all helpful. I don’t know how I missed all the important stuff in your post. There’s a certain minimum level of knowledge necessary, and the fact that your talking about Notepad++ shows you’re well on the way, if not there already. You don’t need to be a coder; I’m not, Follow Jack’s post and come back if you have questions. The mnimum level of knowledge required is not that great. I managed it!is there anyone have a tutorial video how to install diversion on asus router? I can't search it anywhere. When i search on google It only show hitman game. I don't know how to install cause i don't know anything about coding. I try to download notepad ++ and paste the install link but nothing happen, it just saves the link as a text file. Please help me. Thanks you.
/jffs/scripts/post-mount.div is essential to a seamless integration and proper working of Entware and Diversion. This is how I do it and it works 100% reliable if no old Entware stuff is in that file (or any other files other than the Diversion modified ones). Looks like your swap file is disabled for some reason, remove the leading # and it'll be enabled whenever the device is mounted.
The old Entware post-mount entries do not work with Diversion.
Diversion will remove and add its own entries whenever you update or reinstall anyway.
check_old_jffs(){
...
if [ -f "/jffs/scripts/post-mount" ] && grep -q '\$1/entware.* /tmp/opt\|generated by AB-Solution' /jffs/scripts/post-mount; then
[ -f "$entDev/old-jffs_scripts/post-mount" ] && rm -f /jffs/scripts/post-mount || mv /jffs/scripts/post-mount "$entDev/old-jffs_scripts/post-mount"
echo "#!/bin/sh" >/jffs/scripts/post-mount
...
}
That line ln -nsf $1/entware /tmp/opt is the exact same as:Really, I have "ln -nsf $1/entware /tmp/opt" in my post_mount, for my own purposes ...
ln -nsf "$(echo "$OF" | sed 's~/bin/opkg~~g')" /tmp/opt
I believe you have two Entware installations on your USB storage device(s).But I have my own post-mount script.
And today I found a root cause of erasing it in the your install.div
Code:check_old_jffs(){ ... if [ -f "/jffs/scripts/post-mount" ] && grep -q '\$1/entware.* /tmp/opt\|generated by AB-Solution' /jffs/scripts/post-mount; then [ -f "$entDev/old-jffs_scripts/post-mount" ] && rm -f /jffs/scripts/post-mount || mv /jffs/scripts/post-mount "$entDev/old-jffs_scripts/post-mount" echo "#!/bin/sh" >/jffs/scripts/post-mount ... }
Really, I have "ln -nsf $1/entware /tmp/opt" in my post_mount, for my own purposes ...
Now I made some changes, and your install.div script don't erase my post-mount.
But, again, it will be really gallantly from you, to give a possibility to prevent existing scripts modification, if some keywords is exists inside.
Excuse me, but no.I believe you have two Entware installations on your USB storage device(s).
Do a check and make sure the relevant /entware/ folder stays, while deleting the other one. Diversion did check that during the install but if you later add another device or partition with entware already installed on it, the second device/partition that is loaded while mounting the device is active.
if [ -f "/jffs/scripts/post-mount" ] && grep -q '\$1/entware.* /tmp/opt\|generated by AB-Solution' /jffs/scripts/post-mount; then
[ -f "$entDev/old-jffs_scripts/post-mount" ] && rm -f /jffs/scripts/post-mount || mv /jffs/scripts/post-mount "$entDev/old-jffs_scripts/post-mount"
echo "#!/bin/sh" >/jffs/scripts/post-mount
if grep -q "swapon " "$entDev/old-jffs_scripts/post-mount"; then
grep "swapon " "$entDev/old-jffs_scripts/post-mount" >>/jffs/scripts/post-mount
sed -i "s/AB-Solution/$NAME/" /jffs/scripts/post-mount
fi
chmod 0755 /jffs/scripts/post-mount
fi
Diversion 4.0.7 is now available
What's new in Diversion v4.0.7
- Reworked ash history sort function
- Added option to invert filter in f as filter term
- Added bin.entware.net, pkg.entware.net and pkg.entware-backports.tk (for MIPS alternate repository) to default whitelist
- Option for MIPS based routers to use Entware backport repo maintained by @maurer. Set it in ep, 6. Manage Entware packages
- Reworked shared whitelist update procedure when Skynet is installed
- Added wording to import pixelserv-tls certificate after new install.
- Changed reboot procedure when required during install, inconsistencies and bugs fixed
- Fix with better logic that will allow to continue Diversion install in case of:
- Port 443 is in use by other process than AiCloud- Added check for incompatible /jffs/configs/dnsmasq.conf.add entries
- Allow to install Diversion Standard even if port 80 is listening on 0.0.0.0
- Use of /jffs/scripts/unmount to unmount Swap file, Diversion and Entware services when ejecting the USB device through the WebUI
- Added domain count for white, black and wildcard blacklist in UI
- In b, Find domain in hosts file(s) now escapes domain names for search results accuracy
- Adjusted list of available pixelserv-tls switches (-o is deprecated)
- Reworked Edit Lists el code. White, black and wildcard-blacklisting should be 100% accurate now for primary and secondary blocking list (if sf and Alternate blocking list is enabled)
- Fixes bug where multiple IPv6 duplicates are added to the blacklist. If you see IPv6 duplicates in the blacklist, run el, edit the blacklist and select 4. Sort and verify blacklist
How to update to Diversion v4.0.7
To update to this latest version use d and select Update.
Beta testers copy and paste the complete install command from the Diversion website.
Then I don't see a reason to manually add to post-conf what my post-conf.div already does.Excuse me, but no.
It is only one entware installation.
Please look in your code - if it found an "$1/entware /tmp/opt" in post-mount, it fully erase existing content by 'echo "#!/bin/sh" >/jffs/scripts/post-mount'.
After that it checks, if the swapon was exists, and add it to the empty, on that moment, post-mount by that code in your install.div script:
Code:if [ -f "/jffs/scripts/post-mount" ] && grep -q '\$1/entware.* /tmp/opt\|generated by AB-Solution' /jffs/scripts/post-mount; then [ -f "$entDev/old-jffs_scripts/post-mount" ] && rm -f /jffs/scripts/post-mount || mv /jffs/scripts/post-mount "$entDev/old-jffs_scripts/post-mount" echo "#!/bin/sh" >/jffs/scripts/post-mount if grep -q "swapon " "$entDev/old-jffs_scripts/post-mount"; then grep "swapon " "$entDev/old-jffs_scripts/post-mount" >>/jffs/scripts/post-mount sed -i "s/AB-Solution/$NAME/" /jffs/scripts/post-mount fi chmod 0755 /jffs/scripts/post-mount fi
In any case - many thanks for you excellent work to create the Diversion itself.
Thanks, I appreciate your feedback. Especially so since most posts around here are about errors and problems.Diversion works so flawlessly that I updated and totally forgot about it. Wanted to let you know that it's been working great so far!
It's a pity and looks really similar to Microsoft approach. But, it's your script, and your rules ...Then I don't see a reason to manually add to post-conf what my post-conf.div already does.
The reason I remove such entries with my check is the assumption that Entware has been installed through a third party script. And I no longer support that inflexible way.
Except the part where Microsoft is a multi-billion dollar company with thousands of employees and thelonelycoder is one guy in his spare time. But yeah, other than that, exactly the same.It's a pity and looks really similar to Microsoft approach. But, it's your script, and your rules ...
I see what you ask me to do. But I have been doing the AB-Solution and Diversion thing for a while now. To avoid endless support questions I have built in checks such as the one you lament. It is indeed my script and my rules apply. I like what I do but I also have other interests and a more than full time job beside this.It's a pity and looks really similar to Microsoft approach. But, it's your script, and your rules ...
My words...Except the part where Microsoft is a multi-billion dollar company with thousands of employees and thelonelycoder is one guy in his spare time. But yeah, other than that, exactly the same.
Thanks, I appreciate your feedback. Especially so since most posts around here are about errors and problems.
Which is understandable as this is the support thread. Reading praising words is always good...
Thanks, I appreciate your feedback. Especially so since most posts around here are about errors and problems.
Which is understandable as this is the support thread. Reading praising words is always good...
Firstly, make sure you have enabled SSH access for your LAN on Administration, System of the Router's WebUI
View attachment 16076
If using Windows, you can download something like PuTTY from here: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
Once installed, launch PuTTY from the Start Menu (or wherever you installed it to)
Enter your router's IP address into the hostname box, and hit Open
View attachment 16073
Click Yes if prompted about saving the host key
View attachment 16074
Enter the same username and password as you use to log in to the WebUI (e.g. admin / password)
You will then be logged in to your router:
View attachment 16075
Copy/paste the installation command, press Enter, and enjoy!
hi, I want to ask. What is the best port usb port for diversion? i have usb 8GB usb 2.0 and 32GB usb 3.0. My router is putting on a bookshelf in the living room. So what if anyone who not know that i'm install diversion on the USB thumb drive and pull out the usb, will it make the router not working anymore?
If i uninstall diversion and pull the usb thumb drive out is it affect the router?
Thank you. This is all of my question before i install diversion.
hi, I want to ask. What is the best port usb port for diversion? i have usb 8GB usb 2.0 and 32GB usb 3.0. My router is putting on a bookshelf in the living room. So what if anyone who not know that i'm install diversion on the USB thumb drive and pull out the usb, will it make the router not working anymore?
If i uninstall diversion and pull the usb thumb drive out is it affect the router?
Thank you. This is all of my question before i install diversion.
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!