Starting mgetty with systemd?

Login or Register for Dates, Times and to Reply

 
Thread Tools Search this Thread
# 1  
Starting mgetty with systemd?

Hello All,

OS: openSUSE 13.1 (Bottle) (armv7hl)
uname -a: Linux linux.site 3.14.14-cubox-i #1 SMP Sat Sep 13 03:48:24 UTC 2014 armv7l armv7l armv7l GNU/Linux

So this is my first attempt at starting a service at boot with systemd. I've done this with inittab in the past,
but I'm having trouble getting mgetty to start during boot. If I check the status of mgetty.service I can see
that it failed, but there really isn't any useful debugging information there...

Here is the Status output:
*Does the word "disabled" and/or "inactive (dead)" in the message below mean it didn't even try to start it?
Code:
# systemctl status mgetty
mgetty.service - Smart Modem Getty(mgetty)
   Loaded: loaded (/usr/lib/systemd/system/mgetty.service; disabled)
   Active: inactive (dead)
     Docs: man:mgetty(8)

There is also no information in mgetty's log (*/var/log/mgetty.ttyACM0) for that device (*nor is there anything about
mgetty in /var/log/messages with today's date)
. It almost seems like systemd didn't even attempt to start mgetty.

But, I CAN start mgetty from the command line manually with "systemctl start mgetty.service" and then if I
check the staus again I can see it started up successfully...
Code:
# systemctl status mgetty
mgetty.service - Smart Modem Getty(mgetty)
   Loaded: loaded (/usr/lib/systemd/system/mgetty.service; disabled)
   Active: active (running) since Wed 2014-09-24 11:01:41 EDT; 4s ago
     Docs: man:mgetty(8)
 Main PID: 1711 (mgetty)
   CGroup: /system.slice/mgetty.service
           └─1711 /usr/sbin/mgetty -D -s 57600 -n 2 -m "" AT+VCID=1 /dev/ttyACM0

Sep 24 11:01:41 linux.site systemd[1]: Started Smart Modem Getty(mgetty).



Here is my "/usr/lib/systemd/system/mgetty.service"
File:
Code:
[Unit]
Description=Smart Modem Getty(mgetty)
Documentation=man:mgetty(8)
Requires=systemd-udev-settle.service
After=systemd-udev-settle.service

[Service]
Type=simple
ExecStart=/usr/sbin/mgetty -D -s 57600 -n 2 -m '"" AT+VCID=1' /dev/ttyACM0
Restart=always
PIDFile=/var/run/mgetty.pid.ttyACM0

[Install]
WantedBy=multi-user.target

Should I be seeing something in the /var/log/messages file if it did in fact attempt to start? And, since it starts successfully
when I start it manually with systemctl start it seems like maybe it's attempting to start too early, but I can't be sure
since there is no debugging/log information about it...

Any ideas what I can try here to get this started at boot?
Any thoughts or suggestions would be greatly appreciated...

Thanks in Advance,
Matt

---------- Post updated at 11:54 AM ---------- Previous update was at 11:16 AM ----------

Sorry, I think I figured it out....

After Googling around a bit more I found the option below for systemctl:
Code:
# systemctl is-enabled mgetty.service
disabled
# systemctl enable mgetty.service

After entering the "systemctl enable mgetty.service" command (*which printed out a "ln -s" command to STDOUT, but I don't remember
exactly what it linked to...)
, and re-running "systemctl status mgetty" I can see it says enabled now, instead of disabled like it was previously.

So I then rebooted and after I logged in and opened up a terminal and checked the status, it showed it was running... See below:
Code:
# systemctl status mgetty
mgetty.service - Smart Modem Getty(mgetty)
   Loaded: loaded (/usr/lib/systemd/system/mgetty.service; enabled)
   Active: active (running) since Tue 2014-07-08 00:00:22 EDT; 2 months 17 days ago
     Docs: man:mgetty(8)
 Main PID: 1110 (mgetty)
   CGroup: /system.slice/mgetty.service
           └─1110 /usr/sbin/mgetty -D -s 57600 -n 2 -m "" AT+VCID=1 /dev/ttyACM0

