Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Sep 2007 11:34:40 +0400
From:      Yar Tikhiy <yar@comp.chem.msu.su>
To:        hackers@freebsd.org
Subject:   Useful tools missing from /rescue
Message-ID:  <20070901073440.GL85633@comp.chem.msu.su>

next in thread | raw e-mail | index | archive | help
Hi all,

I've had to use /rescue recently and felt lack of a few basic tools
in it, namely pgrep(1), head(1), tail(1), tee(1), and a text filter,
e.g., sed(1).  Well, in fact most functionality of pgrep(1), head(1),
tail(1), and even tee(1) can be emulated if one has sed(1), but the
tools are so tiny and convenient that it's a pity not to have them
all handy during hard times.

In addition, there are chflags and chmod in /rescue, but there's
no chown in it, so the toolset is a bit incomplete.

Would anyone mind if I add those tools to /rescue?  The size growth
will be rather small:

-r-xr-xr-x  121 root  wheel  3715096  1 ΣΕΞ 10:22 /mnt2/rescue.old/rescue
-r-xr-xr-x  129 root  wheel  3761828  1 ΣΕΞ 11:22 /mnt2/rescue/rescue

The patch is attached.

Thanks!

-- 
Yar

--- //depot/vendor/freebsd/src/rescue/rescue/Makefile	2007/07/14 22:47:42
+++ //depot/user/yar/hack/rescue/rescue/Makefile	2007/09/01 07:28:25
@@ -85,6 +85,10 @@
 CRUNCH_ALIAS_rm= unlink
 CRUNCH_ALIAS_ed= red
 
+CRUNCH_PROGS_bin+= pkill
+CRUNCH_SRCDIR_pkill= ${.CURDIR}/../../usr.bin/pkill
+CRUNCH_ALIAS_pkill= pgrep
+
 .if ${MK_RCMDS} != "no"
 CRUNCH_PROGS_bin+= rcp
 .endif
@@ -190,6 +194,8 @@
 # 
 CRUNCH_SRCDIRS+= usr.bin
 
+CRUNCH_PROGS_usr.bin= head sed tail tee
+
 CRUNCH_PROGS_usr.bin+= gzip
 CRUNCH_ALIAS_gzip= gunzip gzcat zcat
 
@@ -211,7 +217,10 @@
 # 
 CRUNCH_SRCDIRS+= usr.sbin
 
-CRUNCH_PROGS_usr.sbin+= chroot
+CRUNCH_PROGS_usr.sbin= chroot
+
+CRUNCH_PROGS_usr.sbin+= chown
+CRUNCH_ALIAS_chown= chgrp
 
 ##################################################################
 #  The following is pretty nearly a generic crunchgen-handling makefile



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070901073440.GL85633>