d5b7ba26785d7494166d48876362ba30ff30b98awrowe#!/bin/ksh
c30ef289fe64ac7fedc44cfcc6b439f0f8458b4cgregames#
c30ef289fe64ac7fedc44cfcc6b439f0f8458b4cgregames#
5541a81e194dc99521c0ecf904a940b0b65a93f2nd# CDDL HEADER START
5c4e29c5f77fbc967d78886ab378b9500267b0fbtrawick#
5c4e29c5f77fbc967d78886ab378b9500267b0fbtrawick# The contents of this file are subject to the terms of the
5c4e29c5f77fbc967d78886ab378b9500267b0fbtrawick# Common Development and Distribution License (the "License").
60f9b4ee2002436dbcb0bf33d4d76abc4b1a0d7dtrawick# You may not use this file except in compliance with the License.
60f9b4ee2002436dbcb0bf33d4d76abc4b1a0d7dtrawick#
60f9b4ee2002436dbcb0bf33d4d76abc4b1a0d7dtrawick# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
cda7c69f374fb272aaf10ca80c63b0700b61a509rederpj# or http://www.opensolaris.org/os/licensing.
cda7c69f374fb272aaf10ca80c63b0700b61a509rederpj# See the License for the specific language governing permissions
cda7c69f374fb272aaf10ca80c63b0700b61a509rederpj# and limitations under the License.
f8dd393b2c60c61282a46c51f82fdb9b89cd9aferederpj#
f8dd393b2c60c61282a46c51f82fdb9b89cd9aferederpj# When distributing Covered Code, include this CDDL HEADER in each
f8dd393b2c60c61282a46c51f82fdb9b89cd9aferederpj# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
f8dd393b2c60c61282a46c51f82fdb9b89cd9aferederpj# If applicable, add the following below this CDDL HEADER, with the
f8dd393b2c60c61282a46c51f82fdb9b89cd9aferederpj# fields enclosed by brackets "[]" replaced with your own identifying
f8dd393b2c60c61282a46c51f82fdb9b89cd9aferederpj# information: Portions Copyright [yyyy] [name of copyright owner]
1fbf6ba0f5207e6637b49f9a9dfcc779bbe952a9trawick#
1fbf6ba0f5207e6637b49f9a9dfcc779bbe952a9trawick# CDDL HEADER END
922d495b709b0dc09a7d918fdf8874dc23c1aef0nd#
922d495b709b0dc09a7d918fdf8874dc23c1aef0nd# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
922d495b709b0dc09a7d918fdf8874dc23c1aef0nd#
6c4c113ce85934b11c9e78399e1bb8ec7a568af9nd# ident "@(#)svc-net-snmp 1.2 10/10/24 SMI"
6c4c113ce85934b11c9e78399e1bb8ec7a568af9nd#
679cafe33462d8c6bd0a74cc4359e561d19a0aafnd# Start method script for the net-snmp SNMP daemon
679cafe33462d8c6bd0a74cc4359e561d19a0aafnd#
6c4c113ce85934b11c9e78399e1bb8ec7a568af9nd
81ef3d132c8f335006465f297c42319f8734825dnd. /lib/svc/share/smf_include.sh
81ef3d132c8f335006465f297c42319f8734825dnd
81ef3d132c8f335006465f297c42319f8734825dndSMF_FMRI=svc:/application/management/net-snmp
fba8c07e02a9af436c79ada0e2ba891717a9c333ndSNMPD_FILE=/etc/net-snmp/snmp/snmpd.conf
fba8c07e02a9af436c79ada0e2ba891717a9c333ndSNMPCONFPATH=/etc/net-snmp/snmp:/var/net-snmp
fba8c07e02a9af436c79ada0e2ba891717a9c333ndMIBDIRS=/etc/net-snmp/snmp/mibs
925932040ee7871b6a2418edc3b4b6f4378bbe2andCPU_ARCH=`/usr/bin/arch`
925932040ee7871b6a2418edc3b4b6f4378bbe2and
925932040ee7871b6a2418edc3b4b6f4378bbe2andexport SNMPCONFPATH
73291de2e17c97d3549f2f8aa085ca43d27e108andexport MIBDIRS
73291de2e17c97d3549f2f8aa085ca43d27e108and
73291de2e17c97d3549f2f8aa085ca43d27e108and
73291de2e17c97d3549f2f8aa085ca43d27e108andif [ "$CPU_ARCH" == "i86pc" ]; then
3caed8f01e7d67f3ad5d47cb28bb4e43131652fdjerenkrantz arch_type=`/bin/svcprop -p general/arch_type $SMF_FMRI`
3caed8f01e7d67f3ad5d47cb28bb4e43131652fdjerenkrantz if [ "$arch_type" == "32" ]; then
3caed8f01e7d67f3ad5d47cb28bb4e43131652fdjerenkrantz /usr/sbin/i86/snmpd
238e707c9022eaa8332a702dd6913dd0d1fb3df8jerenkrantz elif [ "$arch_type" == "64" ]; then
238e707c9022eaa8332a702dd6913dd0d1fb3df8jerenkrantz /usr/sbin/amd64/snmpd
3caed8f01e7d67f3ad5d47cb28bb4e43131652fdjerenkrantz elif [ "$arch_type" == "0" ]; then
e127d82e8afc2f885fe2183b68d4a110580d21dfjwoolley /usr/sbin/snmpd
e127d82e8afc2f885fe2183b68d4a110580d21dfjwoolley fi
e127d82e8afc2f885fe2183b68d4a110580d21dfjwoolleyelif [ "$CPU_ARCH" == "sun4" ]; then
e127d82e8afc2f885fe2183b68d4a110580d21dfjwoolley /usr/sbin/snmpd
5b953b9aeef5b38cae481e062a7b5ac209a6170endfi
5b953b9aeef5b38cae481e062a7b5ac209a6170end