Skip to contentSkip to conversation

doc: Drop incorrect requirement for nft configs

PATCH In review Phil Sutter 2 participants 6 messages Nov 5, 2019 – Nov 6, 2019 netfilter

lore
Share & tools
lore

Phil Sutter

author reviewer
#0 lore raw

PATCH 1/1 doc: Drop incorrect requirement for nft configs

The shebang is not needed in files to be used with --file parameter.

---
 doc/nft.txt | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
doc/nft.txt +1 -2
index ed2157638032a..c53327e25833d 100644
@@ -85,8 +85,7 @@ For a full summary of options, run *nft --help*.
 
 *-f*::
 *--file 'filename'*::
-	Read input from 'filename'. If 'filename' is -, read from stdin. +
-	nft scripts must start *#!/usr/sbin/nft -f*
+	Read input from 'filename'. If 'filename' is -, read from stdin.
 
 *-i*::
 *--interactive*::
Signature · 1 line
2.23.0
#1 lore raw
Quoted 3 lines · Phil Sutter

The shebang is not needed in files to be used with --file parameter.

Right, this is actually handled as a comment right now, not as an indication of what binary the user would like to use.

It should be possible to implement the shebang for nft if you think this is useful.

Thanks.

Quoted 21 lines
---
 doc/nft.txt | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
doc/nft.txt +1 -2
index ed2157638032a..c53327e25833d 100644
@@ -85,8 +85,7 @@ For a full summary of options, run *nft --help*.
 
 *-f*::
 *--file 'filename'*::
-	Read input from 'filename'. If 'filename' is -, read from stdin. +
-	nft scripts must start *#!/usr/sbin/nft -f*
+	Read input from 'filename'. If 'filename' is -, read from stdin.
 
 *-i*::
 *--interactive*::
Signature · 1 line
2.23.0
author reviewer
#2 lore raw
Quoted 10 lines · Pablo Neira Ayuso
Quoted 3 lines · Phil Sutter

The shebang is not needed in files to be used with --file parameter.

Right, this is actually handled as a comment right now, not as an indication of what binary the user would like to use.

It should be possible to implement the shebang for nft if you think this is useful.

Well, it works already? If I make a config having the shebang executable, I can execute it directly. It's just not needed when passed to 'nft -f'. And in that use-case, I don't see a point in interpreting it, the user already chose which binary to use by calling it. :)

Cheers, Phil

#3 lore raw
Quoted 9 lines · Phil Sutter
Quoted 8 lines · Pablo Neira Ayuso
Quoted 3 lines · Phil Sutter

The shebang is not needed in files to be used with --file parameter.

Right, this is actually handled as a comment right now, not as an indication of what binary the user would like to use.

Quoted 7 lines
Quoted 2 lines

It should be possible to implement the shebang for nft if you think this is useful.

Well, it works already? If I make a config having the shebang executable, I can execute it directly. It's just not needed when passed to 'nft -f'. And in that use-case, I don't see a point in interpreting it, the user already chose which binary to use by calling it. :)

Indeed, forget this. Thanks.

#4 lore raw
Quoted 13 lines · Pablo Neira Ayuso
Quoted 12 lines · Phil Sutter
Quoted 10 lines · Pablo Neira Ayuso
Quoted 3 lines · Phil Sutter

The shebang is not needed in files to be used with --file parameter.

Right, this is actually handled as a comment right now, not as an indication of what binary the user would like to use.

It should be possible to implement the shebang for nft if you think this is useful.

Quoted 6 lines
Quoted 4 lines

Well, it works already? If I make a config having the shebang executable, I can execute it directly. It's just not needed when passed to 'nft -f'. And in that use-case, I don't see a point in interpreting it, the user already chose which binary to use by calling it. :)

Indeed, forget this. Thanks.

BTW, it would be good to remove this from the example files in the tree.

author reviewer
#5 lore raw
Quoted 14 lines · Pablo Neira Ayuso
Quoted 13 lines · Pablo Neira Ayuso
Quoted 12 lines · Phil Sutter
Quoted 10 lines · Pablo Neira Ayuso
Quoted 3 lines · Phil Sutter

The shebang is not needed in files to be used with --file parameter.

Right, this is actually handled as a comment right now, not as an indication of what binary the user would like to use.

It should be possible to implement the shebang for nft if you think this is useful.

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

Well, it works already? If I make a config having the shebang executable, I can execute it directly. It's just not needed when passed to 'nft -f'. And in that use-case, I don't see a point in interpreting it, the user already chose which binary to use by calling it. :)

Indeed, forget this. Thanks.

BTW, it would be good to remove this from the example files in the tree.

I'll send a patch, thanks!