mirror of
https://github.com/octoleo/hosts.git
synced 2024-11-21 20:35:10 +00:00
_verify_write_permissions()
doesn't accept arguments.
This commit is contained in:
parent
affd8d8657
commit
40be65b7da
20
hosts
20
hosts
@ -681,7 +681,7 @@ add() {
|
||||
_debug printf "add() \${2}: %s\\n" "${2:-}"
|
||||
_debug printf "add() \${3}: %s\\n" "${3:-}"
|
||||
|
||||
_verify_write_permissions "$@"
|
||||
_verify_write_permissions
|
||||
|
||||
local _ip="${1:-}"
|
||||
local _hostname="${2:-}"
|
||||
@ -794,7 +794,7 @@ backups() {
|
||||
|
||||
case "${_subcommand}" in
|
||||
create)
|
||||
_verify_write_permissions "$@"
|
||||
_verify_write_permissions
|
||||
|
||||
local _timestamp
|
||||
_timestamp="$(date +"%Y%m%d%H%M%S")"
|
||||
@ -822,7 +822,7 @@ backups() {
|
||||
exit 1
|
||||
fi
|
||||
|
||||
_verify_write_permissions "$@"
|
||||
_verify_write_permissions
|
||||
|
||||
if [[ "${HOSTS_PATH}" != "${_hosts_dirname}/${_filename:-}" ]] &&
|
||||
[[ -e "${_hosts_dirname}/${_filename:-}" ]]
|
||||
@ -845,7 +845,7 @@ backups() {
|
||||
exit 1
|
||||
fi
|
||||
|
||||
_verify_write_permissions "$@"
|
||||
_verify_write_permissions
|
||||
|
||||
if ! ((_skip_backup))
|
||||
then
|
||||
@ -912,7 +912,7 @@ Exit status:
|
||||
1 Invalid parameters or entry exists.
|
||||
HEREDOC
|
||||
block() {
|
||||
_verify_write_permissions "$@"
|
||||
_verify_write_permissions
|
||||
|
||||
if [[ -z "${1:-}" ]]
|
||||
then
|
||||
@ -944,7 +944,7 @@ Exit status:
|
||||
1 Invalid parameters or entry not found.
|
||||
HEREDOC
|
||||
disable() {
|
||||
_verify_write_permissions "$@"
|
||||
_verify_write_permissions
|
||||
|
||||
local _search_string="${1:-}"
|
||||
|
||||
@ -1017,7 +1017,7 @@ Description:
|
||||
Open the ${HOSTS_PATH} file in your \$EDITOR.
|
||||
HEREDOC
|
||||
edit() {
|
||||
_verify_write_permissions "$@"
|
||||
_verify_write_permissions
|
||||
|
||||
if [[ -z "${EDITOR}" ]]
|
||||
then
|
||||
@ -1042,7 +1042,7 @@ Exit status:
|
||||
1 Invalid parameters or entry not found.
|
||||
HEREDOC
|
||||
enable() {
|
||||
_verify_write_permissions "$@"
|
||||
_verify_write_permissions
|
||||
|
||||
local _search_string="${1:-}"
|
||||
|
||||
@ -1184,7 +1184,7 @@ Exit status:
|
||||
1 Invalid parameters or entry not found.
|
||||
HEREDOC
|
||||
remove() {
|
||||
_verify_write_permissions "$@"
|
||||
_verify_write_permissions
|
||||
|
||||
local _is_search_pair=0
|
||||
local _force_skip_prompt=0
|
||||
@ -1397,7 +1397,7 @@ Exit status:
|
||||
1 Invalid parameters or entry not found.
|
||||
HEREDOC
|
||||
unblock() {
|
||||
_verify_write_permissions "$@"
|
||||
_verify_write_permissions
|
||||
|
||||
if [[ -z "${1:-}" ]]
|
||||
then
|
||||
|
Loading…
Reference in New Issue
Block a user