#!/sbin/sh # # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. # . /lib/svc/share/smf_include.sh case "$1" in 'start') uefi=$(/sbin/devprop -l efi-systab) if [ ! -z $uefi ]; then # vbiosd is not supported on UEFI systems (there is no VBIOS), # so disable the service until the next boot smf_method_exit $SMF_EXIT_TEMP_DISABLE uefi \ "vbiosd is not supported on UEFI systems" fi /usr/sbin/vbiosd rc=$? # vbiosd returns a special error code if /dev/fb is missing. # Since a video card might be added to the system at any given # time, we disable the service only temporarily. if [ $rc -eq 2 ]; then echo -n "No video card found on the system, disabling " echo -n "$SMF_FMRI temporarily. Use svcadm disable $SMF_FMRI " echo "to disable permanently." smf_method_exit $SMF_EXIT_TEMP_DISABLE no_supported_hardware \ "no video card found on system" fi if [ $rc -ne 0 ]; then echo "WARNING: /usr/sbin/vbiosd failed" exit $SMF_EXIT_ERR_CONFIG fi ;; # the daemon is killed by :kill in the manifest. *) echo "Usage: $0 { start }" exit 1 ;; esac exit 0