[7/9] exoscale-setup: Fixes bug12763

Message ID 20240411150108.21573-7-adolf.belka@ipfire.org
State Staged
Commit 3162b6ccfa2fb22513c7d23d29f0509343f46828
Headers
Series [1/9] ipsec-interfaces: Fixes bug12763 |

Commit Message

Adolf Belka April 11, 2024, 3:01 p.m. UTC
  - This ensures that all ip route and ip rule commands are redirected to null if the output
   is not used to feed into a variable.
- This will prevent any error messages related to empty iproute tables being displayed
   during boot if an empty table is accessed.

Fixes: Bug#12763
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
 src/initscripts/helper/exoscale-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/src/initscripts/helper/exoscale-setup b/src/initscripts/helper/exoscale-setup
index 02fdda2a3..acf5e4e4b 100644
--- a/src/initscripts/helper/exoscale-setup
+++ b/src/initscripts/helper/exoscale-setup
@@ -227,7 +227,7 @@  case "${reason}" in
 		ip addr add "${new_ip_address}/${new_subnet_mask}" dev "${interface}"
 
 		# Add the default route
-		ip route add default via "${new_routers}"
+		ip route add default via "${new_routers}" >/dev/null 2>&1
 
 		# Setup DNS
 		for domain_name_server in ${new_domain_name_servers}; do