Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: /home doesn't umount on shutdown
Date: Tue, 15 Jan 2013 23:23:25
Message-Id: 50F5E4DD.1060004@gmail.com
In Reply to: [gentoo-user] Re: /home doesn't umount on shutdown by Remy Blank
1 Remy Blank wrote:
2 > Dale wrote:
3 >> Care to share that script? ;-) May try that myself.
4 >
5 > Sure, here it is:
6 >
7 > $ cat .kde4/shutdown/cleanup-kde-processes
8 > #!/bin/bash
9 >
10 > log() {
11 > logger -t "$(basename $0)" "$1"
12 > }
13 >
14 > is_running() {
15 > killall -0 -u $USER "$1"
16 > }
17 >
18 > kill_if_running() {
19 > sleep 15
20 > is_running startkde && return 0
21 > if is_running $1; then
22 > log "$1 still running, sending TERM"
23 > killall -s TERM $1
24 > sleep 5
25 > is_running startkde && return 0
26 > if is_running $1; then
27 > log "$1 still running, sending KILL"
28 > killall -s KILL $1
29 > fi
30 > fi
31 > }
32 >
33 > kill_if_running kded4 &
34 > kill_if_running nepomukserver &
35 >
36
37 Thanks much. This will be better than killing them all one by one.
38
39 Dale
40
41 :-) :-)
42
43 --
44 I am only responsible for what I said ... Not for what you understood or
45 how you interpreted my words!