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"
|
state="present"
|
||||||
fi
|
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")"
|
repo_id="$(cat "$__object/explorer/repo_id")"
|
||||||
|
|
||||||
act_id=""
|
act_id=""
|
||||||
|
@ -62,6 +60,13 @@ elif grep -q "$repo_id" "$__object/explorer/all_repo_ids"; then
|
||||||
act_id="$repo_id"
|
act_id="$repo_id"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if grep -q "$act_id" "$__object/explorer/enabled_repo_ids"; then
|
||||||
|
state="enabled"
|
||||||
|
else
|
||||||
|
state="disabled"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
case "$state" in
|
case "$state" in
|
||||||
present)
|
present)
|
||||||
if [ -z "$desc" ] || [ -z "$uri" ]; then
|
if [ -z "$desc" ] || [ -z "$uri" ]; then
|
||||||
|
@ -78,12 +83,12 @@ case "$state" in
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
enabled)
|
enabled)
|
||||||
if [ ! -z "$act_id" ]; then
|
if [ ! -z "$act_id" ] && [ "$state" = "disabled" ]; then
|
||||||
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" ]; then
|
if [ ! -z "$act_id" ] && [ "$state" = "disabled" ]; then
|
||||||
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