From 5710d9a60690656e5d820ef24acce7f104c842a1 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 5 Apr 2011 14:57:22 +0200 Subject: [PATCH] delay __package_openbsd_pkg / wait for input of justastudent Signed-off-by: Nico Schottelius --- .../explorer/pkg_version | 30 ----------- .../type/__package_openbsd_pkg/gencode-remote | 52 ------------------ conf/type/__package_openbsd_pkg/man.text | 53 ------------------- .../__package_openbsd_pkg/parameter/optional | 1 - .../__package_openbsd_pkg/parameter/required | 1 - 5 files changed, 137 deletions(-) delete mode 100755 conf/type/__package_openbsd_pkg/explorer/pkg_version delete mode 100755 conf/type/__package_openbsd_pkg/gencode-remote delete mode 100644 conf/type/__package_openbsd_pkg/man.text delete mode 100644 conf/type/__package_openbsd_pkg/parameter/optional delete mode 100644 conf/type/__package_openbsd_pkg/parameter/required diff --git a/conf/type/__package_openbsd_pkg/explorer/pkg_version b/conf/type/__package_openbsd_pkg/explorer/pkg_version deleted file mode 100755 index 4f612423..00000000 --- a/conf/type/__package_openbsd_pkg/explorer/pkg_version +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -# -# 2011 Nico Schottelius (nico-cdist at schottelius.org) -# -# 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 . -# -# -# Retrieve the status of a package - parsed dpkg output -# - -if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" -else - name="$__object_id" -fi - -pacman -Q "$name" 2>/dev/null | awk '{ print $2 }' diff --git a/conf/type/__package_openbsd_pkg/gencode-remote b/conf/type/__package_openbsd_pkg/gencode-remote deleted file mode 100755 index 536b7708..00000000 --- a/conf/type/__package_openbsd_pkg/gencode-remote +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -# -# 2011 Nico Schottelius (nico-cdist at schottelius.org) -# -# 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 . -# -# -# Manage packages with Pacman (mostly archlinux) -# - -# Debug -# exec >&2 -# set -x - -pacopts="--noconfirm --noprogressbar" - -if [ -f "$__object/parameter/name" ]; then - name="$__object/parameter/name" -else - name="$__object_id" -fi - -state="$(cat "$__object/parameter/state")" -pkg_version="$(cat "$__object/explorer/pkg_version")" - -case "$state" in - installed) - - # Empty? Not installed. - if [ -z "$pkg_version" ]; then - echo pacman "$pacopts" -S \"$name\" - fi - ;; - uninstalled) - if [ "$pkg_version" ]; then - echo pacman "$pacopts" -R \"$name\" - fi - ;; -esac diff --git a/conf/type/__package_openbsd_pkg/man.text b/conf/type/__package_openbsd_pkg/man.text deleted file mode 100644 index 35a7e44c..00000000 --- a/conf/type/__package_openbsd_pkg/man.text +++ /dev/null @@ -1,53 +0,0 @@ -cdist-type__package_pacman(7) -============================= -Nico Schottelius - - -NAME ----- -cdist-type__package_pacman - Manage packages with pacman - - -DESCRIPTION ------------ -Pacman is usually used on the Archlinux distribution to manage -packages. - - -REQUIRED PARAMETERS -------------------- -state:: - Either "installed" or "deinstalled". - - -OPTIONAL PARAMETERS -------------------- -name:: - If supplied, use the name and not the object id as the package name. - - -EXAMPLES --------- - --------------------------------------------------------------------------------- -# Ensure zsh in installed -__package_pacman zsh --state installed - -# If you don't want to follow pythonX packages, but always use python -__package_pacman python --state installed --name python2 - -# Remove obsolete package -__package_pacman puppet --state deinstalled --------------------------------------------------------------------------------- - - -SEE ALSO --------- -- cdist-type(7) -- cdist-type__package(7) - - -COPYING -------- -Copyright \(C) 2011 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/conf/type/__package_openbsd_pkg/parameter/optional b/conf/type/__package_openbsd_pkg/parameter/optional deleted file mode 100644 index f121bdbf..00000000 --- a/conf/type/__package_openbsd_pkg/parameter/optional +++ /dev/null @@ -1 +0,0 @@ -name diff --git a/conf/type/__package_openbsd_pkg/parameter/required b/conf/type/__package_openbsd_pkg/parameter/required deleted file mode 100644 index ff72b5c7..00000000 --- a/conf/type/__package_openbsd_pkg/parameter/required +++ /dev/null @@ -1 +0,0 @@ -state