nft - execute command without returning error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux