]> git.ipfire.org Git - people/mfischer/ipfire-2.x.git/commitdiff
red: Fixes bug12763
authorAdolf Belka <adolf.belka@ipfire.org>
Thu, 11 Apr 2024 15:01:02 +0000 (17:01 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Fri, 19 Apr 2024 18:40:15 +0000 (18:40 +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/networking/red

index beb665e5f45f653cbd079d07d64e4a006109aaeb..51bf95a4362a0113732cbc3019288d45f04ad6cb 100644 (file)
@@ -129,10 +129,10 @@ case "${1}" in
                        touch /var/ipfire/red/active
 
                        # Create route to default gateway
-                       ip route add ${GATEWAY} dev ${DEVICE}
+                       ip route add ${GATEWAY} dev ${DEVICE} >/dev/null 2>&1
 
                        boot_mesg "Setting up default gateway ${GATEWAY}..."
-                       ip route add default via ${GATEWAY} dev ${DEVICE}
+                       ip route add default via ${GATEWAY} dev ${DEVICE} >/dev/null 2>&1
                        evaluate_retval
 
                        if [ -d "/sys/class/net/${DEVICE}" ]; then