LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-19-2017, 09:26 AM   #1
Altoid
Member
 
Registered: Oct 2016
Location: Southern Hemisphere
Distribution: Devuan
Posts: 110

Rep: Reputation: Disabled
Shutdown issue


Hello:

I run on PCLinuxOS - 4.11.3-pclos2 and MATE desktop

Because I like it better than the stock option (net_applet), I've have setup Wicd to manage my connections.

T do that, I first installed Wicd and then:

- uninstalled net_applet
- unset the Control Center -> Network Center -> Wireless -> Configure -> 'Start the connection at boot' option
- set Wicd Network Manager Tray to startup at boot.

As a result, Wicd is working fine, but at shutdown I get a line that reads:

Code:
SHUTTING DOWN WICD SERVICES       [FAILED]
Maybe the problem is that it isn't having enough time to shutdown nicely?

Another thing is that I cannot find that line in syslog where (I suppose) these things should be logged at shutdown.

Are there shutdown logs?
If so, are they saved by default or is it something that has to be enabled?

Thanks in advance,

A.
 
Old 06-19-2017, 12:14 PM   #2
Laserbeak
Member
 
Registered: Jan 2017
Location: Manhattan, NYC NY
Distribution: Mac OS X, iOS, Solaris
Posts: 508

Rep: Reputation: 143Reputation: 143
The system should give reasonable time for the processes to shutdown cleanly (unless you use something like a "quick" option), so it may be a problem with that particular program.
 
Old 06-19-2017, 01:01 PM   #3
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

Rep: Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009
Logs are rotated. So if you look in /var/log, you'll see a few previous, compressed files of each log. Look in the previous log file with zcat.
 
Old 06-20-2017, 02:55 PM   #4
Altoid
Member
 
Registered: Oct 2016
Location: Southern Hemisphere
Distribution: Devuan
Posts: 110

Original Poster
Rep: Reputation: Disabled
Hello:
Quote:
Originally Posted by Laserbeak View Post
The system should give reasonable time for the processes to shutdown cleanly ...
Yes, I thought so too, which is why I posted this issue (which may not be one?).

I'm a bit out of my league here, so please bear with me. =-)
For completeness' sake, this is my setup.

Code:
[groucho@localhost ~]$ uname -a
Linux localhost.localdomain 4.11.3-pclos2 #1 SMP Sun Jun 4 22:16:40 CDT 2017 x86_64 x86_64 x86_64 GNU/Linux
[groucho@localhost ~]$
What I understand (?) is this:

1.
That when I shutdown my system through the DE (MATE), what I am doing is the same as opening a terminal and typing a command:

Code:
[groucho@localhost ~]$ halt
2.
That this command corresponds to a script with that same name that I can find in /etc/rc.d/init.d.

Code:
[groucho@localhost ~]$ ls /etc/rc.d/init.d | grep halt
halt*
[groucho@localhost ~]$
3.
That inside this script are all the steps necessary to do a clean system shutdown.

Code:
[groucho@localhost /]$ cat /etc/rc.d/init.d/halt
#!/bin/bash
# halt          This file is executed by init when it goes into runlevel
#               0 (halt) or runlevel 6 (reboot). It kills all processes,
#               unmounts file systems and then either halts or reboots.
Looking in the script, there seems to be a part of the script in charge of 'kills all processes' that points to the executable file *killall5*:

Code:
}

kill_all() {
    /sbin/killall5 "$@"
    rc=$?
    if [ "$rc" == 1 ]; then
	return 1
    fi
    return 0
}
As the machine does shutdown, this executable would seem to be working properly but for some reason wicd services are not being shut down nicely, hence the [FAILED] notice.

So I searched a bit more and found another script with the telltale text "Shutting down wicd services: " in /etc/rc.d/rc0.d and called K89wicd.

The part of the script with the text I refer above to is this:

Code:
 stop)
		if [ -f /var/lock/subsys/wicd ]; then
			gprintf "Shutting down wicd services: "
			killproc -p /var/run/wicd/wicd.pid wicd -15
			#killall wicd
			RETVAL=$?
			echo
			if [ $RETVAL -eq 0 ]; then
			       rm -f /var/lock/subsys/wicd
			       rm -f /var/run/wicd/wicd.pid
			else
				gprintf "Wicd not running"
				echo
				exit 7
			fi
		fi
The command is:

Code:
killproc -p /var/run/wicd/wicd.pid wicd -15
and not ...

Code:
#killall wicd
... which is commented out but would be an option (?).

I tried running *killall wicd* in a terminal and it works.

Some research showed me that *killproc* is defined in /etc/init.d/functions.
The whole thing is rather long, but the part I found that refers to stoping a program is this:

Code:
gprintf "Usage: killproc [-p pidfile] [ -d delay] {program} [-signal]"
Which is the same as what we see above ...

ie:
Code:
killproc -p /var/run/wicd/wicd.pid wicd -15
... but without the [-d] (delay) option.

Before this gets too long (and tedious) I'll ask a couple of questions to those who actually know about this:

1. is the [FAIL] I mention in the OP relevant?
2. if it isn't, why doesn't the script use *killall wicd* instead of *killproc*?
3. if it is relevant, what would be keeping the script from working properly?
4. would it just be a matter of adding time (say [-5]) to the *killproc* line?

Thanks in advance,

A.
 
Old 06-22-2017, 02:23 AM   #5
Laserbeak
Member
 
Registered: Jan 2017
Location: Manhattan, NYC NY
Distribution: Mac OS X, iOS, Solaris
Posts: 508

Rep: Reputation: 143Reputation: 143
Have you tried to upgrade it?

From what I can tell, it's basically a network interface helper, so force quitting it shouldn't cause any real problems IMO. I wouldn't lose any sleep over it.
 
Old 06-26-2017, 12:13 AM   #6
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

Rep: Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009
The error is not important. Linux learns on boot up and shut down. It makes notes for itself so it can do better in the future. You'll probably find the error vanishes after a a few shut downs.
 
Old 06-26-2017, 07:52 AM   #7
Altoid
Member
 
Registered: Oct 2016
Location: Southern Hemisphere
Distribution: Devuan
Posts: 110

Original Poster
Rep: Reputation: Disabled
Hello:
Quote:
Originally Posted by AwesomeMachine
The error is not important.
Linux learns on boot up and shut down.
... probably find the error vanishes after a a few shut downs.
Well, it's easily been over 70 boot/shutdown cycles since I installed Wicd and the issue remains.

I have another issue with Wicd posted here at the Wicd launchpad site which would seem to be a permissions problem.

I have the gut feeling that these two may well be related.
If you have a moment to spare, please check it out and tell me what you think.

Thanks in advance,

A.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Shutdown issue! ivtec Ubuntu 5 05-08-2014 11:31 AM
Shutdown script issue glennbtn Linux - Server 2 12-20-2013 04:39 AM
Shutdown Issue midnytblu Linux - Newbie 7 08-01-2008 01:09 AM
shutdown issue using centos 5.0 alex.archip Linux - Laptop and Netbook 4 09-09-2007 01:01 AM
Shutdown issue under X FlodderMouse Linux - General 7 12-20-2001 10:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:25 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