zstreamdump: replace with link to zstream

zstreamdump(8) was in quite a bad state,
and the wrapper didn't work if invoked without /sbin in $PATH

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12015
This commit is contained in:
наб
2021-05-08 15:04:48 +02:00
committed by Brian Behlendorf
parent 1fc5f8cbfd
commit 0458070928
8 changed files with 18 additions and 65 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
SUBDIRS = zfs zpool zdb zhack zinject zstream zstreamdump ztest
SUBDIRS = zfs zpool zdb zhack zinject zstream ztest
SUBDIRS += fsck_zfs vdev_id raidz_test zfs_ids_to_path
SUBDIRS += zpool_influxdb
+3
View File
@@ -15,3 +15,6 @@ zstream_LDADD = \
$(abs_top_builddir)/lib/libnvpair/libnvpair.la
include $(top_srcdir)/config/CppCheck.am
install-exec-hook:
$(LN_S) zstream $(DESTDIR)$(sbindir)/zstreamdump
+5
View File
@@ -49,6 +49,11 @@ zstream_usage(void)
int
main(int argc, char *argv[])
{
char *basename = strrchr(argv[0], '/');
basename = basename ? (basename + 1) : argv[0];
if (argc >= 1 && strcmp(basename, "zstreamdump") == 0)
return (zstream_do_dump(argc, argv));
if (argc < 2)
zstream_usage();
-1
View File
@@ -1 +0,0 @@
dist_sbin_SCRIPTS = zstreamdump
-3
View File
@@ -1,3 +0,0 @@
#!/bin/sh
exec zstream dump "$@"