Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to stop systemd from running an agetty on serial port
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
guido.hatzsis
n00b
n00b


Joined: 10 Jul 2015
Posts: 51

PostPosted: Fri Jun 10, 2016 12:18 am    Post subject: How to stop systemd from running an agetty on serial port Reply with quote

I am currently using a USB serial port thingy, and would like to stop systemd from running an agetty on the port. Unfortunately it seems that it picks up that something has been plugged in and starts a service on that port. How do I disable this explicitly?
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 2883
Location: Illinois, USA

PostPosted: Fri Jun 10, 2016 12:52 am    Post subject: Reply with quote

Dump systemd
Back to top
View user's profile Send private message
guido.hatzsis
n00b
n00b


Joined: 10 Jul 2015
Posts: 51

PostPosted: Fri Jun 10, 2016 3:37 am    Post subject: Reply with quote

very droll. but it isn't going to help.

If you would like to start a thread about the philosophical and moral reasons for removing systemd then don't forget that linux itself is a monolithic huge kernel.
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 2883
Location: Illinois, USA

PostPosted: Fri Jun 10, 2016 4:10 am    Post subject: Reply with quote

I was serious. This is trivial in systemvinit. Apparently you are a systemd true believer, so I'll bow out.
Back to top
View user's profile Send private message
guido.hatzsis
n00b
n00b


Joined: 10 Jul 2015
Posts: 51

PostPosted: Fri Jun 10, 2016 8:45 am    Post subject: Reply with quote

And what do you suggest for the sniffles and a bit of runny nose? Decapitation?
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 2152
Location: Berlin, Germany

PostPosted: Fri Jun 10, 2016 9:42 am    Post subject: Reply with quote

Please keep it civil here, folks. If you can't help with the issue at hand, there is no need to post unhelpful remarks.

Some googling points to serial-getty@.service as the culprit. If your device is /dev/ttyUSB0, then check the output of
Code:
# systemctl status serial-getty@ttyUSB0.service
Back to top
View user's profile Send private message
guido.hatzsis
n00b
n00b


Joined: 10 Jul 2015
Posts: 51

PostPosted: Fri Jun 10, 2016 10:08 am    Post subject: Reply with quote

Probably forgot that I ran the console on this one too.

Yes, thanks for that. I know that ● serial-getty@ttyUSB0.service - Serial Getty on ttyUSB0 has been started, but how do I explicitly disable this. I believe that this is documented in the service and http://0pointer.de/blog/projects/serial-console.html.

You see, I never, ever, ever enabled this. I never went systemctl enable serial-getty@ttyUSB0.service. I am trying to find a way to explicit disable this. I think that the most likely place is in the logind.conf. I don't want to disable all VTs however, but it seems that the only solution is "When set to 0, automatic spawning of "autovt" services is disabled."
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 2152
Location: Berlin, Germany

PostPosted: Fri Jun 10, 2016 10:15 am    Post subject: Reply with quote

As I don't run any systemd systems currently, I can not tell for sure, but I think you can disable the general serial-getty@.service and then only enable it for the specific serial ports which you want to spawn an agetty on.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum