From c54ce2e0fd25d79f5343792c1c620fecdc3b03bc Mon Sep 17 00:00:00 2001 From: Arturo Borrero Gonzalez Date: Mon, 13 Jan 2014 09:37:45 +0000 Subject: files: replace interpreter during installation Many systems (for example Debian) don't recognice `#!nft -f' as a valid interpreter. A short way to handle this is to provide the full path to the interpreter in the shebang. That is what this patch does: update the shebang's path during installation. For example, if you are installing under /usr/local, the shebang becomes: #!/usr/local/sbin/nft -f If using --prefix=/, then: #!/sbin/nft -f NOTE: If the shebang in source files are changed in a future, this sed script should be updated as well. Signed-off-by: Arturo Borrero Gonzalez Signed-off-by: Patrick McHardy --- files/Makefile.in | 1 + 1 file changed, 1 insertion(+) (limited to 'files') diff --git a/files/Makefile.in b/files/Makefile.in index c3643df2..dc237e23 100644 --- a/files/Makefile.in +++ b/files/Makefile.in @@ -2,3 +2,4 @@ install: @echo -e " INSTALL\tfiles" $(MKDIR_P) $(DESTDIR)/$(confdir) $(INSTALL) -m 755 -p $(SUBDIR)nftables/* $(DESTDIR)/$(confdir)/ + $(SED) -i "s~#\! nft~#\!@sbindir@/nft~" $(DESTDIR)/$(confdir)/* -- cgit v1.2.3