2
# Copyright (C) 2009 Sun Microsystems
4
# This program is free software; you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License as published by
6
# the Free Software Foundation; version 2 of the License.
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
# GNU General Public License for more details.
13
# You should have received a copy of the GNU General Public License
14
# along with this program; if not, write to the Free Software
15
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
exec_prefix=@exec_prefix@
20
grep solaris.smf.value.drizzle /etc/security/auth_attr > /dev/null
23
ed /etc/security/auth_attr > /dev/null <<EOF
25
solaris.smf.value.drizzle:::Change Drizzle value properties::
26
solaris.smf.manage.drizzle:::Manage Drizzle service states::
33
echo "Failed to add authorization definitions"
38
grep solaris.smf.manage.drizzle /etc/security/prof_attr > /dev/null
41
ed /etc/security/prof_attr > /dev/null <<EOF
43
Drizzle Administration::::auths=solaris.smf.manage.drizzle,solaris.smf.value.drizzle
51
echo "Failed to add profile definitions"
56
getent group drizzled > /dev/null
62
echo "Failed to create group drizzled"
67
getent passwd drizzled > /dev/null
70
roleadd -c "Drizzle daemon" -d @localstatedir@ -g drizzled \
71
-A solaris.smf.value.drizzle,solaris.smf.manage.drizzle drizzled
74
echo "Failed to create role drizzled"
78
mkdir -p @localstatedir@/data
79
mkdir -p @localstatedir@/crash
80
chown -R drizzled:drizzled @localstatedir@
83
/usr/sbin/install -f /lib/svc/method drizzle
86
echo "Failed to install smf startup script"
90
/usr/sbin/install -f /var/svc/manifest/application -m 0444 drizzle.xml
93
echo "Failed to install smf definition"
97
svccfg import /var/svc/manifest/application/drizzle.xml
100
echo "Failed to import smf definition"