Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#8 exit codes

closed
None
5
2006-12-15
2005-10-25
Marc Haber
No

This is from the Debian BTS,
http://bugs.debian.org/226138

Executive Summary: Have meaningful exit codes,
and document them

Aide should return different error statuses
depending on whether differences were found.
Since aide always generates output now, and the
exit status is meaningless, in the present situation I
have to go parse the output to determine whether
any checksums changed or not.
Here's some terminal dialogue illustrating the
problem. The error is highlighted with "<<<".

lobus:/tmp> cat aide.conf
database=file:/tmp/aide.db
database_new=file:/tmp/aide.db.new
database_out=file:/tmp/aide.db.new
@@define MAILTO root
@@define LINES 1000
Binlib = p+i+n+u+g+s+b+m+c+md5+sha1
/tmp/foo Binlib
lobus:/tmp> aide -c aide.conf --init

AIDE, version 0.10

### AIDE database initialized.

lobus:/tmp> aide -c aide.conf --check

AIDE, version 0.10

### All files match AIDE database. Looks okay!

lobus:/tmp> echo $status
0
lobus:/tmp> echo bozzo > /tmp/foo/bozzo
lobus:/tmp> aide -c aide.conf --check
AIDE found differences between database and
filesystem!!
Start timestamp: 2004-01-04 10:17:06
Summary:
Total number of files=6,added files=1,removed
files=0,changed files=1

Added files:
added:/tmp/foo/bozzo
Changed files:
changed:/tmp/foo
Detailed information about changes:

Directory: /tmp/foo
Mtime : 2004-01-04 10:13:44 ,
2004-01-04 10:17:04
Ctime : 2004-01-04 10:13:44 ,
2004-01-04 10:17:04
lobus:/tmp> echo $status
0 <<< Should have ben nonzero

Discussion

    • assigned_to: nobody --> rvdb
    • status: open --> pending
     
  • Logged In: YES
    user_id=330646
    Originator: NO

    I believe this request has been implemented in the CVS version.

     
    • status: pending --> closed
     
  • Logged In: YES
    user_id=1312539
    Originator: NO

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).