forked from ungleich-public/cdist
gencode-remote gibt nur noch befehle aus wenn was zu tun ist ...
This commit is contained in:
parent
72bbf93282
commit
e1a2ebab5c
1 changed files with 9 additions and 4 deletions
|
@ -51,8 +51,6 @@ else
|
|||
state="present"
|
||||
fi
|
||||
|
||||
all_repo_ids="$(cat "$__object/explorer/all_repo_ids")"
|
||||
enabled_repo_ids="$(cat "$__object/explorer/enabled_repo_ids")"
|
||||
repo_id="$(cat "$__object/explorer/repo_id")"
|
||||
|
||||
act_id=""
|
||||
|
@ -62,6 +60,13 @@ elif grep -q "$repo_id" "$__object/explorer/all_repo_ids"; then
|
|||
act_id="$repo_id"
|
||||
fi
|
||||
|
||||
if grep -q "$act_id" "$__object/explorer/enabled_repo_ids"; then
|
||||
state="enabled"
|
||||
else
|
||||
state="disabled"
|
||||
fi
|
||||
|
||||
|
||||
case "$state" in
|
||||
present)
|
||||
if [ -z "$desc" ] || [ -z "$uri" ]; then
|
||||
|
@ -78,12 +83,12 @@ case "$state" in
|
|||
fi
|
||||
;;
|
||||
enabled)
|
||||
if [ ! -z "$act_id" ]; then
|
||||
if [ ! -z "$act_id" ] && [ "$state" = "disabled" ]; then
|
||||
echo zypper $zypper_def_opts modifyrepo -e "$act_id"
|
||||
fi
|
||||
;;
|
||||
disabled)
|
||||
if [ ! -z "$act_id" ]; then
|
||||
if [ ! -z "$act_id" ] && [ "$state" = "disabled" ]; then
|
||||
echo zypper $zypper_def_opts modifyrepo -d "$act_id"
|
||||
fi
|
||||
;;
|
||||
|
|
Loading…
Reference in a new issue