From 172571e53c1c6dacc86bcef2b09abf91c451bd69 Mon Sep 17 00:00:00 2001
From: Konstantin Pavlov <thresh@videolan.org>
Date: Wed, 17 Jun 2020 14:24:07 +0300
Subject: [PATCH] ipv6 listen: put r/o filesystem alert to stderr

---
 mainline/alpine-perl/10-listen-on-ipv6-by-default.sh | 2 +-
 mainline/alpine/10-listen-on-ipv6-by-default.sh      | 2 +-
 mainline/buster-perl/10-listen-on-ipv6-by-default.sh | 2 +-
 mainline/buster/10-listen-on-ipv6-by-default.sh      | 2 +-
 stable/alpine-perl/10-listen-on-ipv6-by-default.sh   | 2 +-
 stable/alpine/10-listen-on-ipv6-by-default.sh        | 2 +-
 stable/buster-perl/10-listen-on-ipv6-by-default.sh   | 2 +-
 stable/buster/10-listen-on-ipv6-by-default.sh        | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/mainline/alpine-perl/10-listen-on-ipv6-by-default.sh b/mainline/alpine-perl/10-listen-on-ipv6-by-default.sh
index 8ce9e9a..85418f3 100755
--- a/mainline/alpine-perl/10-listen-on-ipv6-by-default.sh
+++ b/mainline/alpine-perl/10-listen-on-ipv6-by-default.sh
@@ -18,7 +18,7 @@ if [ ! -f "/$DEFAULT_CONF_FILE" ]; then
 fi
 
 # check if the file can be modified, e.g. not on a r/o filesystem
-touch /$DEFAULT_CONF_FILE 2>/dev/null || { echo >&3 "$ME: Can not modify /$DEFAULT_CONF_FILE (read-only file system?), exiting"; exit 0; }
+touch /$DEFAULT_CONF_FILE 2>/dev/null || { echo "$ME: Can not modify /$DEFAULT_CONF_FILE (read-only file system?), exiting" >1&2; exit 0; }
 
 # check if the file is already modified, e.g. on a container restart
 grep -q "listen  \[::]\:80;" /$DEFAULT_CONF_FILE && { echo >&3 "$ME: IPv6 listen already enabled, exiting"; exit 0; }
diff --git a/mainline/alpine/10-listen-on-ipv6-by-default.sh b/mainline/alpine/10-listen-on-ipv6-by-default.sh
index 8ce9e9a..85418f3 100755
--- a/mainline/alpine/10-listen-on-ipv6-by-default.sh
+++ b/mainline/alpine/10-listen-on-ipv6-by-default.sh
@@ -18,7 +18,7 @@ if [ ! -f "/$DEFAULT_CONF_FILE" ]; then
 fi
 
 # check if the file can be modified, e.g. not on a r/o filesystem
-touch /$DEFAULT_CONF_FILE 2>/dev/null || { echo >&3 "$ME: Can not modify /$DEFAULT_CONF_FILE (read-only file system?), exiting"; exit 0; }
+touch /$DEFAULT_CONF_FILE 2>/dev/null || { echo "$ME: Can not modify /$DEFAULT_CONF_FILE (read-only file system?), exiting" >1&2; exit 0; }
 
 # check if the file is already modified, e.g. on a container restart
 grep -q "listen  \[::]\:80;" /$DEFAULT_CONF_FILE && { echo >&3 "$ME: IPv6 listen already enabled, exiting"; exit 0; }
diff --git a/mainline/buster-perl/10-listen-on-ipv6-by-default.sh b/mainline/buster-perl/10-listen-on-ipv6-by-default.sh
index 8ce9e9a..85418f3 100755
--- a/mainline/buster-perl/10-listen-on-ipv6-by-default.sh
+++ b/mainline/buster-perl/10-listen-on-ipv6-by-default.sh
@@ -18,7 +18,7 @@ if [ ! -f "/$DEFAULT_CONF_FILE" ]; then
 fi
 
 # check if the file can be modified, e.g. not on a r/o filesystem
-touch /$DEFAULT_CONF_FILE 2>/dev/null || { echo >&3 "$ME: Can not modify /$DEFAULT_CONF_FILE (read-only file system?), exiting"; exit 0; }
+touch /$DEFAULT_CONF_FILE 2>/dev/null || { echo "$ME: Can not modify /$DEFAULT_CONF_FILE (read-only file system?), exiting" >1&2; exit 0; }
 
 # check if the file is already modified, e.g. on a container restart
 grep -q "listen  \[::]\:80;" /$DEFAULT_CONF_FILE && { echo >&3 "$ME: IPv6 listen already enabled, exiting"; exit 0; }
diff --git a/mainline/buster/10-listen-on-ipv6-by-default.sh b/mainline/buster/10-listen-on-ipv6-by-default.sh
index 8ce9e9a..85418f3 100755
--- a/mainline/buster/10-listen-on-ipv6-by-default.sh
+++ b/mainline/buster/10-listen-on-ipv6-by-default.sh
@@ -18,7 +18,7 @@ if [ ! -f "/$DEFAULT_CONF_FILE" ]; then
 fi
 
 # check if the file can be modified, e.g. not on a r/o filesystem
-touch /$DEFAULT_CONF_FILE 2>/dev/null || { echo >&3 "$ME: Can not modify /$DEFAULT_CONF_FILE (read-only file system?), exiting"; exit 0; }
+touch /$DEFAULT_CONF_FILE 2>/dev/null || { echo "$ME: Can not modify /$DEFAULT_CONF_FILE (read-only file system?), exiting" >1&2; exit 0; }
 
 # check if the file is already modified, e.g. on a container restart
 grep -q "listen  \[::]\:80;" /$DEFAULT_CONF_FILE && { echo >&3 "$ME: IPv6 listen already enabled, exiting"; exit 0; }
diff --git a/stable/alpine-perl/10-listen-on-ipv6-by-default.sh b/stable/alpine-perl/10-listen-on-ipv6-by-default.sh
index 8ce9e9a..85418f3 100755
--- a/stable/alpine-perl/10-listen-on-ipv6-by-default.sh
+++ b/stable/alpine-perl/10-listen-on-ipv6-by-default.sh
@@ -18,7 +18,7 @@ if [ ! -f "/$DEFAULT_CONF_FILE" ]; then
 fi
 
 # check if the file can be modified, e.g. not on a r/o filesystem
-touch /$DEFAULT_CONF_FILE 2>/dev/null || { echo >&3 "$ME: Can not modify /$DEFAULT_CONF_FILE (read-only file system?), exiting"; exit 0; }
+touch /$DEFAULT_CONF_FILE 2>/dev/null || { echo "$ME: Can not modify /$DEFAULT_CONF_FILE (read-only file system?), exiting" >1&2; exit 0; }
 
 # check if the file is already modified, e.g. on a container restart
 grep -q "listen  \[::]\:80;" /$DEFAULT_CONF_FILE && { echo >&3 "$ME: IPv6 listen already enabled, exiting"; exit 0; }
diff --git a/stable/alpine/10-listen-on-ipv6-by-default.sh b/stable/alpine/10-listen-on-ipv6-by-default.sh
index 8ce9e9a..85418f3 100755
--- a/stable/alpine/10-listen-on-ipv6-by-default.sh
+++ b/stable/alpine/10-listen-on-ipv6-by-default.sh
@@ -18,7 +18,7 @@ if [ ! -f "/$DEFAULT_CONF_FILE" ]; then
 fi
 
 # check if the file can be modified, e.g. not on a r/o filesystem
-touch /$DEFAULT_CONF_FILE 2>/dev/null || { echo >&3 "$ME: Can not modify /$DEFAULT_CONF_FILE (read-only file system?), exiting"; exit 0; }
+touch /$DEFAULT_CONF_FILE 2>/dev/null || { echo "$ME: Can not modify /$DEFAULT_CONF_FILE (read-only file system?), exiting" >1&2; exit 0; }
 
 # check if the file is already modified, e.g. on a container restart
 grep -q "listen  \[::]\:80;" /$DEFAULT_CONF_FILE && { echo >&3 "$ME: IPv6 listen already enabled, exiting"; exit 0; }
diff --git a/stable/buster-perl/10-listen-on-ipv6-by-default.sh b/stable/buster-perl/10-listen-on-ipv6-by-default.sh
index 8ce9e9a..85418f3 100755
--- a/stable/buster-perl/10-listen-on-ipv6-by-default.sh
+++ b/stable/buster-perl/10-listen-on-ipv6-by-default.sh
@@ -18,7 +18,7 @@ if [ ! -f "/$DEFAULT_CONF_FILE" ]; then
 fi
 
 # check if the file can be modified, e.g. not on a r/o filesystem
-touch /$DEFAULT_CONF_FILE 2>/dev/null || { echo >&3 "$ME: Can not modify /$DEFAULT_CONF_FILE (read-only file system?), exiting"; exit 0; }
+touch /$DEFAULT_CONF_FILE 2>/dev/null || { echo "$ME: Can not modify /$DEFAULT_CONF_FILE (read-only file system?), exiting" >1&2; exit 0; }
 
 # check if the file is already modified, e.g. on a container restart
 grep -q "listen  \[::]\:80;" /$DEFAULT_CONF_FILE && { echo >&3 "$ME: IPv6 listen already enabled, exiting"; exit 0; }
diff --git a/stable/buster/10-listen-on-ipv6-by-default.sh b/stable/buster/10-listen-on-ipv6-by-default.sh
index 8ce9e9a..85418f3 100755
--- a/stable/buster/10-listen-on-ipv6-by-default.sh
+++ b/stable/buster/10-listen-on-ipv6-by-default.sh
@@ -18,7 +18,7 @@ if [ ! -f "/$DEFAULT_CONF_FILE" ]; then
 fi
 
 # check if the file can be modified, e.g. not on a r/o filesystem
-touch /$DEFAULT_CONF_FILE 2>/dev/null || { echo >&3 "$ME: Can not modify /$DEFAULT_CONF_FILE (read-only file system?), exiting"; exit 0; }
+touch /$DEFAULT_CONF_FILE 2>/dev/null || { echo "$ME: Can not modify /$DEFAULT_CONF_FILE (read-only file system?), exiting" >1&2; exit 0; }
 
 # check if the file is already modified, e.g. on a container restart
 grep -q "listen  \[::]\:80;" /$DEFAULT_CONF_FILE && { echo >&3 "$ME: IPv6 listen already enabled, exiting"; exit 0; }
-- 
GitLab