components/bind/Solaris/dns-server.sh
changeset 6227 a498cb624014
parent 4980 b0ec15659025
equal deleted inserted replaced
6226:cebcbbd80341 6227:a498cb624014
    17 # fields enclosed by brackets "[]" replaced with your own identifying
    17 # fields enclosed by brackets "[]" replaced with your own identifying
    18 # information: Portions Copyright [yyyy] [name of copyright owner]
    18 # information: Portions Copyright [yyyy] [name of copyright owner]
    19 #
    19 #
    20 # CDDL HEADER END
    20 # CDDL HEADER END
    21 #
    21 #
    22 # Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
    22 # Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
    23 #
    23 #
    24 
    24 
    25 # smf_method(5) start/stop script required for server DNS
    25 # smf_method(7) start/stop script required for server DNS
    26 
    26 
    27 . /lib/svc/share/smf_include.sh
    27 . /lib/svc/share/smf_include.sh
    28 
    28 
    29 result=${SMF_EXIT_OK}
    29 result=${SMF_EXIT_OK}
    30 
    30 
    45     rndc_config_file=/etc/rndc.conf
    45     rndc_config_file=/etc/rndc.conf
    46     rndc_key_file=/etc/rndc.key
    46     rndc_key_file=/etc/rndc.key
    47     rndc_cmd_opts="-a"
    47     rndc_cmd_opts="-a"
    48     cmdopts=""
    48     cmdopts=""
    49     properties="debug_level ip_interfaces listen_on_port
    49     properties="debug_level ip_interfaces listen_on_port
    50 	threads chroot_dir configuration_file server"
    50 	threads chroot_dir configuration_file server
       
    51 	listener_threads crypto_engine"
    51 
    52 
    52     for prop in $properties
    53     for prop in $properties
    53     do
    54     do
    54 	value=`/usr/bin/svcprop -p options/${prop} ${SMF_FMRI}`
    55 	value=`/usr/bin/svcprop -p options/${prop} ${SMF_FMRI}`
    55 	if [ -z "${value}" -o "${value}" = '""' ]; then
    56 	if [ -z "${value}" -o "${value}" = '""' ]; then
    56 	    continue;
    57 	    # Could not find property or it has no value.
       
    58 	    continue
    57 	fi
    59 	fi
    58 
    60 
    59 	case $prop in
    61 	case $prop in
    60 	'debug_level')
    62 	'debug_level')
    61 	    if [ ${value} -gt 0 ]; then
    63 	    if [ ${value} -gt 0 ]; then
    96 	    configuration_file=${value};
    98 	    configuration_file=${value};
    97 	    ;;
    99 	    ;;
    98 	'server')
   100 	'server')
    99 	    set -- `echo ${value} | /usr/bin/sed -e  's/\\\\//g'`
   101 	    set -- `echo ${value} | /usr/bin/sed -e  's/\\\\//g'`
   100 	    server=$@
   102 	    server=$@
       
   103 	    ;;
       
   104 	'listener_threads')
       
   105 	    if [ ${value} -gt 0 ]; then
       
   106 		cmdopts="${cmdopts} -U ${value}"
       
   107 	    fi
       
   108 	    ;;
       
   109 	'crypto_engine')
       
   110 	    # Use '' to specify an empty name.
       
   111 	    cmdopts="${cmdopts} -E ${value}"
   101 	    ;;
   112 	    ;;
   102 	esac
   113 	esac
   103     done
   114     done
   104 
   115 
   105     # If chroot option is set, note zones(5) are preferred, then
   116     # If chroot option is set, note zones(5) are preferred, then