4 # This file and its contents are supplied under the terms of the
5 # Common Development and Distribution License ("CDDL"), version 1.0.
6 # You may only use this file in accordance with the terms of version
9 # A full copy of the text of the CDDL should have accompanied this
10 # source. A copy of the CDDL is also available via the Internet at
11 # http://www.illumos.org/license/CDDL.
15 # Copyright 2024 Marcel Telka
20 . /lib/svc/share/smf_include.sh
22 GRAPHVIZ_PLUGINS_DIR="/usr/lib/amd64/graphviz"
23 GRAPHVIZ_PLUGINS_CONFIG="$GRAPHVIZ_PLUGINS_DIR/config6"
24 GRAPHVIZ_PLUGINS="libgvplugin_*"
28 integer NEEDS_RECONFIGURE=0
30 # Always reconfigure plugins on refresh
31 [[ "$1" = "refresh" ]] && NEEDS_RECONFIGURE=1
33 if [[ ! -f "$GRAPHVIZ_PLUGINS_CONFIG" ]] ; then
36 if [[ -n "$($FIND "$GRAPHVIZ_PLUGINS_DIR" \
37 -name "$GRAPHVIZ_PLUGINS" \
38 -newer "$GRAPHVIZ_PLUGINS_CONFIG")" ]] ; then
43 if ((NEEDS_RECONFIGURE != 0)) ; then
44 printf "Configuring graphviz plugins\n"