LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-27-2018, 07:13 AM   #1
SriRamaSan
LQ Newbie
 
Registered: Sep 2018
Posts: 11

Rep: Reputation: Disabled
SystemD services to be blocking "URGENT"


Hi all,
I am performing a customized installation of CentOS, where instead of standard Anaconda, installation wizard, I am invoking my own wizard which will collect inputs for installation
My code is based on newt (https://pagure.io/newt) and uses python3.4

I am facing a challenge that before wizard could complete, it goes to subsequent service in my case getty@tty1.service, getty.target, multi-user.target
so I get the login prompt test login:

How do I ensure, this prompt/ or my wizard completes before login prompt comes

I am putting my systemd service file contents below

# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.

# See systemd.special(7) for details

[Unit]
Description=Start Wizard as a service
DefaultDependencies=no
After=sshd.service
ConditionPathExists=/opt/install/
Before=getty@tty1.service getty@tty2.service getty@rrt3.service getty@tty4.service getty@tty5.service getty@tty6.service

[Service]
Environment=TERM=vt220
Type=oneshot
ExecStart=/opt/install/bin/menu.sh
StandardInput=tty-force
StandardOutput=console
StandardError=syslog+console
RemainAfterExit=yes
TimeoutSec=0

[install]
# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash
# terminates cleanly.
WantedBy=multi-user.target
 
Old 09-27-2018, 11:28 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,710

Rep: Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972
Quote:
Originally Posted by SriRamaSan View Post
Hi all,
I am performing a customized installation of CentOS, where instead of standard Anaconda, installation wizard, I am invoking my own wizard which will collect inputs for installation My code is based on newt (https://pagure.io/newt) and uses python3.4

I am facing a challenge that before wizard could complete, it goes to subsequent service in my case getty@tty1.service, getty.target, multi-user.target
so I get the login prompt test login: How do I ensure, this prompt/ or my wizard completes before login prompt comes I am putting my systemd service file contents below
Code:
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

# See systemd.special(7) for details

[Unit]
Description=Start Wizard as a service
DefaultDependencies=no
After=sshd.service
ConditionPathExists=/opt/install/
Before=getty@tty1.service getty@tty2.service getty@rrt3.service getty@tty4.service getty@tty5.service getty@tty6.service 

[Service]
Environment=TERM=vt220
Type=oneshot
ExecStart=/opt/install/bin/menu.sh
StandardInput=tty-force
StandardOutput=console
StandardError=syslog+console
RemainAfterExit=yes
TimeoutSec=0

[install]
# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash
# terminates cleanly.
WantedBy=multi-user.target
Use CODE tags when posting scripts and other things of this nature, please. And see the "How to ask a smart question" link in my posting signature. This is **NOT URGENT** for anyone here. We volunteer our time, so asking for/expecting 'urgent' assistance is fairly rude.

And based on what you posted, we can't tell you anything. You don't say what version of CentOS, nor post the contents of that menu.sh file that's getting called. Chances are, there's a bug/problem in it.
 
Old 09-28-2018, 01:38 AM   #3
SriRamaSan
LQ Newbie
 
Registered: Sep 2018
Posts: 11

Original Poster
Rep: Reputation: Disabled
CentOS version I am working is CentOS 7.4
Script invokes the wizard python program based on newt
python3 wizard.py -f config file


sorry for adding URGENT

Regards
Ramki
 
Old 09-28-2018, 06:45 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,710

Rep: Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972
Quote:
Originally Posted by SriRamaSan View Post
CentOS version I am working is CentOS 7.4
Script invokes the wizard python program based on newt python3 wizard.py -f config file
Right...so back to "It's probably the menu.sh file you're CALLING, but haven't shown"
Quote:
sorry for adding URGENT
Yeah.
 
Old 10-13-2018, 11:42 PM   #5
SriRamaSan
LQ Newbie
 
Registered: Sep 2018
Posts: 11

Original Poster
Rep: Reputation: Disabled
default.target

Hi all My problem got resolved, I had to ensure /etc/systemd/system/default.target points to target file which points to my service
 
  


Reply

Tags
service, systemd



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"URGENT" can't read "chan": no such variable ns-allinone-2.35 angelkot08 Linux - Wireless Networking 1 11-10-2016 07:10 AM
["Help Me!!" or "URGENT"] The folder contents could not be displayed lomaaaa Red Hat 3 09-06-2015 01:38 PM
Do you view uninformative thread subjects like "urgent", "please help", etc. bigrigdriver General 17 02-21-2008 01:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration