1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
Description: Change syntax of functions definitions to be POSIX compatible
Running this shell script with the shell's -n option set fails, which means
that the script has syntax errors. The erros are in the functions
definitions which uses the bash syntax, but the script's interpreter is
/bin/sh, which in Debian points to dash, which is a POSIX shell, so the
definitions had to be adapted to the POSIX syntax.
Author: Fabio Augusto De Muzio Tobich <ftobich@debian.org>
Forwarded: no
Last-Update: 2025-05-14
Index: openresolv/resolvectl.in
===================================================================
--- openresolv.orig/resolvectl.in
+++ openresolv/resolvectl.in
@@ -54,7 +54,7 @@ fi
# Luckily resolvconf makes this easy for us.
# Returns a list of resolvconf entries for a real interface
-function get_resolvconf_interfaces() {
+get_resolvconf_interfaces() {
IFACE="$1"
[ -d /sys/class/net/"$IFACE" ] || return 1
@@ -79,7 +79,7 @@ function get_resolvconf_interfaces() {
}
# For the given interface, apply a list of resolvconf entries
-function apply_resolvconf() {
+apply_resolvconf() {
IFACE="$1"
shift
|