diff options
author | Arvind Sankar <[email protected]> | 2020-07-11 19:35:58 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2020-07-14 17:33:44 -0700 |
commit | 38e2e9ce8327284b2d516874308300aa96102fe9 (patch) | |
tree | 0761f7f696e4da7888a0c99ffb3a91a63ecefdd4 /cmd/arcstat | |
parent | bdb518c13abb9eca8d6f8f1d9e2096dc5163a9e7 (diff) |
Centralize variable substitution
A bunch of places need to edit files to incorporate the configured paths
i.e. bindir, sbindir etc. Move this logic into a common file.
Create arc_summary by copying arc_summary[23] as appropriate at build
time instead of install time.
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Arvind Sankar <[email protected]>
Closes #10559
Diffstat (limited to 'cmd/arcstat')
-rw-r--r-- | cmd/arcstat/.gitignore | 1 | ||||
-rw-r--r-- | cmd/arcstat/Makefile.am | 16 | ||||
-rwxr-xr-x | cmd/arcstat/arcstat.in (renamed from cmd/arcstat/arcstat) | 2 |
3 files changed, 6 insertions, 13 deletions
diff --git a/cmd/arcstat/.gitignore b/cmd/arcstat/.gitignore new file mode 100644 index 000000000..6d6cd1ab7 --- /dev/null +++ b/cmd/arcstat/.gitignore @@ -0,0 +1 @@ +arcstat diff --git a/cmd/arcstat/Makefile.am b/cmd/arcstat/Makefile.am index a0728f9ce..d1ba989a0 100644 --- a/cmd/arcstat/Makefile.am +++ b/cmd/arcstat/Makefile.am @@ -1,13 +1,5 @@ -dist_bin_SCRIPTS = arcstat +include $(top_srcdir)/config/Substfiles.am -# -# The arcstat script is compatible with both Python 2.6 and 3.4. -# As such the python 3 shebang can be replaced at install time when -# targeting a python 2 system. This allows us to maintain a single -# version of the source. -# -if USING_PYTHON_2 -install-exec-hook: - $(SED) ${ac_inplace} -e 's|^#!/usr/bin/env python3|#!/usr/bin/env python2|' \ - $(DESTDIR)$(bindir)/arcstat -endif +bin_SCRIPTS = arcstat + +SUBSTFILES += $(bin_SCRIPTS) diff --git a/cmd/arcstat/arcstat b/cmd/arcstat/arcstat.in index 5ce7e755c..b230e4b85 100755 --- a/cmd/arcstat/arcstat +++ b/cmd/arcstat/arcstat.in @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env @PYTHON_SHEBANG@ # # Print out ZFS ARC Statistics exported via kstat(1) # For a definition of fields, or usage, use arcstat -v |