isc-dhcp.sh revision 6166
280N/A# The contents of this file are subject to the terms of the 280N/A# Common Development and Distribution License (the "License"). 280N/A# You may not use this file except in compliance with the License. 280N/A# See the License for the specific language governing permissions 280N/A# and limitations under the License. 280N/A# When distributing Covered Code, include this CDDL HEADER in each 280N/A# If applicable, add the following below this CDDL HEADER, with the 280N/A# fields enclosed by brackets "[]" replaced with your own identifying 280N/A# information: Portions Copyright [yyyy] [name of copyright owner] 6166N/A# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. 280N/A echo "SMF framework variables are not initialized." 280N/A# get_prop fmri propname 280N/A # Empty astring_list values show up as "" - do not return this. 280N/A # get debug property value 964N/A# expand_prop "prop_name" "var_name" [ argflag ] 964N/A# prop_name FMRI property name 964N/A# var_name variable where result is stored; initialized 964N/A# argflag The flag to be prepended to each property 964N/A# value; optional argument 964N/A# This function will retrieve the properties for "prop_name" via a call 964N/A# to get_prop(). It will split-up the property values; it assumes that 964N/A# the delimiter is whitespace. It will then prepend "argflag" to each 964N/A# property value. The results will be stored in "var_name" which is 964N/A if [ $# -lt 2 ] || [ -z $2 ]; then 964N/A errlog "Internal error - expand_prop() has incorrect arguments" 280N/A # get listen_ifname property value. 280N/A # get common config file properties 280N/A # If a leasefile does not exist, create an empty file. 280N/A # Get append_agent_option V4 property value 280N/A # get listen_ifname property value and modify it. 280N/A # If listen_ifnames property value is "e1000g01 iprb0" then the 747N/A # command line option will look like "-i e1000g0 -i iprb0" 280N/A # Get servers V4 property value - command line option will look 964N/A # like "1.2.3.5" "4.5.6.7". 280N/A # NOTE: By default server property value is empty. User must 280N/A # before enabling service. 747N/A errlog 'Must specify at least one "servers" property value, exiting' 280N/A # Get receivelinks V6 property value and modify it: 280N/A # Given property values of "1.2.3.4%bge0#1 bge2,1.2.3.4%iprb", 280N/A # the command line option will look like "-l 1.2.3.4%bge0#1 -l 280N/A # bge2 -l 1.2.3.4%iprb". 280N/A # NOTE: By default receivelinks value is empty. User must 280N/A # before enabling service. 280N/A # Get forwardlinks V6 property value and modify it: 747N/A # Given forward_query_links property value is "1.2.3.4%bge0 bge2," 280N/A # then the command line option will look like "-u 1.2.3.4%bge0 -u 280N/A # NOTE: By default forwardlinks value is empty. User must 280N/A # before enabling service. 6166N/A # get omapi_conn_limit property value. 280N/A if [
"$?" !=
"0" ];
then 280N/A if [
"$?" !=
"0" ];
then 280N/A echo "isc-dhcp must be invoked from within SMF" 280N/Aif [
"$?" !=
"0" ];
then