[main]
@type = oneshot
@version = @vers@
@description = "Set font and keymap for tty"
@user = ( root )
@depends = ( udevadm )

[start]
@execute =
(
    if { 66-yeller -cdp system-fontnkey -1 /dev/console setup font and keymap for tty }
    if -nt {
        execl-envfile ${conf_file}
        if { kbd_mode -u }
        background
        {
            forbacktickx index { seq 12 }
            importas -u -D "" index index
            sh -c "setfont ${FONT_MAP:+-m $FONT_MAP} ${FONT_UNIMAP:+-u $FONT_UNIMAP} $FONT -C /dev/tty${index}"
        }
        loadkeys -q -u ${KEYMAP}

    }
    66-yeller -fcdp system-fontnkey -1 /dev/console crashed!
)

[environment]
conf_file=!@bootconf@

[logger]
@destination = @live_dir@/log/system-fontnkey
