HomePhorge

(#14283) Raise an error when crontab returns non-zero on AIX
7a7236157e4eUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#14283) Raise an error when crontab returns non-zero on AIX

Previously, the AIX crontab filetype had the same issue as the Sun one,
the :failonfail argument was being set to false, so it would not raise
an error when crontab returned a non-zero exit code. The only time the
filetype raised an exception was if the command output contained the
line: 'You are not authorized to use the cron command'

This commit changes the AIX crontab filetype to raise an exception if
crontab returns a non-zero exit code.

If the user doesn't have any crontab entries, then the #read method
will return an empty string as is done for on Solaris.

If the command failed because the user doesn't have permission, then the
filetype will raise an exception, as it did before.

This commit also adds tests and an AIX crontab fixture.

Details

Provenance
Josh Cooper <josh@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUd9c769880843: (maint) Refactor filetype specs
Branches
Unknown
Tags
Unknown

Event Timeline

Josh Cooper <josh@puppetlabs.com> committed rPU7a7236157e4e: (#14283) Raise an error when crontab returns non-zero on AIX (authored by Josh Cooper <josh@puppetlabs.com>).Aug 14 2012, 6:59 AM