From bf27a177da2003dfce098daff2c219bdf06792da Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ramon=20Salvad=C3=B3?= <rsalvado@gnuine.com>
Date: Tue, 26 Apr 2011 14:40:43 +0200
Subject: [PATCH] Added __timezone type (allows configuration of your localtime
 timezone)

---
 conf/type/__timezone/man.text | 46 +++++++++++++++++++++++++++++++++++
 conf/type/__timezone/manifest | 26 ++++++++++++++++++++
 2 files changed, 72 insertions(+)
 create mode 100644 conf/type/__timezone/man.text
 create mode 100755 conf/type/__timezone/manifest

diff --git a/conf/type/__timezone/man.text b/conf/type/__timezone/man.text
new file mode 100644
index 00000000..85dac1fa
--- /dev/null
+++ b/conf/type/__timezone/man.text
@@ -0,0 +1,46 @@
+cdist-type__timezone(7)
+=======================
+Ramon Salvadó - rsalvado at gnuine dot com
+
+
+NAME
+----
+cdist-type__timezone - Allows to configure the desired localtime timezone.
+
+
+DESCRIPTION
+-----------
+This type creates a symlink (/etc/localtime) to the selected timezone (which should be available in /usr/share/zoneinfo).
+
+
+REQUIRED PARAMETERS
+-------------------
+None.
+
+
+OPTIONAL PARAMETERS
+-------------------
+None.
+
+
+EXAMPLES
+--------
+
+--------------------------------------------------------------------------------
+#Set up Europe/Andorra as our timezone.
+__timezone Europe/Andorra
+
+#Set up US/Central as our timezone.
+__timezone US/Central
+--------------------------------------------------------------------------------
+
+
+SEE ALSO
+--------
+- cdist-type(7)
+
+
+COPYING
+-------
+Free use of this software is
+granted under the terms of the GNU General Public License version 3 (GPLv3).
diff --git a/conf/type/__timezone/manifest b/conf/type/__timezone/manifest
new file mode 100755
index 00000000..f2d064e8
--- /dev/null
+++ b/conf/type/__timezone/manifest
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# 2011 Ramon Salvadó (rsalvado at gnuine dot com)
+#
+# This file is part of cdist.
+#
+# cdist is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# cdist is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with cdist. If not, see <http://www.gnu.org/licenses/>.
+#
+#
+# This type allows to configure the desired localtime timezone.
+
+timezone="$__object_id"
+
+__package tzdata --state installed
+__link /etc/localtime --source /usr/share/zoneinfo/${timezone} --type symbolic