Add some essential tools to rescue(8) in order to make it

a versatile emergency tool:

o sed(1) as a multi-purpose text filter -- can do grep's job and much more.
o head(1), tail(1), and tee(1) as idiomatic text filters.
o mt(1) to control tape drives (PR misc/98383).
o chown(8) aka chgrp(8) to complement the ch* subset.
o pkill(1) aka pgrep(1) to control running processes easily and thus to be
  able to recover from a serious problem or a fatal typo in an otherwise live
  system w/o a reboot.  (It also deserves adding to rescue(8) for its having
  triggered a latent bug in crunchgen(1), but we had better add a regression
  test for that. :-)

The resulting change in rescue(8) size has the following order of magnitude
on i386: 3787656 - 3727872 = 59784, i.e. just a tad.

Discussed on:   -hackers (I seem to have wearied all opponents :-)
PR:             misc/98383
This commit is contained in:
Yaroslav Tykhiy 2007-10-27 18:18:58 +00:00
parent fab2013cb7
commit eb4e404868
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=173073

View File

@ -85,6 +85,10 @@ CRUNCH_ALIAS_ln= link
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_BUILDOPTS_dhclient= -DRELEASE_CRUNCH -Dlint
#
CRUNCH_SRCDIRS+= usr.bin
CRUNCH_PROGS_usr.bin= head mt sed tail tee
CRUNCH_PROGS_usr.bin+= gzip
CRUNCH_ALIAS_gzip= gunzip gzcat zcat
@ -211,7 +217,10 @@ CRUNCH_ALIAS_id= groups whoami
#
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