Merge branch 'fix/type/__timezone/singleton' into 'master'
__timezone: Make singleton See merge request ungleich-public/cdist!916
This commit is contained in:
commit
f5b534df71
5 changed files with 17 additions and 10 deletions
|
@ -22,7 +22,7 @@
|
||||||
# This type allows to configure the desired localtime timezone.
|
# This type allows to configure the desired localtime timezone.
|
||||||
|
|
||||||
timezone_is=$(cat "$__object/explorer/timezone_is")
|
timezone_is=$(cat "$__object/explorer/timezone_is")
|
||||||
timezone_should="$__object_id"
|
timezone_should=$(cat "$__object/parameter/tz")
|
||||||
os=$(cat "$__global/explorer/os")
|
os=$(cat "$__global/explorer/os")
|
||||||
|
|
||||||
if [ "$timezone_is" = "$timezone_should" ]; then
|
if [ "$timezone_is" = "$timezone_should" ]; then
|
||||||
|
|
|
@ -14,7 +14,8 @@ This type creates a symlink (/etc/localtime) to the selected timezone
|
||||||
|
|
||||||
REQUIRED PARAMETERS
|
REQUIRED PARAMETERS
|
||||||
-------------------
|
-------------------
|
||||||
None.
|
tz
|
||||||
|
The name of timezone to set.
|
||||||
|
|
||||||
|
|
||||||
OPTIONAL PARAMETERS
|
OPTIONAL PARAMETERS
|
||||||
|
@ -28,18 +29,23 @@ EXAMPLES
|
||||||
.. code-block:: sh
|
.. code-block:: sh
|
||||||
|
|
||||||
# Set up Europe/Andorra as our timezone.
|
# Set up Europe/Andorra as our timezone.
|
||||||
__timezone Europe/Andorra
|
__timezone --tz Europe/Andorra
|
||||||
|
|
||||||
# Set up US/Central as our timezone.
|
# Set up US/Central as our timezone.
|
||||||
__timezone US/Central
|
__timezone --tz US/Central
|
||||||
|
|
||||||
|
|
||||||
AUTHORS
|
AUTHORS
|
||||||
-------
|
-------
|
||||||
Ramon Salvadó <rsalvado--@--gnuine--dot--com>
|
| Steven Armstrong <steven-cdist--@--armstrong.cc>
|
||||||
|
| Nico Schottelius <nico-cdist--@--schottelius.org>
|
||||||
|
| Ramon Salvadó <rsalvado--@--gnuine--dot--com>
|
||||||
|
| Dennis Camera <dennis.camera--@--ssrq-sds-fds.ch>
|
||||||
|
|
||||||
|
|
||||||
COPYING
|
COPYING
|
||||||
-------
|
-------
|
||||||
Free use of this software is
|
Copyright \(C) 2012-2020 the `AUTHORS`_. You can redistribute it
|
||||||
granted under the terms of the GNU General Public License version 3 (GPLv3).
|
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.
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#
|
#
|
||||||
# This type allows to configure the desired localtime timezone.
|
# This type allows to configure the desired localtime timezone.
|
||||||
|
|
||||||
timezone="$__object_id"
|
timezone=$(cat "$__object/parameter/tz")
|
||||||
os=$(cat "$__global/explorer/os")
|
os=$(cat "$__global/explorer/os")
|
||||||
|
|
||||||
case "$os" in
|
case "$os" in
|
||||||
|
|
1
cdist/conf/type/__timezone/parameter/required
Normal file
1
cdist/conf/type/__timezone/parameter/required
Normal file
|
@ -0,0 +1 @@
|
||||||
|
tz
|
0
cdist/conf/type/__timezone/singleton
Normal file
0
cdist/conf/type/__timezone/singleton
Normal file
Loading…
Reference in a new issue