svc-ipagent revision 99ba4d70906e5f67853c25ade6ebf4da3e5be4d6
9f4747a43944848d911353b1bcc99f41aaa5bf81vboxsync#!/bin/ksh
9f4747a43944848d911353b1bcc99f41aaa5bf81vboxsync#
9f4747a43944848d911353b1bcc99f41aaa5bf81vboxsync# CDDL HEADER START
9b5a120b694c2603a7a3dccbd6cc519164943b17vboxsync#
9f4747a43944848d911353b1bcc99f41aaa5bf81vboxsync# The contents of this file are subject to the terms of the
9f4747a43944848d911353b1bcc99f41aaa5bf81vboxsync# Common Development and Distribution License (the "License").
9f4747a43944848d911353b1bcc99f41aaa5bf81vboxsync# You may not use this file except in compliance with the License.
9f4747a43944848d911353b1bcc99f41aaa5bf81vboxsync#
c58f1213e628a545081c70e26c6b67a841cff880vboxsync# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9f4747a43944848d911353b1bcc99f41aaa5bf81vboxsync# or http://www.opensolaris.org/os/licensing.
9f4747a43944848d911353b1bcc99f41aaa5bf81vboxsync# See the License for the specific language governing permissions
9f4747a43944848d911353b1bcc99f41aaa5bf81vboxsync# and limitations under the License.
9f4747a43944848d911353b1bcc99f41aaa5bf81vboxsync#
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# When distributing Covered Code, include this CDDL HEADER in each
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# If applicable, add the following below this CDDL HEADER, with the
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# fields enclosed by brackets "[]" replaced with your own identifying
9f4747a43944848d911353b1bcc99f41aaa5bf81vboxsync# information: Portions Copyright [yyyy] [name of copyright owner]
9f4747a43944848d911353b1bcc99f41aaa5bf81vboxsync#
9f4747a43944848d911353b1bcc99f41aaa5bf81vboxsync# CDDL HEADER END
9f4747a43944848d911353b1bcc99f41aaa5bf81vboxsync#
9f4747a43944848d911353b1bcc99f41aaa5bf81vboxsync# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
9f4747a43944848d911353b1bcc99f41aaa5bf81vboxsync# Use is subject to license terms.
2d97f8baccdd684bc0a8a15eb86bbe9ff2b85374vboxsync
9f4747a43944848d911353b1bcc99f41aaa5bf81vboxsyncinterval=$2
866306ba031a2f258907507dd4abb3b84b6983e7vboxsync
866306ba031a2f258907507dd4abb3b84b6983e7vboxsync. /lib/svc/share/xvm_include.sh
9f4747a43944848d911353b1bcc99f41aaa5bf81vboxsync
9f4747a43944848d911353b1bcc99f41aaa5bf81vboxsynccase $1 in
120ee2736ed70b5ce8b0b4dd73cc4f8b4b9416c1vboxsync'start')
9f4747a43944848d911353b1bcc99f41aaa5bf81vboxsync #
0593edaa1761266cd29c8534b4090646737d3c99vboxsync # This service should only be enabled in a PV domU.
0593edaa1761266cd29c8534b4090646737d3c99vboxsync #
120ee2736ed70b5ce8b0b4dd73cc4f8b4b9416c1vboxsync if is_dom0 || [ `uname -i` != "i86xpv" ]; then
9f4747a43944848d911353b1bcc99f41aaa5bf81vboxsync echo "This service will only run in a PV xVM domU."
120ee2736ed70b5ce8b0b4dd73cc4f8b4b9416c1vboxsync svcadm disable -t svc:/system/xvm/ipagent:default
bb4f31aac6155757fe15ef9fe0bf843ed9a14441vboxsync exit $SMF_EXIT_OK
bb4f31aac6155757fe15ef9fe0bf843ed9a14441vboxsync fi
13b491985af0d1325baad7591dcab4a9b27949cdvboxsync
13b491985af0d1325baad7591dcab4a9b27949cdvboxsync /usr/lib/xen/bin/ipagent $interval &
ba00a478700c77b6b1435cd8a7e7cb64d84f8d93vboxsync
ba00a478700c77b6b1435cd8a7e7cb64d84f8d93vboxsync ;;
ba00a478700c77b6b1435cd8a7e7cb64d84f8d93vboxsync
ba00a478700c77b6b1435cd8a7e7cb64d84f8d93vboxsync*)
9f4747a43944848d911353b1bcc99f41aaa5bf81vboxsync echo "Usage: $0 start [report_interval]"
120ee2736ed70b5ce8b0b4dd73cc4f8b4b9416c1vboxsync exit 1
ba00a478700c77b6b1435cd8a7e7cb64d84f8d93vboxsync ;;
ba00a478700c77b6b1435cd8a7e7cb64d84f8d93vboxsyncesac
3238841f4d74fd0e37778c270ae81b177a98e21bvboxsync
ba00a478700c77b6b1435cd8a7e7cb64d84f8d93vboxsyncexit $?
9f4747a43944848d911353b1bcc99f41aaa5bf81vboxsync