From 59731dd69bb4be66c721b3de66fb2ab80bec3e7e Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 22 Apr 2018 01:02:27 +0200 Subject: Add helper program for running services We no longer need to keep entire scripts in init program (i.e. saving space) and reduce the code and complexity of the init program. The runsvc tool can later be extended to do more complex child setup, such as configuring namespaces or seccomp without adding complexity or memory footprint to init. Signed-off-by: David Oberhollenzer --- cmd/runsvc/runsvc.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 cmd/runsvc/runsvc.h (limited to 'cmd/runsvc/runsvc.h') diff --git a/cmd/runsvc/runsvc.h b/cmd/runsvc/runsvc.h new file mode 100644 index 0000000..15785d3 --- /dev/null +++ b/cmd/runsvc/runsvc.h @@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: GPL-3.0-or-later */ +/* + * Copyright (C) 2018 - David Oberhollenzer + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef RUNSVC_H +#define RUNSVC_H + +#include +#include +#include +#include +#include +#include +#include + +#include "service.h" +#include "util.h" + +#define ENVFILE ETCPATH "/initd.env" + +int initenv(void); + +#endif /* RUNSVC_H */ -- cgit v1.2.3