From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1043226-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 7C89E138334
	for <garchives@archives.gentoo.org>; Mon, 20 Aug 2018 20:47:24 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 6C0AEE07E0;
	Mon, 20 Aug 2018 20:47:23 +0000 (UTC)
Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 43603E07E0
	for <gentoo-commits@lists.gentoo.org>; Mon, 20 Aug 2018 20:47:21 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id B7B02335DAB
	for <gentoo-commits@lists.gentoo.org>; Mon, 20 Aug 2018 20:47:19 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 7CD023A2
	for <gentoo-commits@lists.gentoo.org>; Mon, 20 Aug 2018 20:47:17 +0000 (UTC)
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" <mgorny@gentoo.org>
Message-ID: <1534798024.8cbe8adba2433766276be8e8a09a827fce811aa9.mgorny@gentoo>
Subject: [gentoo-commits] proj/gentoo-syntax:master commit in: plugin/
X-VCS-Repository: proj/gentoo-syntax
X-VCS-Files: plugin/newinitd.vim
X-VCS-Directories: plugin/
X-VCS-Committer: mgorny
X-VCS-Committer-Name: Michał Górny
X-VCS-Revision: 8cbe8adba2433766276be8e8a09a827fce811aa9
X-VCS-Branch: master
Date: Mon, 20 Aug 2018 20:47:17 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: a0a37a35-20bb-4978-abc3-66b657f61843
X-Archives-Hash: cd2416c632f38f720fb6dc65bbcc8ab6

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 ='}'
     " }}}