[systemd-devel] vgetty under systemd
Lennart Poettering
lennart at poettering.net
Sat Jul 16 13:20:12 PDT 2011
On Sat, 16.07.11 10:43, Ryan Nelson (ryan.freedesktop at rnelnet.com) wrote:
>
>
> Ok, so I read more on systemd (and the man page for inittab) and
> came up with a basic vgetty.service that I'm using with systemd.
> After doing little ready its pretty easy.
>
> So I wanted to ask if I can make my service file better than this:
>
> --snip /lib/systemd/system/vgetty.service--
> # This file is part of systemd.
> #
> # systemd 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 2 of the License, or
> # (at your option) any later version.
This file isn't really part of systemd, is it? So the header can go...
>
> [Unit]
> Description=Program to answer voice calls using Vgetty
> After=syslog.target
>
> [Service]
> ExecStart=-/sbin/vgetty /dev/ttyS2
> Restart=always
> RestartSec=0
> KillMode=process
Why KillMode=process?
> [Install]
> WantedBy=multi-user.target
As mentioned in my other response: consider making this a template you
can easily enable for multiple ports by symlinking it to
vgett at ttyS0.service, vgetty at ttyS1.service and so on.
Lennart
--
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel
mailing list