stablestud / adsorber

Ad-blocker for Linux systems purely built on POSIX-compliant shell scripts.
MIT License
76 stars 10 forks source link

hosts.original is not being honored #18

Closed eksperimental closed 3 years ago

eksperimental commented 3 years ago
# To make any changes to this file please edit /etc/hosts.original
# and run 'adsorber update' to apply your changes.
# Or else your changes will be overwritten by Adsorber once a week.

I edit hosts.original and run "sudo absorber udpate" and I am not seeing the changes reflected in /etc/hosts

stablestud commented 3 years ago

Hi @eksperimental,

thanks for reporting that issue. Due to your issue #14, I changed the behaviour of adsorber to modify /etc/hosts inline, instead of replacing it everytime completely, to cooperate with other tools which also might write into that file.

The text you quoted, comes from an older version which has the old behaviour prior #14 Therefore your should modify /etc/hosts directly and not /etc/hosts.original. The /etc/hosts.original is only used as backup, if you feel you need to manually restore it.

Did you update to v1.0.0 according the release notes?

Note for updaters:
Due to changes how we handle the hosts file you'll need to remove/disable Adsorber prior upgrading to this version.
This can be done with either running `adsorber disable` or `./remove_files_from_system.sh`
All your config files will be overwritten by `./place_files_onto_system.sh`.
If you want to keep them, take a copy and restore them afterwards.

@eksperimental I recommend you run adsorber disable and restore /etc/hosts.original back as your /etc/hosts. Then you can install Adsorber again with adsorber install

Best regards Vladislav

eksperimental commented 3 years ago

Thank you for your answer. I got a bit lost after those changes and the time that has passed. I see that what you explain here is in the update instructions for the last release.

@eksperimental I recommend you run adsorber disable and restore /etc/hosts.original back as your /etc/hosts. Then you can install Adsorber again with adsorber install

I think it is you meant adsorber setup

So, can I safely remove hosts.previous and hosts.original after the update?

stablestud commented 3 years ago

Yes you're right, I meant adsorber setup You can safely remove hosts.previous without problems, I would remove hosts.original only after it has been restored as /etc/hosts, making them both identical.

eksperimental commented 3 years ago

Yes you're right, I meant adsorber setup You can safely remove hosts.previous without problems, I would remove hosts.original only after it has been restored as /etc/hosts, making them both identical.

Thank you very much Vladislav. Awesome piece of software