1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-26 18:50:30 +03:00

Eventscripts: Indent error when a route delete fails in 11.per_ip_routing

This puts it under the umbrella of the previous warning that should
also have been printed.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 5c3be8f26dcde0b1b3d86928953e74d4a8b35958)
This commit is contained in:
Martin Schwenke 2012-07-17 20:19:37 +10:00
parent f6f711ee4d
commit 530415b671

View File

@ -247,8 +247,14 @@ WARNING: Failed to delete policy routing rule
Command "$_cmd" failed:
$_out
EOF
# This should never fail, so don't redirect output.
ip route flush table $_table_id
# This should never usually fail, so don't redirect output.
# However, it can fail when deleting a rogue IP, since there will
# be no routes for that IP. In this case it should only fail when
# the rule deletion above has already failed because the table id
# is invalid. Therefore, go to a little bit of trouble to indent
# the failure message so that it is associated with the above
# warning message and doesn't look too nasty.
ip route flush table $_table_id 2>&1 | sed -e 's@^.@ &@'
}
######################################################################