What's new

AB-Solution 1.07 is out!

  • 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!

I will also note, I have ran into this 3 or 4 times so far, where an update to the script fails while it is looking for temp1, this always ends in a 0 kb hosts-adblock file. Every time this has happened, I always end up having to uninstall everything, reset, and start over. It seems to be working okay at the moment, though I don't think I have made it a full week yet to allow it to auto update (will happen tonight). I have just been adding entries to the white list and processing those without issue. This, IIRC, cropped up when I was either changing the host files lists from something like malware to shooters, or if I was issuing a command to manually process the lists again.

But I do agree, there are scenarios where looking for temp1 errors out the process and it all comes crumbling down.
Could it be that the name changes for your USB-device?
In update-hosts.sh on line 5 the path is set to the /adblocking directory with dir=/tmp/mnt/<your device name>/adblocking
For most this is sda1, unless you format the device with a name. I highly recomment to assign it a name.

Other than that, I have no idea what causes this. I double checked the ab-solution.sh for errors, but the relevant parts that write the update file are correct.
 
@thelonelycoder
Its not work to block ad on ac88u =/ theres still alot of ad like infolinks and google ad...

my old router ac66u was working with old ad block tool from http://www.snbforums.com/threads/adblocking-with-combined-hosts-file.15309/
Do you have a active VPN connection and/or LAN/DHCP Server/ DNS Server 1 and DNS Server 2 entries? These would have to go, otherwise it will not work.
Have a look at the logfile with (f) and then select 1 or 3 and observe what is going on.

Edit: Do you have IPv6 enabled?
 
Could it be that the name changes for your USB-device?
In update-hosts.sh on line 5 the path is set to the /adblocking directory with dir=/tmp/mnt/<your device name>/adblocking
For most this is sda1, unless you format the device with a name. I highly recommend to assign it a name.

Other than that, I have no idea what causes this. I double checked the ab-solution.sh for errors, but the relevant parts that write the update file are correct.
My USB drive does show as sda1 and is named "removable". This has been the case from the beginning.

HOWEVER, I will add, though I am not sure it matters, but it may. I keep the ab-solution.sh script on the root of the USB drive.

For install I called: sh /tmp/mnt/removable/ab-solution.sh

For subsequent updates, I called: sh ab-solution.sh (from within /tmp/mnt/removable)

I am thinking MAYBE a direct call and not a fully qualified path call to the script caused an issue of the path not being passed? I have since started calling the script with a full path. BUT, I am also now very leery of making any sudden changes (so maybe one hand is washing the other here).

Just wanted to let you know I have run into the above "looking for temp1" error myself a few times, and it always ended with a 0kb file, requiring full clean re-install.
 
My USB drive does show as sda1 and is named "removable". This has been the case from the beginning.
There's probably your problem. What does it say in /adblocking/scripts/update-hosts.sh on line 7?
HOWEVER, I will add, though I am not sure it matters, but it may. I keep the ab-solution.sh script on the root of the USB drive.
That does not matter.
For install I called: sh /tmp/mnt/removable/ab-solution.sh
This should also be your path on line 7 in the above mentioned script.
 
I will check when I get home.

This is the guide I used to create the USB drive:

http://www.algissalys.com/how-to/format-and-partition-usb-asuswrt-routers

(I may be lying to you when I say it is identifying as sda1 after I have named it removable)
Enter this in a terminal:
Code:
/bin/mount | grep -E "ext2|ext3|ext4"
It'll say something like /dev/sda1 on /tmp/mnt/<device name> type ext2 (rw,nodev,noatime)
device name
is the relevant part.

As for the partitioning I have Linux boxes running beside me so that is never a problem for me. Never done it on the router directly. There are formatting ext tools for Windows boxes, google helps.
 
Sure, but please don't think I am too thick to be able to google a tool to format ext in windows :) I just enjoyed doing it off the router :)

I do want to add though, I don't think the USB drive is the issue in my (and the other user(s) case), as it is working fine today. it only has issues when "some" changes/modifications are made to the already working setup that the script hiccups on. But nevertheless, I will provide you the details this evening.
 
