[main]
@type = oneshot
@version = @vers@
@description = "Create tempory authentification files"
@depends = ( mount-rw )
@user = ( root )
@options = ( !log )

[start]
@execute =
(
    if { 66-yeller -cdp local-authfiles -1 /dev/console starts... }
    if -nt {

        if -t {
            execl-toc -nt -e ${script_file_wtmp}
            foreground {
                install -m0664 -o root -g utmp /dev/null ${script_file_wtmp}
            }
        }

        if -t {
            execl-toc -nt -e ${script_file_btmp}
            foreground {
                install -m0600 -o root -g utmp /dev/null ${script_file_btmp}
            }
        }

    }
    66-yeller -fcdp local-authfiles -1 /dev/console crashed!
)

[environment]
script_file_wtmp=!/var/log/wtmp
script_file_btmp=!/var/log/btmp
