DRY: Remove default parameter value handeling in __apt_source

remotes/origin/3.1
Antoine Catton 10 years ago
parent 17afb5f5ad
commit 82f48ef271
  1. 12
      cdist/conf/type/__cdistmarker/gencode-remote
  2. 1
      cdist/conf/type/__cdistmarker/parameter/default/destination
  3. 1
      cdist/conf/type/__cdistmarker/parameter/default/format

@ -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"

Loading…
Cancel
Save