On Wed, Jan 5, 2011 at 14:33, Adam Tauno Williams <awill...@opengroupware.us> wrote: > On Wed, 2011-01-05 at 13:29 +0100, Ondřej Surý wrote: >> as a part of packaging cyrus-imapd for debian we have talked (and I >> have coded it) about universal tool (like f.e. git has) which will >> support all those commands in $libdir/bin/ directory. > > Does it automatically su to the "cyrus" [or appropriate] user?
It doesn't, but it should be easy to add. >> I have called it /usr/bin/cyrus, but it's not published yet, so if we >> can agree on a need to have such command (and since there is several >> name clash if the cyrus binaries are installed into /usr/bin I think >> it's good idea to have such command). >> I would be happy to recode this into something more universal than >> just a wrapper script to call /usr/lib/cyrus/bin/<command> so new >> commands (like make_sha1) could be implemented directly as a >> subcommand of this universal tool - with fallback to calling external >> commands. (Look at git source it has a nice example how to implement >> that.) > > Sounds sweet. Regarding "Look at git source" - in what repository? http://git.kernel.org/?p=git/git.git;a=blob;f=git.c;h=68334f6a3134bb76a8ffc59e4da773400c59a388;hb=HEAD Look for handle_internal_command function. Ondrej -- Ondřej Surý <ond...@sury.org>