#!/usr/sbin/sh # # Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. # # # Startup script for the hotplugd(1M) daemon. # . /lib/svc/share/smf_include.sh HOTPLUGD_DOOR=$SMF_SYSVOL_FS/hotplugd_door # The hotplug service is only supported in the global zone. if smf_is_nonglobalzone; then smf_method_exit $SMF_EXIT_TEMP_DISABLE local_zone \ "$SMF_FMRI is not supported in a local zone" fi # If a hotplug door exists, check for a hotplugd process and exit # if the daemon is already running. if [ -f $HOTPLUGD_DOOR ]; then if /usr/bin/pgrep -x -u 0 hotplugd >/dev/null 2>&1; then echo "$0: hotplugd is already running" exit 1 fi fi rm -f $HOTPLUGD_DOOR exec /usr/lib/hotplugd