forked from ungleich-public/cdist
DRY: Remove default parameter value handeling in __apt_source
This commit is contained in:
parent
17afb5f5ad
commit
82f48ef271
3 changed files with 4 additions and 10 deletions
|
@ -19,19 +19,11 @@
|
|||
#
|
||||
|
||||
# The marker file is established in the docs, but it isn't obligatory.
|
||||
if [ -f "$__object/parameter/destination" ]; then
|
||||
destination="$(cat "$__object/parameter/destination")"
|
||||
else
|
||||
destination='/etc/cdist-configured'
|
||||
fi
|
||||
destination="$(cat "$__object/parameter/destination")"
|
||||
|
||||
# The basic output of date is usually good enough, but variety is the
|
||||
# spice of life...
|
||||
if [ -f "$__object/parameter/format" ]; then
|
||||
format="$(cat "$__object/parameter/format")"
|
||||
else
|
||||
format='-u'
|
||||
fi
|
||||
format="$(cat "$__object/parameter/format")"
|
||||
|
||||
# Dump the timestamp in UTC to the marker
|
||||
echo "date $format > $destination"
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
/etc/cdist-configured
|
1
cdist/conf/type/__cdistmarker/parameter/default/format
Normal file
1
cdist/conf/type/__cdistmarker/parameter/default/format
Normal file
|
@ -0,0 +1 @@
|
|||
-u
|
Loading…
Reference in a new issue