bin/125878: Add zfs/zpool to rescue programs.
Norikatsu Shigemura
nork at FreeBSD.org
Tue Jul 22 17:30:02 UTC 2008
>Number: 125878
>Category: bin
>Synopsis: Add zfs/zpool to rescue programs.
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Tue Jul 22 17:30:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Norikatsu Shigemura
>Release: FreeBSD 8.0-CURRENT i386
>Organization:
Personal
>Environment:
System: FreeBSD melfina.ninth-nine.com 8.0-CURRENT FreeBSD 8.0-CURRENT #66: Sun Jul 20 07:29:09 JST 2008 nork at melfina.ninth-nine.com:/usr/obj/usr/src/sys/MELFINA i386
>Description:
When fixit on zfs environment with single user mode or liveFS,
to trouble-shoot zfs related issue, I think that zfs and zpool
commands should be installed in /rescue.
>How-To-Repeat:
N/A, but I rarely used static link version zfs and zpool:-).
Because I missed zpool import, so I broke libc.so, libutil.so
and many shared libraries:-(.
>Fix:
I hope to MFC to 7-stable, too.
--- patch begins here ---
--- rescue/rescue/Makefile.orig 2008-06-26 11:57:33.932668000 +0900
+++ rescue/rescue/Makefile 2008-07-20 21:59:16.108381889 +0900
@@ -72,7 +72,7 @@
CRUNCH_PROGS_bin= cat chflags chio chmod cp date dd df echo \
ed expr getfacl hostname kenv kill ln ls mkdir mv pax ps pwd \
realpath rm rmdir setfacl sh stty sync test
-CRUNCH_LIBS+= -lcrypt -ledit -lkvm -ll -lm -ltermcap -lutil
+CRUNCH_LIBS+= -lcrypt -ledit -lkvm -ll -ltermcap -lutil
.if ${MK_OPENSSL} != "no"
CRUNCH_LIBS+= -lcrypto
.endif
@@ -135,6 +135,11 @@
CRUNCH_PROGS_sbin+= ipf
.endif
+.if ${MK_ZFS} != "no"
+CRUNCH_PROGS_sbin+= zfs
+CRUNCH_PROGS_sbin+= zpool
+.endif
+
# crunchgen does not like C++ programs; this should be fixed someday
# CRUNCH_PROGS+= devd
@@ -142,6 +147,9 @@
.if ${MK_IPX} != "no"
CRUNCH_LIBS+= -lipx
.endif
+.if ${MK_ZFS} != "no"
+CRUNCH_LIBS+= -lzfs -lnvpair -luutil -lavl
+.endif
CRUNCH_LIBS+= -lgeom -lbsdxml -lkiconv -lmd -lreadline -lsbuf -lufs -lz
.if ${MACHINE_ARCH} == "i386"
@@ -179,6 +187,10 @@
CRUNCH_SRCDIR_ilmid= $(.CURDIR)/../../sbin/atm/ilmid
CRUNCH_SRCDIR_rtquery= $(.CURDIR)/../../sbin/routed/rtquery
CRUNCH_SRCDIR_ipf= $(.CURDIR)/../../sbin/ipf/ipf
+.if ${MK_ZFS} != "no"
+CRUNCH_SRCDIR_zfs= ${.CURDIR}/../../cddl/sbin/zfs
+CRUNCH_SRCDIR_zpool= ${.CURDIR}/../../cddl/sbin/zpool
+.endif
CRUNCH_ALIAS_reboot= fastboot halt fasthalt
CRUNCH_ALIAS_restore= rrestore
CRUNCH_ALIAS_dump= rdump
@@ -223,6 +235,9 @@
CRUNCH_ALIAS_chown= chgrp
##################################################################
+CRUNCH_LIBS+= -lm
+
+##################################################################
# The following is pretty nearly a generic crunchgen-handling makefile
#
--- patch begins here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list