Skip to content

Commit

Permalink
scripts/Solaris/preremove.in + postinstall.in: configure sanity check…
Browse files Browse the repository at this point in the history
…er likes datarootdir more than datadir
  • Loading branch information
jimklimov committed Sep 21, 2021
1 parent 235450b commit 7cc10c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions scripts/Solaris/postinstall.in
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ if [ -d "@STATEPATH@" ] ; then
chmod 770 "@STATEPATH@"
fi

if [ -n "@auglensdir@" ] && [ -d "@auglensdir@" ] && [ -d "@datadir@/augeas-lenses" ] ; then
( cd "@datadir@/augeas-lenses" && cp -prf ./ "@auglensdir@"/ )
if [ -n "@auglensdir@" ] && [ -d "@auglensdir@" ] && [ -d "@datarootdir@/augeas-lenses" ] ; then
( cd "@datarootdir@/augeas-lenses" && cp -prf ./ "@auglensdir@"/ )
fi

if test -x /usr/sbin/svcadm && test -x /usr/sbin/svccfg && test -x /usr/bin/svcs ; then
echo "Register SMF services..."
for S in nut-driver-enumerator nut-driver nut-server nut-monitor nut ; do
echo "Importing NUT service manifest: $S..."
/usr/sbin/svccfg import "@datadir@/solaris-smf/manifest/$S.xml"
/usr/sbin/svccfg import "@datarootdir@/solaris-smf/manifest/$S.xml"
done
# Enable services if the system already has a configuration (e.g. upgrade)
if test -s "@CONFPATH@/ups.conf" ; then
Expand Down
4 changes: 2 additions & 2 deletions scripts/Solaris/preremove.in
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ else
[ -x /etc/init.d/nut ] && /etc/init.d/nut stop
fi
if [ -n "@auglensdir@" ] && [ -d "@auglensdir@" ] && [ -d "@datadir@/augeas-lenses" ] ; then
( cd "@datadir@/augeas-lenses" && find . -type f -exec rm -f "@auglensdir@"/'{}' \; )
if [ -n "@auglensdir@" ] && [ -d "@auglensdir@" ] && [ -d "@datarootdir@/augeas-lenses" ] ; then
( cd "@datarootdir@/augeas-lenses" && find . -type f -exec rm -f "@auglensdir@"/'{}' \; )
fi

0 comments on commit 7cc10c5

Please sign in to comment.