Commit b891bb05 authored by Ander Punnar's avatar Ander Punnar

__update_alternatives: add state explorer

parent c09165d1
#!/bin/sh -e
path="$(cat "$__object/parameter/path")"
name="$__object_id"
link="$(readlink "/etc/alternatives/$name")"
if [ "$path" = "$link" ]
then echo present
else echo absent
fi
......@@ -21,6 +21,10 @@
# Setup alternative - no standard way to create, always set
#
if [ "$(cat "$__object/explorer/state")" = 'present' ]
then exit 0
fi
path="$(cat "$__object/parameter/path")"
name="$__object_id"
echo "update-alternatives --quiet --set '$name' '$path'"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment