From 33cc3b0fa2dd66e905cd253b2a89c0bd65a2e54d Mon Sep 17 00:00:00 2001
From: Antoine Catton <devel@antoine.catton.fr>
Date: Sat, 27 Dec 2014 20:47:30 -0700
Subject: [PATCH] DRY: Remove default parameter value handeling in
 __package_pkg_openbsd

---
 cdist/conf/type/__package_pkg_openbsd/gencode-remote        | 6 +-----
 .../conf/type/__package_pkg_openbsd/parameter/default/state | 1 +
 2 files changed, 2 insertions(+), 5 deletions(-)
 create mode 100644 cdist/conf/type/__package_pkg_openbsd/parameter/default/state

diff --git a/cdist/conf/type/__package_pkg_openbsd/gencode-remote b/cdist/conf/type/__package_pkg_openbsd/gencode-remote
index 08e15e89..dea7f711 100755
--- a/cdist/conf/type/__package_pkg_openbsd/gencode-remote
+++ b/cdist/conf/type/__package_pkg_openbsd/gencode-remote
@@ -42,11 +42,7 @@ else
    name="$__object_id"
 fi
 
-if [ -f "$__object/parameter/state" ]; then
-   state_should="$(cat "$__object/parameter/state")"
-else
-   state_should="present"
-fi
+state_should="$(cat "$__object/parameter/state")"
 
 pkg_version="$(cat "$__object/explorer/pkg_version")"
 
diff --git a/cdist/conf/type/__package_pkg_openbsd/parameter/default/state b/cdist/conf/type/__package_pkg_openbsd/parameter/default/state
new file mode 100644
index 00000000..e7f6134f
--- /dev/null
+++ b/cdist/conf/type/__package_pkg_openbsd/parameter/default/state
@@ -0,0 +1 @@
+present