Re: [Dovecot] 'Doveadm user' could use better error codes

2010-12-30 Thread Thomas Leuxner
Am 30.12.2010 um 10:53 schrieb Timo Sirainen: > On Tue, 2010-12-28 at 14:39 +0100, Thomas Leuxner wrote: >> $ doveadm user foo >> userdb lookup: user foo doesn't exist >> $ echo $? >> 0 > > How about: http://hg.dovecot.org/dovecot-2.0/rev/c9b3716e56f7 Looking good. Thanks. PGP.sig Description

Re: [Dovecot] 'Doveadm user' could use better error codes

2010-12-30 Thread Timo Sirainen
On Tue, 2010-12-28 at 14:39 +0100, Thomas Leuxner wrote: > $ doveadm user foo > userdb lookup: user foo doesn't exist > $ echo $? > 0 How about: http://hg.dovecot.org/dovecot-2.0/rev/c9b3716e56f7 signature.asc Description: This is a digitally signed message part

Re: [Dovecot] 'Doveadm user' could use better error codes

2010-12-28 Thread dovecot
On 28-12-10 16:07, David Ford wrote: dovecot, the whole point of his original email is to return a useful error code for the purpose of scripting. :) always returning 0 for both valid and invalid usernames isn't helpful -d OK, But the original mail show an invalid use of the doveadm command

Re: [Dovecot] 'Doveadm user' could use better error codes

2010-12-28 Thread David Ford
dovecot, the whole point of his original email is to return a useful error code for the purpose of scripting. :) always returning 0 for both valid and invalid usernames isn't helpful -d

Re: [Dovecot] 'Doveadm user' could use better error codes

2010-12-28 Thread dovecot
On 28-12-10 15:37, Thomas Leuxner wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 28.12.2010 um 15:34 schrieb dovecot: $ doveadm user dovecot userdb: dovecot system_groups_user: dovecot uid : 114 gid : 114 home : /usr/local/lib/dovecot $ echo $? 0 Nothing new,

Re: [Dovecot] 'Doveadm user' could use better error codes

2010-12-28 Thread Thomas Leuxner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 28.12.2010 um 15:34 schrieb dovecot: > $ doveadm user dovecot > userdb: dovecot > system_groups_user: dovecot > uid : 114 > gid : 114 > home : /usr/local/lib/dovecot > $ echo $? > 0 Nothing new, used a similar example in my fir

Re: [Dovecot] 'Doveadm user' could use better error codes

2010-12-28 Thread dovecot
On 28-12-10 15:23, dovecot wrote: On 28-12-10 14:39, Thomas Leuxner wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The error codes for' doveadm user' should be improved to avoid error handling workarounds when scripting commands: $ dovea

Re: [Dovecot] 'Doveadm user' could use better error codes

2010-12-28 Thread Thomas Leuxner
Am 28.12.2010 um 15:23 schrieb dovecot: > It behaves just as 'man doveadm' promisses. > > EXIT STATUS > doveadm will exit with one of the following values: > > 0 Selected command was executed successful. > > >0 Command failed in some way. > > So, this seems to be correct! W

Re: [Dovecot] 'Doveadm user' could use better error codes

2010-12-28 Thread dovecot
On 28-12-10 14:39, Thomas Leuxner wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The error codes for' doveadm user' should be improved to avoid error handling workarounds when scripting commands: $ doveadm user doveadm user [-a] [-x] […]