Bug 125878 - [patch] [request] Add zfs/zpool to rescue programs.
Summary: [patch] [request] Add zfs/zpool to rescue programs.
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 8.0-CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: Gavin Atkinson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-22 18:30 UTC by Norikatsu Shigemura
Modified: 2013-03-17 04:33 UTC (History)
0 users

See Also:


Attachments
patch (1.66 KB, patch)
2008-07-22 18:30 UTC, Norikatsu Shigemura
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Norikatsu Shigemura freebsd_committer freebsd_triage 2008-07-22 18:30:01 UTC
	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.

Fix: I hope to MFC to 7-stable, too.

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:-(.
Comment 1 Norikatsu Shigemura freebsd_committer freebsd_triage 2008-07-23 04:54:43 UTC
Responsible Changed
From-To: freebsd-bugs->pjd

Over to ZFS specialist.
Comment 2 K. Macy freebsd_committer freebsd_triage 2009-05-23 01:25:30 UTC
Responsible Changed
From-To: nork->kmacy



this seems to have been forgotten, pick up for the benefit of ZFS root users
Comment 3 dfilter service freebsd_committer freebsd_triage 2009-05-23 01:47:36 UTC
Author: kmacy
Date: Sat May 23 00:47:23 2009
New Revision: 192617
URL: http://svn.freebsd.org/changeset/base/192617

Log:
  Add zfs/zpool to rescue programs
  
  PR:		bin/125878
  Submitted by:	nork@
  MFC after:	3 days

Modified:
  head/rescue/rescue/Makefile

Modified: head/rescue/rescue/Makefile
==============================================================================
--- head/rescue/rescue/Makefile	Sat May 23 00:40:17 2009	(r192616)
+++ head/rescue/rescue/Makefile	Sat May 23 00:47:23 2009	(r192617)
@@ -72,7 +72,7 @@ CRUNCH_SRCDIRS+= bin
 CRUNCH_PROGS_bin= cat chflags chio chmod cp date dd df echo 	\
 	 ed expr getfacl hostname kenv kill ln ls mkdir mv	\
 	 pkill 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
 
 # Additional options for specific programs
 CRUNCH_ALIAS_test= [
@@ -128,6 +128,10 @@ CRUNCH_PROGS_sbin+= ping6
 .if ${MK_IPFILTER} != "no"
 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
@@ -136,6 +140,9 @@ CRUNCH_LIBS+= -lalias -lcam -lcurses -ld
 .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"
@@ -173,6 +180,10 @@ CRUNCH_SRCDIR_fore_dnld= $(.CURDIR)/../.
 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
@@ -218,6 +229,8 @@ CRUNCH_PROGS_usr.sbin= chroot
 
 CRUNCH_PROGS_usr.sbin+= chown
 CRUNCH_ALIAS_chown= chgrp
+##################################################################
+CRUNCH_LIBS+= -lm
 
 ##################################################################
 #  The following is pretty nearly a generic crunchgen-handling makefile
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 4 K. Macy freebsd_committer freebsd_triage 2009-05-23 01:53:50 UTC
State Changed
From-To: open->patched


patch committed
Comment 5 Gavin Atkinson freebsd_committer freebsd_triage 2011-05-29 23:30:25 UTC
Responsible Changed
From-To: kmacy->closed

This was fixed in HEAD and merged to stable/7.  Nothing more to do.
Comment 6 Gavin Atkinson freebsd_committer freebsd_triage 2011-05-30 00:03:33 UTC
State Changed
From-To: patched->closed

This was fixed in HEAD and merged to stable/7.  Nothing more to do. 


Comment 7 Gavin Atkinson freebsd_committer freebsd_triage 2011-05-30 00:03:33 UTC
Responsible Changed
From-To: closed->gavin

Oops.
Comment 8 Pawel Jakub Dawidek freebsd_committer freebsd_triage 2014-06-01 06:50:24 UTC
Responsible Changed
From-To: pjd->nork

Norikatsu, I fully agree that having zpool and zfs utilities in 
/rescue/ is very desired, but I'm not setup to test it right now. 
Could you handle the commit? I fully support the idea, so feel free 
to put me in approved by line.