Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F115635071
D38293.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D38293.diff
View Options
diff --git a/libexec/rc/rc.d/syscons b/libexec/rc/rc.d/syscons
--- a/libexec/rc/rc.d/syscons
+++ b/libexec/rc/rc.d/syscons
@@ -50,8 +50,11 @@
_sc_console=
_sc_initdone=
_sc_keymap_msg=
+_sc_bootmethod=
sc_init()
{
+ local bootmethod
+
if [ -z "${_sc_initdone}" ]; then
if [ -z "${_sc_console}" ]; then
if [ x`sysctl -n kern.vty` = x"vt" ]; then
@@ -61,6 +64,23 @@
fi
_sc_config="${_sc_console}"
fi
+ if [ -z "${_sc_bootmethod}" ]; then
+ bootmethod=$(sysctl -qn machdep.bootmethod)
+ case ${bootmethod} in
+ UEFI)
+ _sc_bootmethod="uefi"
+ ;;
+ BIOS)
+ _sc_bootmethod="bios"
+ ;;
+ PVH)
+ _sc_bootmethod="pvh"
+ ;;
+ *)
+ _sc_bootmethod="uefi" # Default to UEFI
+ ;;
+ esac
+ fi
echo -n "Configuring ${_sc_config}:"
_sc_initdone=yes
fi
@@ -259,16 +279,8 @@
return 0
}
-syscons_start()
+syscons_bios_start()
{
- # keyboard
- #
- if [ -n "${keyboard}" ]; then
- syscons_setkeyboard ${keyboard}
- fi
-
- syscons_configure_keyboard
-
# cursor type
#
case ${cursor} in
@@ -291,62 +303,77 @@
;;
esac
- # font 8x16
+ # blank time
#
- case ${font8x16} in
+ case ${blanktime} in
[Nn][Oo] | '')
;;
*)
sc_init
- echo -n ' font8x16'; vidcontrol < ${viddev} -f 8x16 ${font8x16}
+ echo -n ' blanktime'; vidcontrol < ${viddev} -t ${blanktime}
;;
esac
- # font 8x14
+ # screen saver
#
- case ${font8x14} in
+ case ${saver} in
[Nn][Oo] | '')
;;
*)
sc_init
- echo -n ' font8x14'; vidcontrol < ${viddev} -f 8x14 ${font8x14}
+ echo -n ' screensaver'
+ for i in `kldstat | awk '$5 ~ "_saver\.ko$" { print $5 }'`; do
+ kldunload ${i}
+ done
+ load_kld -e _saver ${saver}_saver
;;
esac
+}
- # font 8x8
+syscons_start()
+{
+ # keyboard
#
- case ${font8x8} in
+ if [ -n "${keyboard}" ]; then
+ syscons_setkeyboard ${keyboard}
+ fi
+
+ syscons_configure_keyboard
+
+ if [ "${_sc_bootmethod}" = "bios" ]; then
+ syscons_bios_start
+ fi
+
+ # font 8x16
+ #
+ case ${font8x16} in
[Nn][Oo] | '')
;;
*)
sc_init
- echo -n ' font8x8'; vidcontrol < ${viddev} -f 8x8 ${font8x8}
+ echo -n ' font8x16'; vidcontrol < ${viddev} -f 8x16 ${font8x16}
;;
esac
- # blank time
+ # font 8x14
#
- case ${blanktime} in
+ case ${font8x14} in
[Nn][Oo] | '')
;;
*)
sc_init
- echo -n ' blanktime'; vidcontrol < ${viddev} -t ${blanktime}
+ echo -n ' font8x14'; vidcontrol < ${viddev} -f 8x14 ${font8x14}
;;
esac
- # screen saver
+ # font 8x8
#
- case ${saver} in
+ case ${font8x8} in
[Nn][Oo] | '')
;;
*)
sc_init
- echo -n ' screensaver'
- for i in `kldstat | awk '$5 ~ "_saver\.ko$" { print $5 }'`; do
- kldunload ${i}
- done
- load_kld -e _saver ${saver}_saver
+ echo -n ' font8x8'; vidcontrol < ${viddev} -f 8x8 ${font8x8}
;;
esac
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 27, 8:16 AM (5 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17815269
Default Alt Text
D38293.diff (2 KB)
Attached To
Mode
D38293: rc: syscons: Add UEFI special case
Attached
Detach File
Event Timeline
Log In to Comment