File: README

package info (click to toggle)
unit-translator 0.8-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 632 kB
  • sloc: sh: 909; makefile: 28
file content (31 lines) | stat: -rw-r--r-- 1,250 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Output backends for utrans

Backends enable utrans to produce various output formats.
The following types are available:-

	- service (openrc, lsb)
	- timer (cron)
	- inetd (xinetd, inetd)

Valid backends:-

	- must be bash scripts. A shebang is not required and the files should
          not be executable as backends are sourced by the main
          program. Therefore they inherit the restrictions of the main script
          (currently errexit, pipefail, nounset, noglob).

	- must provide a function export_<TYPE> for each type they wish to
	  handle. The function is called with 2 arguments: the full path to the
	  systemd unit and the base output directory. The backend is responsible
	  for creating any subdirectories it requires and writing files within them.

	- should use the global associative arrays (unit, service, socket,
          timer, install) whose keys allow access to the parsed systemd unit.

	  Systemd Before, After, Requires and Wants dependencies are translated
	  to insserv/LSB-style equivalents accessible via the
	  depends[{Before,Requires,Wants}] array.
    
	- are recommended to embed the output of gen_origin() at the top of any
	  generated files. This will produce a header with the origin file
	  sha256.