Jul 08 00:00:22 linux.site systemd[1]: Stopping Smart Modem Getty(mgetty)...
Jul 08 00:00:22 linux.site systemd[1]: Starting Smart Modem Getty(mgetty)...
Jul 08 00:00:22 linux.site systemd[1]: Started Smart Modem Getty(mgetty).

Not sure why it shows that it had to stop mgetty first (*any ideas why it would say that), but it seems to be working now...

Thanks,
Matt
Login or Register for Dates, Times and to Reply

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Systemd cant start my script

Hi, systemd cant start my script, but it work, at command prompt. Code and execute at command prompt #cat collector.sh #!/bin/bash case $1 in start) /home/postgres/scripts/pgwatch2/pgwatch2.sh /home/postgres/scripts/pgwatch2/pgwatch2_UI.sh ;; ... (7 Replies)
Discussion started by: kvaikla
7 Replies

2. UNIX for Dummies Questions & Answers

How to grep a line not starting with # from a file (there are two lines starting with # and normal)?

e.g. File name: File.txt cat File.txt Result: #INBOUND_QUEUE=FAQ1 INBOUND_QUEUE=FAQ2 I want to get the value for one which is not commented out. Thanks, (3 Replies)
Discussion started by: Tanu
3 Replies

3. Linux

CentOS7 systemd-timer

hi moring everyone, i has used systemd-timer running the task, i set every 5 second execute 1 times,but the systemd-timer don't by that also random times execute. what's reason. testest.timer configure ------------------------------------------------------------------------ ... (2 Replies)
Discussion started by: shean
2 Replies

4. UNIX for Dummies Questions & Answers

Mgetty Not Answering when Calling from Outside

Hello All, mgetty Version: 1.1.36 OS: OpenSuSE 13.1 (armv7l) Modem: Zoom 56K USB Modem Model 3095 So I've been playing with mgetty for weeks now testing dialing into the USB modem from another PC using the same modem and connecting using minicom (*minicom ---dials to---> mgetty). I had... (3 Replies)
Discussion started by: mrm5102
3 Replies

5. UNIX for Dummies Questions & Answers

How to Send AT Commands to mgetty?

Hello All, I've been working on something which requires a dialup USB Modem. I have been using minicom with success entering "AT Commands" directly into the terminal window that shows after running the minicom command. I had already configured the modem through minicom and was able to... (2 Replies)
Discussion started by: mrm5102
2 Replies

6. UNIX for Advanced & Expert Users

Systemd

Hallo I don't know where to put my question so I put it here. I want that systemd let run a script but only on shutdown or reboot and before the system umount the mounted devices. I look on google but only a little information is found and not working Until no, I don't find an solution for... (1 Reply)
Discussion started by: thailand
1 Replies

7. Linux

Systemd hibernation is killing me

I'm on Arch and I have a strange issue with systemctl hibernate command. It hibernates and resumes just fine (I have TuxOnIce), but in the last stage of resume, it completely shuts down my laptop screen, so I cannot see anything even though I know the system resumed just fined and the desktop is... (1 Reply)
Discussion started by: lockheed
1 Replies

8. UNIX for Advanced & Expert Users

Systemd

I am writing a program that must determine certain things about services. How can I, or my program, determine which services are started automatically when a given target becomes active. It is my impression that just looking in the target's .wants directory is inadequate because of other... (2 Replies)
Discussion started by: Brandon9000
2 Replies

9. What is on Your Mind?

Linux systemd - Is it really required?

I was testing Fedora 16 mostly to check the new features. One thing that caught my eye as a systems admin is the systemd which is incorporated in Fedora for quite a while now. From the first look of it, this appears more close to Solaris's SMF. With parallelization capabilities, advanced... (0 Replies)
Discussion started by: admin_xor
0 Replies

Featured Tech Videos