Last edited:
For those of you that need IPv4 and IPv6 support: I have AB-Solution 1.08-beta1 with the IPv6 addition released (no mention on GitHub).

Replace the existing ab-solution.sh with the beta version and do this:
1. Start AB-Solution, check if it says "AB-Solution 1.08-beta1" in the header, and run (h) to change the hosts file type and select the same one as you have. This will update the update script and add IPv6 support.
2. Toggle Ad-blocking (a) off and back on again. This will update the dnsmasq settings.

Browser download:
www.ab-solution.info/releases/beta/ab-solution.sh

Router download:
Code:
curl -O www.ab-solution.info/releases/beta/ab-solution.sh
or
Code:
wget  www.ab-solution.info/releases/beta/ab-solution.sh
 
Last edited:
@cybrnook I've had one of my routers run the update cron job running every 5 minutes for more than an hour and never had a zero file size hosts-adblock. It would help others if you could find out why it happens.
 
so, if i understand you have with latest beta 1.08 support for ipv4 and ipv6 or just ipv6?btw: what do i need to change to update adblock host every day at 2.00?

sent from Kodi 17 Krypton
 
@cybrnook I've had one of my routers run the update cron job running every 5 minutes for more than an hour and never had a zero file size hosts-adblock. It would help others if you could find out why it happens.
Sure, I will keep an eye out for it again. If it crops up I will pull my full session log to share with you.

Tonight will be the first auto update, so fingers crossed that goes fine.

However, this 0kb file/no temp1 folder only ever happened to me when I was manually thumbing through different options in the script while making changes myself. It doesn't just randomly happen....
 
so, if i understand you have with latest beta 1.08 support for ipv4 and ipv6 or just ipv6?btw: what do i need to change to update adblock host every day at 2.00?

sent from Kodi 17 Krypton
Both, IPv4 and v6 are built into 1.08beta1.

And a daily update is bad for two reasons:
1. You likely get blocked by some of the hosts file hosters
2. They update the hosts files irregularily, once a week or even only once a month.
 
Last edited:
Sure, I will keep an eye out for it again. If it crops up I will pull my full session log to share with you.

Tonight will be the first auto update, so fingers crossed that goes fine.

However, this 0kb file/no temp1 folder only ever happened to me when I was manually thumbing through different options in the script while making changes myself. It doesn't just randomly happen....
Make sure you have unix line ends and not windows when you make changes.
 
Make sure you have unix line ends and not windows when you make changes.
I ONLY make my changes directly, via putty or xshell. I am not copying anything from windows to the box etc.....

EDIT: I think I see why you wrote this. I did not mean I am physically modifying (vi) your script itself (as in making physical changes to your code, but if I was, and doing it in windows, which I wouldn't. I am familiar with dos2unix as well).

What I meant is that I am making changes in ab-solution (your script). As in, I am in your gui (sh ab-solution.sh) and am making changes, like changing the host file lists, enable, disable, etc....... this is what I meant.

I am just using your script to make changes, as designed, and then it runs into an issue and crashes :)


And don't worry, I will be sure to log it next time. When I have some time I will try to force reproduce it. ;) If/When I do, I will be PM'ing you the session log so we can parse it together.
 
Last edited:
As promised, looks okay to me.
 

Attachments

  • Screenshot_20160504-211614.png
    Screenshot_20160504-211614.png
    314.8 KB · Views: 615
  • Screenshot_20160504-211841.png
    Screenshot_20160504-211841.png
    217.1 KB · Views: 593
Last edited:
Do you have a active VPN connection and/or LAN/DHCP Server/ DNS Server 1 and DNS Server 2 entries? These would have to go, otherwise it will not work.
Have a look at the logfile with (f) and then select 1 or 3 and observe what is going on.

Edit: Do you have IPv6 enabled?

@thelonelycoder,

I dont use VPN and LAN>DHCP Server:

DNS Server 1 => BLANK
DNS Server 2 => BLANK
Advertise router's IP in addition to user-specified DNS => Yes
Forward local domain queries to upstream DNS => No
Enable DNSSEC support => No

no IPv6.
 
As well, updated to 1.08 beta 1 without issues. Great work sir, it is much appreciated the work you put into this and your willingness to work with us.
 

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!
Top