#!/usr/sbin/sh # # Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. # . /lib/svc/share/smf_include.sh # # commands # IPADM=/usr/sbin/ipadm if [ -z "$SMF_FMRI" ]; then echo "this script can only be invoked by smf(5)" exit $SMF_EXIT_ERR_NOSMF fi # # System-wide forwarding (either ipv4 or ipv6) must be enabled before # load balancing daemon can be started. # v4fwding=`$IPADM show-prop -c -o current -p forwarding ipv4 2>/dev/null` v6fwding=`$IPADM show-prop -c -o current -p forwarding ipv6 2>/dev/null` if [ -z "$v4fwding" -o "$v4fwding" = "off" ]; then if [ -z "$v6fwding" -o "$v6fwding" = "off" ]; then echo "ipv4 forwarding or ipv6 forwarding must be enabled for "\ "load balancing daemon to start" exit $SMF_EXIT_ERR_CONFIG fi fi # # Start the ilbd daemon. # if /usr/lib/inet/ilbd ; then exit $SMF_EXIT_OK else exit $SMF_EXIT_ERR_FATAL fi