Message ID | 20191105131439.31826-1-phil@nwl.cc |
---|---|
State | Changes Requested |
Delegated to: | Pablo Neira |
Headers | show |
Series | [nft] doc: Drop incorrect requirement for nft configs | expand |
On Tue, Nov 05, 2019 at 02:14:39PM +0100, Phil Sutter wrote: > The shebang is not needed in files to be used with --file parameter. > > Signed-off-by: Phil Sutter <phil@nwl.cc> 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. > --- > doc/nft.txt | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/doc/nft.txt b/doc/nft.txt > index ed2157638032a..c53327e25833d 100644 > --- a/doc/nft.txt > +++ b/doc/nft.txt > @@ -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*:: > -- > 2.23.0 >
On Wed, Nov 06, 2019 at 12:47:24PM +0100, Pablo Neira Ayuso wrote: > On Tue, Nov 05, 2019 at 02:14:39PM +0100, Phil Sutter wrote: > > The shebang is not needed in files to be used with --file parameter. > > > > Signed-off-by: Phil Sutter <phil@nwl.cc> > > 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
On Wed, Nov 06, 2019 at 03:19:53PM +0100, Phil Sutter wrote: > On Wed, Nov 06, 2019 at 12:47:24PM +0100, Pablo Neira Ayuso wrote: > > On Tue, Nov 05, 2019 at 02:14:39PM +0100, Phil Sutter wrote: > > > The shebang is not needed in files to be used with --file parameter. > > > > > > Signed-off-by: Phil Sutter <phil@nwl.cc> > > > > 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. :) Indeed, forget this. Thanks.
On Wed, Nov 06, 2019 at 09:25:57PM +0100, Pablo Neira Ayuso wrote: > On Wed, Nov 06, 2019 at 03:19:53PM +0100, Phil Sutter wrote: > > On Wed, Nov 06, 2019 at 12:47:24PM +0100, Pablo Neira Ayuso wrote: > > > On Tue, Nov 05, 2019 at 02:14:39PM +0100, Phil Sutter wrote: > > > > The shebang is not needed in files to be used with --file parameter. > > > > > > > > Signed-off-by: Phil Sutter <phil@nwl.cc> > > > > > > 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. :) > > Indeed, forget this. Thanks. BTW, it would be good to remove this from the example files in the tree.
On Wed, Nov 06, 2019 at 09:27:20PM +0100, Pablo Neira Ayuso wrote: > On Wed, Nov 06, 2019 at 09:25:57PM +0100, Pablo Neira Ayuso wrote: > > On Wed, Nov 06, 2019 at 03:19:53PM +0100, Phil Sutter wrote: > > > On Wed, Nov 06, 2019 at 12:47:24PM +0100, Pablo Neira Ayuso wrote: > > > > On Tue, Nov 05, 2019 at 02:14:39PM +0100, Phil Sutter wrote: > > > > > The shebang is not needed in files to be used with --file parameter. > > > > > > > > > > Signed-off-by: Phil Sutter <phil@nwl.cc> > > > > > > > > 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. :) > > > > 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!
diff --git a/doc/nft.txt b/doc/nft.txt index ed2157638032a..c53327e25833d 100644 --- a/doc/nft.txt +++ b/doc/nft.txt @@ -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*::
The shebang is not needed in files to be used with --file parameter. Signed-off-by: Phil Sutter <phil@nwl.cc> --- doc/nft.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)