]> git.ipfire.org Git - network.git/blobdiff - functions.util
DNS: Add options to configure local DNS servers.
[network.git] / functions.util
index 163888fdfb7941b37668934b0907af5a75909cf6..da2d036d34eff3d1234840faf8d2d851ce8d8e25 100644 (file)
@@ -21,7 +21,9 @@
 
 # A simple print statement
 function print() {
-       printf "$@\n"
+       local fmt=${1}; shift
+
+       printf "${fmt}\n" "$@"
 }
 
 # Print a pretty error message
@@ -89,7 +91,7 @@ function touch() {
 function enabled() {
        local param=${1}
 
-       [ "${!param}" = "yes" ] || [ "${!param}" = "on" ] || [ "${!param}" = "1" ]
+       listmatch "${!param}" yes on true 1
 }
 
 function mac_generate() {