Add zdb into rescue environment.

On amd64, this would increase the binary size by 1.1MiB and
make it possible to examine zpool status offline, useful for
recovery and diagnostic purposes.

Submitted by:	sef
Obtained from:	FreeNAS
MFC after:	2 weeks
This commit is contained in:
Xin LI 2014-08-20 00:14:41 +00:00
parent 4a185fa6c9
commit 4c75e22659
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=270189

View File

@ -113,6 +113,7 @@ CRUNCH_PROGS_sbin+= ipf
.if ${MK_ZFS} != "no" .if ${MK_ZFS} != "no"
CRUNCH_PROGS_sbin+= zfs CRUNCH_PROGS_sbin+= zfs
CRUNCH_PROGS_sbin+= zpool CRUNCH_PROGS_sbin+= zpool
CRUNCH_PROGS_usr.sbin+= zdb
.endif .endif
# crunchgen does not like C++ programs; this should be fixed someday # crunchgen does not like C++ programs; this should be fixed someday
@ -120,7 +121,7 @@ CRUNCH_PROGS_sbin+= zpool
CRUNCH_LIBS+= -lalias -lcam -lncursesw -ldevstat -lipsec CRUNCH_LIBS+= -lalias -lcam -lncursesw -ldevstat -lipsec
.if ${MK_ZFS} != "no" .if ${MK_ZFS} != "no"
CRUNCH_LIBS+= -lavl -lzfs_core -lzfs -lnvpair -lpthread -luutil -lumem CRUNCH_LIBS+= -lavl -lzpool -lzfs_core -lzfs -lnvpair -lpthread -luutil -lumem
.endif .endif
CRUNCH_LIBS+= -lgeom -lbsdxml -lkiconv CRUNCH_LIBS+= -lgeom -lbsdxml -lkiconv
.if ${MK_OPENSSL} == "no" .if ${MK_OPENSSL} == "no"
@ -158,6 +159,7 @@ CRUNCH_SRCDIR_ipf= $(.CURDIR)/../../sbin/ipf/ipf
.if ${MK_ZFS} != "no" .if ${MK_ZFS} != "no"
CRUNCH_SRCDIR_zfs= ${.CURDIR}/../../cddl/sbin/zfs CRUNCH_SRCDIR_zfs= ${.CURDIR}/../../cddl/sbin/zfs
CRUNCH_SRCDIR_zpool= ${.CURDIR}/../../cddl/sbin/zpool CRUNCH_SRCDIR_zpool= ${.CURDIR}/../../cddl/sbin/zpool
CRUNCH_SRCDIR_zdb= ${.CURDIR}/../../cddl/usr.sbin/zdb
.endif .endif
CRUNCH_ALIAS_reboot= fastboot halt fasthalt CRUNCH_ALIAS_reboot= fastboot halt fasthalt
CRUNCH_ALIAS_restore= rrestore CRUNCH_ALIAS_restore= rrestore
@ -208,7 +210,7 @@ CRUNCH_ALIAS_id= groups whoami
# #
CRUNCH_SRCDIRS+= usr.sbin CRUNCH_SRCDIRS+= usr.sbin
CRUNCH_PROGS_usr.sbin= chroot CRUNCH_PROGS_usr.sbin+= chroot
CRUNCH_PROGS_usr.sbin+= chown CRUNCH_PROGS_usr.sbin+= chown
CRUNCH_ALIAS_chown= chgrp CRUNCH_ALIAS_chown= chgrp