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

[start]
@execute =
(
    if { 66-yeller -cdp local-authfiles -1 /dev/console configure wtmp and btmp file }
    if -nt {

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

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

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

[environment]
ScriptFileWtmp=!/var/log/wtmp
ScriptFileBtmp=!/var/log/btmp

[logger]
@destination = @live_dir@/log/local-authfiles
