From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25265 invoked from network); 13 Dec 1999 12:10:39 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 13 Dec 1999 12:10:39 -0000 Received: (qmail 29972 invoked by alias); 13 Dec 1999 12:10:35 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9016 Received: (qmail 29965 invoked from network); 13 Dec 1999 12:10:34 -0000 Subject: Re: PATCH: chown and chgrp in files module In-Reply-To: from James Antill at "Dec 9, 1999 6:40:43 pm" To: james@and.org Date: Mon, 13 Dec 1999 12:10:32 +0000 (GMT) Cc: zefram@fysh.org, jimkirk@uwyo.edu, zsh-workers@sunsite.auc.dk X-Mailer: ELM [version 2.4ME+ PL48 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: From: Zefram James Antill wrote: > Which begs the question, who's working on the C compiler ?:) Actually, the friend that asked for builtin chown started off asking for tar as a builtin (the aim being to restore the system from tape backup using only the running root shell). Once I pointed at zftp he conceded that zftp plus builtins for ln, chown and chmod (next thing for me to do) would be sufficient. Actually, I think we need mknod too. mount and umount wouldn't be a bad idea, although somewhat system-dependent. And halt and reboot would be nice... hmm, maybe we need an admintools module. Anyway, the thing about tar got me thinking, maybe GNU tar could be modified so that it can be compiled as a zsh module. Certain other tools may be worth modifying this way too. Not gcc, I think. I remember one of the other free shells -- I think it was ash -- had a way of doing its builtins so that they could also be compiled as standalone programs. With such a well-defined interface, we could probably produce some automated way to compile a group of ash builtins as a zsh module. >ObZsh: Would it be possible to have a statically linked sys-admin >shell built as part of the build process. Then you could literally >just have it[1] on a floppy and boot Linux with init=/bin/zsh_admin. You can do that manually already. Set LDFLAGS for static linking when you configure, and edit Src/xmods.conf to list all (and only) the modules that you want to link in. You shouldn't need to do --disable-dynamic; module loading won't work with static linking anyway, and configure will detect that. Another thing I'd like to do is to make that easier: a configure switch to change LDFLAGS to do static linking, and another switch to control which modules get linked in and which get autoloaded. Then one could build an admin zsh from a script just as readily as one can build the normal zsh. Come to think of it, a shorthand configure switch --enable-admin-config to do all of that would be a good idea. -zefram