Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Is there a way to run the nmtui command during boot before the login screen appears?

28faaaed-69fa-4cbc-a043-33e3ce2a8685Sep 29 2016 — edited Sep 30 2016

First-time poster here.  I'm hoping I can get some advice or answers to lead me to resolve my issue:  

I have been trying to find a way to have the nmtui display during boot before the login screen appears:

http://www.unixarena.com/wp-content/uploads/2015/04/nmtui-1.jpg

My purpose for this is to have a convenient method for users to configure their network settings before our software services are kicked off.   Our software relies on proper IP configuration in order for proper functionality. 

OS info:  CentOS 7

Things I have tried:

I figured the easiest thing to do would be to create a service that executes nmtui.   So I created one, and placed it in /lib/systemd/system, and placed a link to reference the service in /etc/systemd/system.  Below is a copy of my service:

[Unit]

  Description=Start nmtui before login screen appears

  After=NetworkManager.service network.target

  Before=systemd-user-sessions.service

  [Service]

  Type=oneshot

  ExecStart=/bin/nmtui

  [Install]

  WantedBy=multi-user.target

I figured it would make sense for nmtui to execute after the NetworkManager service had already started.   However, when I rebooted, the OS locked up during boot.  I suspect that when my created service was executed, it just hangs and never escapes (again, just a guess). 

I have tried googling for the life of me, and could not find much related to my issue.  I have also thought about creating a script that provides user interaction to configure network settings while on the login prompt (/etc/issues), but figured I would see if anyone had any other thoughts before venturing down that road.

A final question I also had was, is it even possible to execute an interactive script during boot up? 

Thanks in advance for any advice or help.

Regards!

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 28 2016
Added on Sep 29 2016
7 comments
1,230 views