cdist/cdist/conf/type/__update_alternatives/explorer/state

9 lines
182 B
Bash
Executable File

#!/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