* nft - execute command without returning error
@ 2019-10-12 20:32 Daniel Huhardeaux
2019-10-13 12:52 ` Daniel Huhardeaux
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Huhardeaux @ 2019-10-12 20:32 UTC (permalink / raw)
To: netfilter
Hello,
for instance, I want to delete a table which is not existing. Problem is
that nft return an error and stop processing the script. It's the same
for other commands like adding an already existing chain.
If I run all nft stuff in a bash script I can use eg
nft delete table mytable 2>/dev/null || true or
nft add chain mychain input { ... } 2>/dev/null || true
to get around.
With table, using add instead of create does the job. What are the
solutions for others command like showned above ?
--
Daniel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: nft - execute command without returning error
2019-10-12 20:32 nft - execute command without returning error Daniel Huhardeaux
@ 2019-10-13 12:52 ` Daniel Huhardeaux
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Huhardeaux @ 2019-10-13 12:52 UTC (permalink / raw)
To: netfilter
Le 12/10/2019 à 22:32, Daniel Huhardeaux a écrit :
> Hello,
>
> for instance, I want to delete a table which is not existing. Problem is
> that nft return an error and stop processing the script. It's the same
> for other commands like adding an already existing chain.
Sorry for this, I saw it's not true as in chain I can use add instead of
create to avoid error.
To be clear, my goal is to use nft instead of bash to create rules: bash
script is used to set automatically some values like ip/ipv6 addresses
aso, echo them in a define include file and chain to nft script who will
include this file and apply rules.
--
Daniel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-13 12:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-12 20:32 nft - execute command without returning error Daniel Huhardeaux
2019-10-13 12:52 ` Daniel Huhardeaux
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.