1*18c2aff7Sartem#!/sbin/sh 2*18c2aff7Sartem# 3*18c2aff7Sartem# Copyright 2006 Sun Microsystems, Inc. All rights reserved. 4*18c2aff7Sartem# Use is subject to license terms. 5*18c2aff7Sartem# 6*18c2aff7Sartem# Licensed under the Academic Free License version 2.1 7*18c2aff7Sartem# 8*18c2aff7Sartem# ident "%Z%%M% %I% %E% SMI" 9*18c2aff7Sartem 10*18c2aff7Sartem. /lib/svc/share/smf_include.sh 11*18c2aff7Sartem 12*18c2aff7Sartemcase "$1" in 13*18c2aff7Sartem'start') 14*18c2aff7Sartem if smf_is_nonglobalzone; then 15*18c2aff7Sartem /usr/sbin/svcadm disable $SMF_FMRI 16*18c2aff7Sartem echo "$SMF_FMRI is not supported in a local zone" 17*18c2aff7Sartem sleep 5 & 18*18c2aff7Sartem exit $SMF_EXIT_OK 19*18c2aff7Sartem fi 20*18c2aff7Sartem 21*18c2aff7Sartem [ ! -x /usr/lib/hal/hald ] && exit $SMF_EXIT_ERR_CONFIG 22*18c2aff7Sartem 23*18c2aff7Sartem [ ! -d /var/run/hald ] && /usr/bin/mkdir -m 755 /var/run/hald 24*18c2aff7Sartem [ ! -d /media ] && /usr/bin/mkdir -m 755 /media 25*18c2aff7Sartem 26*18c2aff7Sartem /usr/lib/hal/hald --daemon=yes 27*18c2aff7Sartem err=$? 28*18c2aff7Sartem if [ $err -ne 0 ]; then 29*18c2aff7Sartem echo "hal failed to start: error $err" 30*18c2aff7Sartem exit $SMF_EXIT_ERR_FATAL 31*18c2aff7Sartem fi 32*18c2aff7Sartem ;; 33*18c2aff7Sartem*) 34*18c2aff7Sartem echo "Usage: $0 { start }" 35*18c2aff7Sartem exit $SMF_EXIT_ERR_FATAL 36*18c2aff7Sartem ;; 37*18c2aff7Sartemesac 38*18c2aff7Sartem 39*18c2aff7Sartemexit $SMF_EXIT_OK 40