V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m54s
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m54s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -31,4 +31,7 @@ validation_array() {
|
||||
done
|
||||
return 1
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
readonly -f validation_array
|
||||
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh
|
||||
|
||||
@@ -15,7 +15,7 @@ guard_sourcing
|
||||
#######################################
|
||||
# IPv4 validation.
|
||||
# Globals:
|
||||
# ERR_INVALID_IPV4
|
||||
# None
|
||||
# Arguments:
|
||||
# 1: IPv4 to validate.
|
||||
# Returns:
|
||||
@@ -30,6 +30,9 @@ validation_ipv4() {
|
||||
return "${ERR_INVALID_IPV4}"
|
||||
fi
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
readonly -f validation_ipv4
|
||||
|
||||
#######################################
|
||||
# IPv6 validation, including
|
||||
@@ -38,7 +41,7 @@ validation_ipv4() {
|
||||
# - Addresses with embedded IPv4 addresses like ::ffff:192.0.2.128
|
||||
# - Link-local addresses like fe80::1%eth0
|
||||
# Globals:
|
||||
# ERR_INVALID_IPV6
|
||||
# None
|
||||
# Arguments:
|
||||
# 1: IPv6 address
|
||||
# Returns:
|
||||
@@ -88,11 +91,14 @@ validation_ipv6() {
|
||||
### Success
|
||||
do_log "info" "file_only" "'${var_ip}' seems to be a valid IPv6."
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
readonly -f validation_ipv6
|
||||
|
||||
#######################################
|
||||
# Port validation.
|
||||
# Globals:
|
||||
# ERR_INVALID_PORT
|
||||
# None
|
||||
# Arguments:
|
||||
# 1: Port number
|
||||
# Returns:
|
||||
@@ -107,4 +113,7 @@ validation_port() {
|
||||
return "${ERR_INVALID_PORT}"
|
||||
fi
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
readonly -f validation_port
|
||||
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh
|
||||
|
||||
@@ -60,4 +60,7 @@ validation_preseed() {
|
||||
|
||||
return 0
|
||||
}
|
||||
### Prevents accidental 'unset -f'.
|
||||
# shellcheck disable=SC2034
|
||||
readonly -f validation_preseed
|
||||
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh
|
||||
|
||||
Reference in New Issue
Block a user