What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

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.
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!
 
/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.

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.
 
Really, I have "ln -nsf $1/entware /tmp/opt" in my post_mount, for my own purposes ...
That line ln -nsf $1/entware /tmp/opt is the exact same as:
Code:
ln -nsf "$(echo "$OF" | sed 's~/bin/opkg~~g')" /tmp/opt
But mine only loads it if the folder entware with a valid Entware installation is indeed present at the currently mounted partition.
But you do your thing, while I do mine.
 
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.
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.
 
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.
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.
 
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!

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
- Allow to install Diversion Standard even if port 80 is listening on 0.0.0.0​
- Added check for incompatible /jffs/configs/dnsmasq.conf.add entries
- 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.

Puk7Fqd.png
 
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.
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.
 
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!
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...
 
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.
It's a pity and looks really similar to Microsoft approach. But, it's your script, and your rules ...
 
How are we going to get to 2000 posts in this thread if we don't talk about errors and problems? :)

Seriously, I think we have arrived at a great stage of development, with entware, amtm, diversion, pixelserv, skynet, the FreshJR script, stubby, and syslog-ng. This fully integrated universe takes Merlin's to a new level.
 
Last edited:
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.
This is a one man show, I have not billions of billions of swiss francs in my bank account. And I certainly don't have tens of thousands of employees.

I also code in a lot of users suggestions into my scripts. But yours would be a step back.
I'm sure you'll find a workaround for your particular situation, though I still don't understand why you would need to do that.
 
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. :rolleyes:
My words...
 
Myself being in a system admin type role, I can totally relate. People usually don't start looking for me unless something is wrong. :)

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...

In that case [emoji518][emoji518][emoji518][emoji518][emoji518] there's five buckets full of praising words for you [emoji16][emoji16][emoji16]
 
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.

Either port should be fine to use. Personally I’d use the 8GB USB2.0 for Diversion and scripts. I would keep the 32GB USB3.0 available for SMB or NFS file sharing. Only unplug the USB when the router is switched off. It won’t break the router if you unplug the USB while it’s on but scripts would stop working and it could create problems with the disk.
 
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.

By the way if you’re new to this I highly recommend using the easy menu tool AMTM to format the USB drive and install Diversion. It’s automatic and fool-proof.

https://github.com/RMerl/asuswrt-merlin/wiki/Disk-formatting#automatic-disk-formatting-script

https://diversion.ch/amtm.html
 
Mr. Lonely Coder,

First of all I want to thank you for creating Diversion.

My question is, will Diversion show me if I add to the custom block list a list that is unacceptable?

I added a list that I thought would work but when Diversion went to update the lists it looked like it put a 0 or O in front of the particular list I added and skiped over it.

Can you tell me if Diversion gives out warnings for unacceptable lists and if Diversion takes a unacceptable list does it mess with the way Diversion works?

Thank You,

David
 

Latest threads

Sign Up For SNBForums Daily Digest

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