[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.11.1503171550360.18888@aurora64.sdinet.de>
Date: Tue, 17 Mar 2015 16:07:08 +0100 (CET)
From: Sven-Haegar Koch <haegar@...net.de>
To: netdev@...r.kernel.org
Subject: iproute2: ip -force -batch does not continue on errors
Hallo,
Test szenario:
# cat b.txt
route del 1.2.3.0/24 dev eth0
route del 1.2.4.0/24 dev eth0
route del 1.2.5.0/24 dev eth0
route add 1.2.3.0/24 dev eth0
# ip -force -batch b.txt
RTNETLINK answers: No such process
Expectation: The three route del commands may fail if the route does
not (yet) exist, and then (as I am using -force) the route add gets
executed.
But instead the batch processing is aborted at the first failing "route
del" command, forcing me to execute ip once per route del instead of
using the batchmode.
Tested mainly using iproute2 3.16.0, but the current git tree seems to
behave mostly the same, except that it only executes anything if I add
"-f inet" to the commandline, otherwise it rejects the first line with
'Error: an inet prefix is expected rather than "1.2.3.0/24".'
c'ya
sven-haegar
--
Three may keep a secret, if two of them are dead.
- Ben F.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists