From a271244cfb77aa7a70ac2af836fcdc7aa4fa41c4 Mon Sep 17 00:00:00 2001 From: Daniel Heule Date: Fri, 6 Dec 2013 15:23:09 +0100 Subject: [PATCH] Die 4 codepaths mit comments erklaert ... --- cdist/conf/type/__zypper_repo/gencode-remote | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cdist/conf/type/__zypper_repo/gencode-remote b/cdist/conf/type/__zypper_repo/gencode-remote index 4698582e..4d834c47 100644 --- a/cdist/conf/type/__zypper_repo/gencode-remote +++ b/cdist/conf/type/__zypper_repo/gencode-remote @@ -73,21 +73,25 @@ case "$state" in exit 4 fi if [ -z "$repo_id" ]; then + # Repo not present, so we need to create it echo zypper $zypper_def_opts addrepo "'$uri'" "'$desc'" fi ;; absent) if [ ! -z "$act_id" ]; then + # Repo present (act_id not ""), so we ned to delete it echo zypper $zypper_def_opts removerepo "$act_id" fi ;; enabled) if [ ! -z "$act_id" ] && [ "$repostate" = "disabled" ]; then + # Repo present (act_id not "") and repostate not enabled, so a enable call is needed echo zypper $zypper_def_opts modifyrepo -e "$act_id" fi ;; disabled) if [ ! -z "$act_id" ] && [ "$repostate" = "enabled" ]; then + # Repo present (act_id not "") and repostate enabled, so a disable call is needed echo zypper $zypper_def_opts modifyrepo -d "$act_id" fi ;;