#!/usr/bin/ksh -p # # Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. # . /lib/svc/share/smf_include.sh if smf_dont_configure_vt; then # # This is gross, but we have to disable the console-login:vt # services as well, or they'll show up in the output of svcs -x # if they're enabled. This is done in the relatively uncommon # case that vt's are not supported for this hardware, and helps # avoid noise in the svcs -x output for the machine. # print -u 2 "vtdaemon(1m) is not applicable to this system" \ "configuration.\nDisabling the following service instances:" svcs="" for vtsvc in $(svcs -Ho fmri 'svc:/system/console-login:vt*'); do print -u 2 -- "\t$vtsvc" svcs="$svcs $vtsvc" done # batch up all of the disables to try to keep this lightweight. [[ -n $svcs ]] && svcadm disable -st $svcs smf_method_exit $SMF_EXIT_TEMP_DISABLE no_supported_hardware \ "$SMF_FMRI is not supported on this hardware" fi args="" val=$(svcprop -p options/hotkeys $SMF_FMRI) [ "$val" = "false" ] && args="$args -k" val=$(svcprop -p options/secure $SMF_FMRI) [ "$val" = "false" ] && args="$args -s" val=$(svcprop -p options/nodecount $SMF_FMRI) [ -n "$val" -a "$val" != "0" ] && args="$args -c $val" # Unfortunately, vtdaemon doesn't actually daemonize. /usr/lib/vtdaemon $args & exit $SMF_EXIT_OK