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