forked from ungleich-public/cdist
Die 4 codepaths mit comments erklaert ...
This commit is contained in:
parent
59de2afdaa
commit
a271244cfb
1 changed files with 4 additions and 0 deletions
|
@ -73,21 +73,25 @@ case "$state" in
|
||||||
exit 4
|
exit 4
|
||||||
fi
|
fi
|
||||||
if [ -z "$repo_id" ]; then
|
if [ -z "$repo_id" ]; then
|
||||||
|
# Repo not present, so we need to create it
|
||||||
echo zypper $zypper_def_opts addrepo "'$uri'" "'$desc'"
|
echo zypper $zypper_def_opts addrepo "'$uri'" "'$desc'"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
absent)
|
absent)
|
||||||
if [ ! -z "$act_id" ]; then
|
if [ ! -z "$act_id" ]; then
|
||||||
|
# Repo present (act_id not ""), so we ned to delete it
|
||||||
echo zypper $zypper_def_opts removerepo "$act_id"
|
echo zypper $zypper_def_opts removerepo "$act_id"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
enabled)
|
enabled)
|
||||||
if [ ! -z "$act_id" ] && [ "$repostate" = "disabled" ]; then
|
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"
|
echo zypper $zypper_def_opts modifyrepo -e "$act_id"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
disabled)
|
disabled)
|
||||||
if [ ! -z "$act_id" ] && [ "$repostate" = "enabled" ]; then
|
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"
|
echo zypper $zypper_def_opts modifyrepo -d "$act_id"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue