]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
oci-setup: Fixes bug12763
authorAdolf Belka <adolf.belka@ipfire.org>
Thu, 11 Apr 2024 15:01:08 +0000 (17:01 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Fri, 19 Apr 2024 18:41:33 +0000 (18:41 +0000)
- 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>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
src/initscripts/helper/oci-setup

index 312014b74c2bd7f23cdab0f4198337d1fbc1f8db..7275373438308e1b9f4920ecd86dc36ebcbeb3b0 100644 (file)
@@ -304,8 +304,8 @@ case "${reason}" in
                ip addr add "${new_ip_address}/${new_subnet_mask}" dev "${interface}"
 
                # Add the default route
-               ip route add "${new_routers}" dev "${interface}"
-               ip route add default via "${new_routers}"
+               ip route add "${new_routers}" dev "${interface}" >/dev/null 2>&1
+               ip route add default via "${new_routers}" >/dev/null 2>&1
 
                # Setup DNS
                for domain_name_server in ${new_domain_name_servers}; do