Bug 721208

Summary: How to get vgetty to run under systemd
Product: [Fedora] Fedora Reporter: Ryan <ryan.redhat>
Component: mgettyAssignee: Jiri Skala <jskala>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: aglotov, jskala
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-19 20:07:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Ryan 2011-07-14 03:52:23 UTC
Description of problem:
Now that Fedora 15 has moved from SysV and upstart I'm not able to get vgetty to pickup my incoming calls.

As I no nothing about creating a .service file under systemd I was hoping a basic file for vgetty would be included or documentation.  Neither are there and I'm not sure how to make vgetty work as it did under upstart (or older SysV)

Version-Release number of selected component (if applicable):
mgetty-voice-1.1.36-8.fc15.i686
mgetty-1.1.36-8.fc15.i686


Additional info:

Sys V way
--snip /etc/inittab--
#Look for mgetty stuff in /etc/event.d
#S1:2345:respawn:/sbin/vgetty ttyS2
--end snip--

upstart way
--snip /etc/event.d/ttyS2--
# ttyS2 - vgetty
#
# This service maintains a getty on tty1 from the point the system is
# started until it is shut down again.

start on stopped rc2
start on stopped rc3
start on stopped rc4
start on stopped rc5

stop on runlevel 0
stop on runlevel 1
stop on runlevel 6

respawn
exec /sbin/vgetty ttyS2
--end snip--

Comment 1 Ryan 2011-07-19 20:07:11 UTC
Here is a pretty simple file that will get vgetty running under systemd

--snip /lib/systemd/system/vgetty.service--
# This is a basic .service file used with systemd to control vgetty.
#
# Vgetty turns your voice modem into an answering machine.  
# It is apart of the mgetty package. http://alpha.greenie.net/vgetty/

[Unit]
Description=Vgetty turns your voice modem into an answering machine
After=syslog.target

[Service]
ExecStart=-/sbin/vgetty /dev/ttyS2 
Restart=always
RestartSec=0

[Install]
WantedBy=multi-user.target
--end snip--

Then:

--snip cmd--
systemctl enable vgetty.service
systemctl start vgetty.service
--end snip--

In the future I will change this to use %i for the device instead of specifying the device in the .service file.

Comment 2 Jiri Skala 2011-08-05 08:49:36 UTC
Thanks for reporting. I've just committed template version of your vgetty.service to rawhide.
I didn't create any symbolic link to this template. There is only updated man page of vgetty. You should make it alone e.g.

ln -s /lib/systemd/system/vgetty@.service /lib/systemd/system/vgetty

Please, could you review/verify it.

Thanks,

Jiri