From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 1 13:30:31 2007 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC0CB16A418 for ; Sat, 1 Sep 2007 13:30:31 +0000 (UTC) (envelope-from jhs@berklix.org) Received: from thin.berklix.org (thin.berklix.org [194.246.123.68]) by mx1.freebsd.org (Postfix) with ESMTP id 6775913C457 for ; Sat, 1 Sep 2007 13:30:31 +0000 (UTC) (envelope-from jhs@berklix.org) Received: from js.berklix.net (p549A6A1A.dip.t-dialin.net [84.154.106.26]) (authenticated bits=128) by thin.berklix.org (8.12.11/8.12.11) with ESMTP id l81Co1rb048796; Sat, 1 Sep 2007 14:50:04 +0200 (CEST) (envelope-from jhs@berklix.org) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by js.berklix.net (8.13.6/8.13.6) with ESMTP id l81CeTRJ007779; Sat, 1 Sep 2007 14:44:29 +0200 (CEST) (envelope-from jhs@berklix.org) Received: from fire.js.berklix.net (localhost.js.berklix.net [127.0.0.1]) by fire.js.berklix.net (8.13.8/8.13.8) with ESMTP id l81CeTKd056036; Sat, 1 Sep 2007 14:40:29 +0200 (CEST) (envelope-from jhs@fire.js.berklix.net) Message-Id: <200709011240.l81CeTKd056036@fire.js.berklix.net> To: Yar Tikhiy From: "Julian Stacey" Organization: http://berklix.com BSD Unix Linux Consultancy, Munich/Muenchen. User-agent: EXMH on FreeBSD http://berklix.com/free/ X-URL: http://berklix.com In-reply-to: Your message "Sat, 01 Sep 2007 11:34:40 +0400." <20070901073440.GL85633@comp.chem.msu.su> Date: Sat, 01 Sep 2007 14:40:29 +0200 Sender: jhs@berklix.org Cc: hackers@freebsd.org Subject: Re: Useful tools missing from /rescue X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Sep 2007 13:30:32 -0000 Reference: > From: Yar Tikhiy > Date: Sat, 1 Sep 2007 11:34:40 +0400 > Message-id: <20070901073440.GL85633@comp.chem.msu.su> Yar Tikhiy wrote: > 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 Don't do it without approval of re@ (who might be too busy just now anyway) It might blow the limit on the tight packed rescue floppy. (& though desk workstations have CDs, lost of small boxes still just have floppies for rescue) Best try to build a rescue floppy yourself before adding bloat. BTW I've never used pgrep thus superfluous to rescue. Others also not really needed, merely nice. True rescue is just to fix FS at which point you can mount other FS or CDROM or NFS etc for more tools. Before anyone else might discuss which tools might be nice, I'd suggest build yourself a FIXIT floppy, & see what space is left, & what you'd have to chuck out to make space for what you want to add. > 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 > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > -- Julian Stacey. Munich Computer Consultant, BSD Unix C Linux. http://berklix.com Ihr Rauch=mein allergischer Kopfschmerz. Dump cigs 4 snuff.