commit: 8cbe8adba2433766276be8e8a09a827fce811aa9 Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Mon Aug 20 15:54:44 2018 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Mon Aug 20 20:47:04 2018 +0000 URL: https://gitweb.gentoo.org/proj/gentoo-syntax.git/commit/?id=8cbe8adb
newinitd: Update for the modern declarative syntax Bug: https://bugs.gentoo.org/605078 plugin/newinitd.vim | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/plugin/newinitd.vim b/plugin/newinitd.vim index bf6d2aa..f11dd0f 100644 --- a/plugin/newinitd.vim +++ b/plugin/newinitd.vim @@ -15,16 +15,20 @@ runtime! plugin/gentoo-common.vim fun! <SID>MakeNewInitd() call GentooHeader('#!/sbin/openrc-run') - " {{{ default functions - put ='depend() {' - put ='' - put ='}' - put ='' - put ='start() {' - put ='' - put ='}' + " {{{ variables + let l:scriptname = expand("%:t:r") + " }}} + " + " {{{ common metadata + put ='name=\"' . l:scriptname . ' daemon\"' + put ='description=\"\"' + put ='command=/usr/bin/' . l:scriptname + put ='command_args=\"${' . l:scriptname . '_args}\"' + " }}} + + " {{{ functions put ='' - put ='stop() {' + put ='depend() {' put ='' put ='}' " }}}