File examples-fix-bashisms-in-example-script.patch of Package iproute2
From: Oleksandr Chumachenko <ledest@gmail.com>
Date: Thu, 18 Dec 2014 17:35:02 +0100
Subject: examples: fix bashisms in example script
Patch-mainline: No
As the script is declared to be for /bin/sh, it shouldn't use bash
specific syntax.
---
examples/gaiconf | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/examples/gaiconf b/examples/gaiconf
index d75292b900cc..c87778f88f3b 100644
--- a/examples/gaiconf
+++ b/examples/gaiconf
@@ -11,7 +11,7 @@ DEFAULT_GAICONF=/etc/gai.conf
verbose=
debug=
-function run ()
+run ()
{
if [ x"$verbose" != x"" ]; then
echo "$@"
@@ -21,7 +21,7 @@ function run ()
fi
}
-function do_load_config ()
+do_load_config ()
{
file=$1; shift
flush=1
@@ -36,14 +36,14 @@ function do_load_config ()
done
}
-function do_list_config ()
+do_list_config ()
{
${IP} -6 addrlabel list | while read p pfx l lbl; do
echo label ${pfx} ${lbl}
done
}
-function help ()
+help ()
{
echo "Usage: $0 [-v] {--list | --config [ ${DEFAULT_GAICONF} ] | --default}"
exit 1
--
2.7.0