From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 3 13:31:17 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 2A9FD16A41B; Mon, 3 Sep 2007 13:31:17 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.freebsd.org (Postfix) with ESMTP id 5A03C13C461; Mon, 3 Sep 2007 13:31:12 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.4/8.13.4) with ESMTP id l83DUVot060782; Mon, 3 Sep 2007 17:30:31 +0400 (MSD) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.4/8.13.4/Submit) id l83DUUAr060781; Mon, 3 Sep 2007 17:30:30 +0400 (MSD) (envelope-from yar) Date: Mon, 3 Sep 2007 17:30:30 +0400 From: Yar Tikhiy To: Daniel Eischen Message-ID: <20070903133030.GJ30502@comp.chem.msu.su> References: <20070901073440.GL85633@comp.chem.msu.su> <46DAFE5C.6070806@freebsd.org> <20070903120353.GH30502@comp.chem.msu.su> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.9i Cc: hackers@freebsd.org, Tim Kientzle 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: Mon, 03 Sep 2007 13:31:17 -0000 On Mon, Sep 03, 2007 at 08:36:58AM -0400, Daniel Eischen wrote: > On Mon, 3 Sep 2007, Yar Tikhiy wrote: > > >On Sun, Sep 02, 2007 at 11:18:04AM -0700, Tim Kientzle wrote: > >>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. > >> > >>Oh, my. chown was definitely an oversight. That > >>should have been in there. > >> > >>My opinions: > >> * head, tail, and tee are no-brainers; just do it. > >> * sed would be a nice addition. (I atttempted to > >>fit 'vi' in there, but curses is rather finicky; > >>'sed' would be more useful.) > > > >Thank you for supporting my idea! > > I'm surprised no one has mentioned ftp or fetch. I don't know how > large they would be if static, but if you have to grab some files over > the network, it can be quite convenient. It's just a matter of Someone(tm) building the new rescue with ftp or fetch, testing it, and reporting the size change. ;-) With network setup tools already in /rescue, it sounds as a good idea to consider, at least. The needed code pieces aren't giant: -r-xr-xr-x 1 root wheel 18956 26 ΑΧΗ 03:31 /usr/bin/fetch -r--r--r-- 1 root wheel 54750 26 ΑΧΗ 03:27 /usr/lib/libfetch.a But the crypto bits may need to be disabled: # ldd /usr/bin/fetch /usr/bin/fetch: libfetch.so.5 => /usr/lib/libfetch.so.5 (0x28080000) libssl.so.5 => /usr/lib/libssl.so.5 (0x2808d000) libcrypto.so.5 => /lib/libcrypto.so.5 (0x280ce000) libc.so.7 => /lib/libc.so.7 (0x28225000) Another option is tftp(1). :-) -- Yar