~ubuntu-branches/ubuntu/quantal/puppet/quantal

« back to all changes in this revision

Viewing changes to lib/puppet/type/cron.rb

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-07-14 01:56:30 UTC
  • mfrom: (1.1.29) (3.1.43 sid)
  • Revision ID: package-import@ubuntu.com-20120714015630-ntj41rkvkq4zph4y
Tags: 2.7.18-1ubuntu1
* Resynchronise with Debian. (LP: #1023931) Remaining changes:
  - debian/puppetmaster-passenger.postinst: Make sure we error if puppet
    config print doesn't work
  - debian/puppetmaster-passenger.postinst: Ensure upgrades from
    <= 2.7.11-1 fixup passenger apache configuration.
* Dropped upstreamed patches:
  - debian/patches/CVE-2012-1906_CVE-2012-1986_to_CVE-2012-1989.patch
  - debian/patches/puppet-12844
  - debian/patches/2.7.17-Puppet-July-2012-CVE-fixes.patch
* Drop Build-Depends on ruby-rspec (in universe):
  - debian/control: remove ruby-rspec from Build-Depends
  - debian/patches/no-rspec.patch: make Rakefile work anyway if rspec
    isn't installed so we can use it in debian/rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
87
87
      # if we can lengthen it (e.g., mon => monday).
88
88
      if tmp.length == 3
89
89
        ary.each_with_index { |name, index|
90
 
          if name =~ /#{tmp}/i
 
90
          if tmp.upcase == name[0..2].upcase
91
91
            return index
92
92
          end
93
93
        }
352
352
 
353
353
      The user defaults to whomever Puppet is running as."
354
354
 
355
 
    defaultto { Etc.getpwuid(Process.uid).name || "root" }
 
355
    defaultto {
 
356
      struct = Etc.getpwuid(Process.uid)
 
357
      struct.respond_to?(:name) && struct.name or 'root'
 
358
    }
 
359
  end
 
360
 
 
361
  # Autorequire the owner of the crontab entry.
 
362
  autorequire(:user) do
 
363
    self[:user]
356
364
  end
357
365
 
358
366
  newproperty(:target) do