Issue #3721 has been updated by Markus Roberts.

I was slow in updating the ticket; this change was pushed to master in 
commit:"584961a82ffbe64c04cb4a7c152f90164274ddb2" for Rowlf.

I'm leaving the ticket open because 1) it isn't in 0.25.x, 2) it isn't clear if 
you thing something else is needed.  The commit that was pushed was:

<pre>
commit 584961a82ffbe64c04cb4a7c152f90164274ddb2
Author: James Turnbull <[email protected]>
Date:   Fri May 14 11:11:05 2010 +1000

    Fixed #3721 - Removed -u option from crontab on HP-UX

diff --git a/lib/puppet/util/filetype.rb b/lib/puppet/util/filetype.rb
index 8e8b8dd..3249810 100755
--- a/lib/puppet/util/filetype.rb
+++ b/lib/puppet/util/filetype.rb
@@ -198,7 +198,7 @@ class Puppet::Util::FileType
         # does not think I should be allowed to set the @path to my own user 
name
         def cmdbase
             cmd = nil
-            if @uid == Puppet::Util::SUIDManager.uid
+            if @uid == Puppet::Util::SUIDManager.uid || 
Facter.value(:operatingsystem) == "HP-UX"
                 return "crontab"
             else
                 return "crontab -u #...@path}"
</pre>




----------------------------------------
Bug #3721: cron issues when specifying user on HP-UX
http://projects.puppetlabs.com/issues/3721

Author: Mark Plaksin
Status: Code Insufficient
Priority: Normal
Assigned to: James Turnbull
Category: cron
Target version: 0.25.6
Affected version: 0.25.4
Keywords: 
Branch: http://github.com/jamtur01/puppet/tree/tickets/0.25.x/3721


Puppet uses 'crontab -u' on HP-UX but HP's crontab doesn't support -u.  For 
example, with this in a file named 'pp':

<pre>
    cron {testcron:
        hour => 7,
        minute => 0,
        command => "echo hi",
        ensure => present,
        user => happy,
    }
</pre>

I get this:

<pre>
# puppet --debug --trace --verbose pp
debug: Failed to load library 'selinux' for feature 'selinux'
debug: Creating default schedules
debug: Failed to load library 'shadow' for feature 'libshadow'
debug: Puppet::Type::User::ProviderPw: file pw does not exist
debug: Failed to load library 'ldap' for feature 'ldap'
debug: Puppet::Type::User::ProviderLdap: feature ldap is missing
debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dscl does 
not exist
debug: Puppet::Type::User::ProviderUser_role_add: file roleadd does not exist
debug: /File[/etc/puppet/ssl/certs/ca.pem]: Autorequiring 
File[/etc/puppet/ssl/certs]
debug: /File[/etc/puppet/ssl/private]: Autorequiring File[/etc/puppet/ssl]
debug: /File[/etc/puppet/ssl/crl.pem]: Autorequiring File[/etc/puppet/ssl]
debug: /File[/etc/puppet/ssl/private_keys]: Autorequiring File[/etc/puppet/ssl]
debug: /File[/etc/puppet/ssl/certs]: Autorequiring File[/etc/puppet/ssl]
debug: /File[/var/puppet/state/classes.txt]: Autorequiring 
File[/var/puppet/state]
debug: /File[/var/puppet/state/graphs]: Autorequiring File[/var/puppet/state]
debug: /File[/var/puppet/state/state.yaml]: Autorequiring 
File[/var/puppet/state]
debug: /File[/etc/puppet/ssl/certificate_requests]: Autorequiring 
File[/etc/puppet/ssl]
debug: /File[/etc/puppet/ssl]: Autorequiring File[/etc/puppet]
debug: /File[/etc/puppet/ssl/private_keys/latte.gabest.usg.edu.pem]: 
Autorequiring File[/etc/puppet/ssl/pri
vate_keys]                                                                      
                          
debug: /File[/var/puppet/run]: Autorequiring File[/var/puppet]
debug: /File[/var/puppet/clientbucket]: Autorequiring File[/var/puppet]
debug: /File[/etc/puppet/ssl/public_keys]: Autorequiring File[/etc/puppet/ssl]
debug: /File[/var/puppet/client_yaml]: Autorequiring File[/var/puppet]
debug: /File[/var/puppet/facts]: Autorequiring File[/var/puppet]
debug: /File[/var/puppet/state]: Autorequiring File[/var/puppet]
debug: /File[/var/puppet/log]: Autorequiring File[/var/puppet]
debug: /File[/var/puppet/lib]: Autorequiring File[/var/puppet]
debug: /File[/etc/puppet/ssl/certs/latte.gabest.usg.edu.pem]: Autorequiring 
File[/etc/puppet/ssl/certs]
debug: Finishing transaction 546441420 with 0 changes
debug: Prefetching crontab resources for cron
info: Applying configuration version '1273006745'
debug: //Cron[testcron]: Changing ensure
debug: //Cron[testcron]: 1 change(s)
notice: //Cron[testcron]/ensure: created
debug: Flushing cron provider target happy
crontab: illegal option -- u
crontab: proper usage is: 
        crontab [file]
        crontab [-e] [username] 
        crontab [-r] [username] 
        crontab [-l] [username] 
debug: Finishing transaction 546265980 with 1 changes
</pre>


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to