Adding Solaris Support for puppet-timezone

11 views
Skip to first unread message

Sean Alderman

unread,
Jul 31, 2013, 11:42:08 AM7/31/13
to example42-pu...@googlegroups.com
Al,
  I've forked puppet-timezone and am working adding Solaris.  There seems to be a platform difference between sparc and x86 on setting timezone info.  There is a command rtc on x86 which is used to fix the real time clock to the timezone, but this command isn't necessary on sparc platforms.  As such, there is no need to run the "real_set_timezone_command" on sparc.  Would you propose an acceptable means of skipping the execution of this command on a sparc platform?

  I was considering wrapping the exec resource around an if $::hardwareisa statement in init.pp, but I defer to your suggestion.  Sadly it appears the proper way to assert the timezone on a sparc is just set the file and reboot.

if $::hardwareisa != 'sparc' {
  exec { 'set-timezone':
    command     => $timezone::real_set_timezone_command,
    path        => '/usr/bin:/usr/sbin:/bin:/sbin',
    require     => File['timezone'],
    subscribe   => File['timezone'],
    refreshonly => true,
  }
}

  What do you think?

Thanks!

Alessandro Franceschi

unread,
Jul 31, 2013, 1:59:29 PM7/31/13
to example42-pu...@googlegroups.com
Hi Sean,
your proposed approach makes sense for me, eventually add something like 
if $::hardwareisa != 'sparc' and $kernel != 'sunos'  {

to be sure to confine it to Solaris on Sparc only.

Thanks,
al
Reply all
Reply to author
Forward
0 new messages