LinuxQuestions.org
Review your favorite Linux distribution.
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 05-01-2020, 10:13 AM   #1
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
systemctl rescue does not kill interactive shells?


I thought that the rescue target, which I can enter from multi-user with the commands systemctl rescue or systemctl isolate rescue, is single-user mode.

However I just found that on my Centos 8 server, existing interactive sessions continue. Also, systemctl rescue is supposed to send a message to all logged-in users but doesn't. I also expected it to shut down networking - it is obviously up.

The sshd service is shut down.

On a Debian 10 server, the behavior is different. The main network interface is shut down, but the bash process that I launched by logging on via ssh is still running.

I expected all interactive sessions and the network interfaces to be stopped. Is there a problem with the servers' configuration or is my expectation wrong?

Last edited by berndbausch; 05-01-2020 at 10:14 AM. Reason: formatting
 
Old 05-02-2020, 05:47 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,145

Rep: Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124
Never considered it - but that command is documented as blocking. Why would you use it in preference to a reboot specifying a boot target ?.
 
Old 05-02-2020, 09:19 PM   #3
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Original Poster
Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by syg00 View Post
Never considered it - but that command is documented as blocking. Why would you use it in preference to a reboot specifying a boot target ?.
I don't care that it's blocking. Rebooting and entering the rescue target requires altering the Grub menuentry, which is more work, less convenience and slightly risky.

I guess I just don't like undocumented behaviour, or behaviour that contradicts documentation. According to the documentation, systemctl rescue is the same as systemctl isolate rescue.target, and isolate means that services that are not in the rescue target should be stopped. This doesn't happen.

So yes I am complaining, but perhaps there is really something that I don't understand correctly.
 
  


Reply

Tags
centos, debian, rescue, 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
Restart systemctl*daemon​ - systemctl command not found cjosephl Linux - Newbie 7 11-11-2017 04:53 PM
[SOLVED] Of interactive and non-interactive shells. stf92 Linux - Newbie 1 10-05-2011 12:37 PM
Interactive and non-interactive shells? Tim356 Linux - Newbie 7 11-05-2008 10:32 PM
Login shells / Non-login shells tofee Linux - Newbie 1 03-24-2006 11:03 PM
Login shells vs non-login shells lsmith Linux - General 2 03-31-2004 07:29 PM

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

All times are GMT -5. The time now is 06:16 AM.

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