#! /usr/sbin/sh # # Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. # # rpcbind method # # Argument is the method name. # . /lib/svc/share/smf_include.sh RB_OPT="$1" RB_EXIT=0 RB_DOOR="$SMF_SYSVOL_FS/rpc_door" case ${RB_OPT} in "start") if [ ! -x /usr/sbin/rpcbind ] then echo "ERROR: /usr/sbin/rpcbind does not exist." exit $SMF_EXIT_ERR_CONFIG fi [ -d ${RB_DOOR} ] || /usr/bin/mkdir -p -m 0775 ${RB_DOOR} /usr/bin/chgrp daemon ${RB_DOOR} /usr/sbin/rpcbind -w RB_EXIT=${?} if [ $RB_EXIT != 0 ] then echo "rpcbind failed with $RB_EXIT." RB_EXIT=1 fi ;; "stop") # Kill service contract smf_kill_contract $2 TERM 1 [ $? -ne 0 ] && RB_EXIT=1 ;; *) RB_EXIT=$SMF_EXIT_ERR_CONFIG ;; esac exit ${RB_EXIT}