- Attempt to persist manual changes that are made to
/etc/hosts
when restoring. - Various bash improvements.
- Use a 1-based
substr
index to support older versions of mawk. - Do not reset terminal colors when redirecting output.
- Avoid returning non-zero exit code when cleaning temporary files.
- Added compatibility with BSD awk.
- When updating, report on modified entries, not new entries.
- macOS compatibility
- Changed default remote hosts file to be more permissive.
- Moved all hostsctl files to the
/etc/hostsctl
directory. To upgrade, existing users should perform the following steps as root prior to executing hostsctl:
# mkdir /etc/hostsctl
# mv /etc/hostsctl.conf /etc/hostsctl/
# mv /etc/hostsctl.d/10-hosts /etc/hostsctl/orig.hosts
# grep -v '^#' /etc/hostsctl.d/20-enabled-disabled > /etc/hostsctl/disabled.hosts
# grep '^#' /etc/hostsctl.d/20-enabled-disabled | cut -d' ' -f2 > /etc/hostsctl/enabled.hosts
# rm -r /etc/hostsctl.d
- Prevent duplicates when merging host files.