summaryrefslogtreecommitdiffstats
path: root/sys/boot
diff options
context:
space:
mode:
authorrodrigc <rodrigc@FreeBSD.org>2014-06-03 14:50:51 +0000
committerrodrigc <rodrigc@FreeBSD.org>2014-06-03 14:50:51 +0000
commitca2a1ac3055e8ef1e6ced68853090e970d4003bf (patch)
treef929bce979a127497ae3389022fcb61e32bde9c7 /sys/boot
parent40e2c2f2d81626af81ab80c45321cb6fe26ac9a7 (diff)
downloadFreeBSD-src-ca2a1ac3055e8ef1e6ced68853090e970d4003bf.zip
FreeBSD-src-ca2a1ac3055e8ef1e6ced68853090e970d4003bf.tar.gz
MFC r266938:
Allow customization of the brand displayed in the boot menu. If the user specifies in /boot/loader.conf: loader_brand="mycustom-brand" Then "mycustom-brand" will be executed instead of "fbsd-logo". Submitted by: alfred Obtained from: FreeNAS
Diffstat (limited to 'sys/boot')
-rw-r--r--sys/boot/forth/brand.4th11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/boot/forth/brand.4th b/sys/boot/forth/brand.4th
index b6f22c8..28d3c5c 100644
--- a/sys/boot/forth/brand.4th
+++ b/sys/boot/forth/brand.4th
@@ -56,6 +56,8 @@ variable brandY
\ NAME DESCRIPTION
\ fbsd FreeBSD logo
\
+\ NOTE: Setting `loader_brand' to the value of an existing function
+\ (such as "mycustom-brand") will cause that symbol to be executed.
\ NOTE: Setting `loader_brand' to an undefined value (such as "none") will
\ prevent any brand from being drawn.
\
@@ -87,5 +89,14 @@ variable brandY
2drop exit
then
+ \ if it refers to a raw symbol then run that function
+ sfind if
+ brandX @ brandY @
+ 2 roll
+ execute
+ else
+ drop
+ then
+
2drop
;
OpenPOWER on IntegriCloud