From 71483d6f11d88e4ad5ff389a56c6ab6de2d20ba8 Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Thu, 7 Aug 2014 03:25:16 -0400 Subject: [PATCH] A few touchups to the documentation and comments. --- README.md | 4 ++-- buildhosts | 11 ++++------- buildhosts.1 | 4 ++-- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 877df88..bfdbc00 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Build and maintain `/etc/hosts` while including lists imported from local and re ## Instructions ## -**Note:** All instructions should be performed as the **root** user, or using the `sudo` command to run commands with **root** permissions. +**Note:** All instructions should be performed as the **root** user or using the `sudo` command. ## Enable Remote Sources ## @@ -16,7 +16,7 @@ Build and maintain `/etc/hosts` while including lists imported from local and re ## Disable Remote Sources ## 1. To disable the configured hosts lists, run the `unset` command and `/etc/hosts.core` will be moved back to `/etc/hosts`. -2. The `/etc/hosts.sources` file will continue to exist until it's manually deleted, and it will be used again the next time remote sources are enabled. +* The `/etc/hosts.sources` file will continue to exist until it's manually deleted, and it will be used again the next time remote sources are enabled. ## Notes on /etc/hosts.sources ## diff --git a/buildhosts b/buildhosts index 41f1c53..a8e406c 100755 --- a/buildhosts +++ b/buildhosts @@ -10,13 +10,10 @@ # moved to /etc/hosts.core, and the file /etc/hosts.sources will # be created using the default sources list. The /etc/hosts file # will then be generated by combining /etc/hosts.core and the -# resulting contents of the downloaded sources in -# /etc/hosts.sources. +# resulting contents of downloaded sources in /etc/hosts.sources. # 2. You can now open /etc/hosts.sources and remove or comment out # (by adding # in front) any sources you don't wish to use, as -# well as add new ones. Sources can remote -# (ie: http://adaway.org/hosts.txt) as well as local -# (ie: file:///etc/hosts.d/mylist.txt). +# well as add new ones. Sources can remote as well as local. # 3. If you want to make any changes to the contents of what used to # be /etc/hosts, you should now make them to /etc/hosts.core, and # you'll need to rerun the 'set' command to have them applied. @@ -28,7 +25,7 @@ # Disable Remote Sources # 1. To disable the configured hosts lists, run the 'unset' command # and /etc/hosts.core will be moved back to /etc/hosts. -# 2. The /etc/hosts.sources file will continue to exist until it's +# * The /etc/hosts.sources file will continue to exist until it's # manually deleted, and it will be used again the next time remote # sources are enabled. # @@ -168,7 +165,7 @@ function buildhosts_unset() { # Fail if the user isn't root [[ $EUID -eq 0 ]] || buildhosts_error "You must run ${BUILDHOSTS_SCRIPT} as root" -# Undo changes to /etc/hosts when the user runs with the disable command +# Fail if run with no commands [[ -n "$1" ]] || buildhosts_error "You must run ${BUILDHOSTS_SCRIPT} with a valid argument" 1 case "$1" in diff --git a/buildhosts.1 b/buildhosts.1 index 3d6c543..e7ac98a 100644 --- a/buildhosts.1 +++ b/buildhosts.1 @@ -44,7 +44,7 @@ \fBhelp\fR: display the help . .SH "INSTRUCTIONS" -\fBNote:\fR All instructions should be performed as the \fBroot\fR user, or using the \fBsudo\fR command to run commands with \fBroot\fR permissions\. +\fBNote:\fR All instructions should be performed as the \fBroot\fR user or using the \fBsudo\fR command\. . .SS "Enable Remote Sources" .TP @@ -68,7 +68,7 @@ Once you\'re done customizing your configuration, run the \fBset\fR command agai To disable the configured hosts lists, run the \fBunset\fR command and \fB/etc/hosts\.core\fR will be moved back to \fB/etc/hosts\fR\. .TP .TP -.BR "2." +.BR "*" The \fB/etc/hosts\.sources\fR file will continue to exist until it\'s manually deleted, and it will be used again the next time remote sources are enabled\. .SS "Notes on /etc/hosts\.sources" .TP