Hello:
Quote:
Originally Posted by Laserbeak
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 ...
... 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.