Skip to content

Commit

Permalink
(MAINT) deprecate ntp_dirname function
Browse files Browse the repository at this point in the history
The dirname function is part of stdlib 4.6 which is already depended upon.
  • Loading branch information
DavidS committed Aug 27, 2015
1 parent cd29227 commit f3907ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/puppet/parser/functions/ntp_dirname.rb
Expand Up @@ -7,6 +7,8 @@ module Puppet::Parser::Functions
raise(Puppet::ParseError, "ntp_dirname(): Wrong number of arguments " +
"given (#{arguments.size} for 1)") if arguments.size < 1

warning("ntp_dirname(): this function is deprecated and will be removed at a later time.")

path = arguments[0]
return File.dirname(path)
end
Expand Down
2 changes: 1 addition & 1 deletion manifests/config.pp
Expand Up @@ -2,7 +2,7 @@
class ntp::config inherits ntp {

if $ntp::keys_enable {
$directory = ntp_dirname($ntp::keys_file)
$directory = dirname($ntp::keys_file)
file { $directory:
ensure => directory,
owner => 0,
Expand Down

0 comments on commit f3907ff

Please sign in to comment.