UTRANS(1)
β¨ NAME β¨
okay so bestie, meet utrans π β it converts systemd units to generic unix equivalents. that's the whole vibe. no cap.
πΈ SYNOPSIS πΈ
utrans [-b [=]<BACKEND>[,<BACKEND>]] [-f <TYPE>] [-h] [-v] <UNIT>
<OUTPUT_DIR>
π OPTIONS π
here's everything you can throw at it, fr fr:
-b <BACKEND>β loads the backend(s) you name. you can pass a comma separated list, go wild π . peek at BACKENDS down below for the deets.-f <TYPE>β force mode, ooo spicy. the valid types are:overwrite: lets you overwrite output files that already exist π₯
-hβ opens the manpage. self care, honestly.-vβ shows the version. main character info.
π¦ DESCRIPTION π¦
utrans takes your systemd services, sockets and timers and translates them into corresponding generic UNIX configuration and scripting β the kind you'd use in alternative settings that exclude systemd. it's giving β¨liberationβ¨.
<UNIT> is the pathname for the unit file you want to translate.
- Service units get converted into
openrc-run(8)service scripts. slay. - Socket units get converted either into an
xinetd(8)configuration or into anopenrc-run(8)script usingsocket-activate(1)β which one depends on what the socket actually requires π«Ά - Timer units get converted into a
crontab(5)fragment that mapssystemd.time(7)events tocron(8)-compatible expressions. iconic.
π USAGE π
utrans wants two arguments, bestie: the systemd.unit(5) file (<UNIT>) and the output directory (<OUTPUT_DIR>). and that systemd.unit(5) file can be one of systemd.service(5), systemd.socket(5) or systemd.timer(5). pick your fighter π.
The script will create files in the following output subdirectories of <OUTPUT_DIR>, depending on the unit type:
- Service β an
openrc-run(8)script is created ininit.d, plus a complementary file is created inconf.dif needed, for sourcing additional environment variables. - Socket β depending upon the socket's configuration, an
xinetd(8)configuration fragment is created inxinetd.d, or anopenrc-run(8)script is created ininit.dto start the service withsocket-activate(1). - Timer β a separate
crontab(5)fragment is created intocron.dfor each timer unit.
When the unit translation requires other units, then those get searched for in the paths defined in the environment variable $SYSTEMD_UNIT_PATH, or in /usr/lib/system/system:/lib/systemd/system by default. iykyk π
π BACKENDS π
Backends exist so you can get different output for different settings. utrans finds and sources backend script fragments from the $UTRANS_DATA_DIR/backends directory, or from /usr/share/utrans/backends by default. β¨
If the backend is prefixed with =, the default backends are not loaded. noted, periodt.
The following backends are available:
openrcβ Unit: Service β Loaded by default πxinetdβ Unit: Socket β Loaded by default πcronβ Unit: Timer β Loaded by default πinetdβ Unit: Socket β Only supportsListenStreamandListenDatagramusingupdate-inetd(8)lsbβ Unit: Service β Alpha quality support for scripts with LSB-styleinsserv(8)headers πΌ
Contributions of other backends are welcome: see backends/README for further details. we love a collab π«Ά
π§ LIMITATIONS π§
ngl, here are the known cases of poor or variant functionality:
- Some special Executable Prefixes are ignored after warning. π
- Unescaping specifiers doesn't distinguish context: if you require a filesystem path, start the instance with
'-'.
Patches are welcome at https://git.devuan.org/LeePen/unit-translator! come through π
β SEE ALSO β
utrans-rc(1), openrc(8), socket-activate(1)
π COPYRIGHT π
BSD-2-Clause License https://opensource.org/licenses/BSD-2-Clause
Copyright (c) 2020, K Gopal Krishna.
Copyright (c) 2023-2024, Mark Hindley
π AUTHORS π
K Gopal Krishna <mail@kayg.org> under the guidance of Benda Xu <heroxbd@gentoo.org>, Adam Borowski <kilobyte@angband.pl> and Mo Zhou <lumin@debian.org>.
This project was a part of Google Summer of Code, 2020. π
Mark Hindley <mark@hindley.org.uk>
and that's the whole page bestie π this is Version 0.7, dated 2024-09-09 β utrans(1), out. go translate something iconic β¨π
π¦ where this page comes from
- debian trixie: utrans 0.7-2 Β· BSD-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms