source: bootscripts/lfs/init.d/sendsignals@ 1fa2099

multilib-10.1
Last change on this file since 1fa2099 was 1fa2099, checked in by Thomas Trepl <thomas@…>, 5 years ago

Initial creation of multilib branch

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/multilib@11565 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 1.4 KB
Line 
1#!/bin/sh
2########################################################################
3# Begin sendsignals
4#
5# Description : Sendsignals Script
6#
7# Authors : Gerard Beekmans - gerard@linuxfromscratch.org
8# DJ Lucas - dj@linuxfromscratch.org
9# Update : Bruce Dubbs - bdubbs@linuxfromscratch.org
10#
11# Version : LFS 7.0
12#
13########################################################################
14
15### BEGIN INIT INFO
16# Provides: sendsignals
17# Required-Start:
18# Should-Start:
19# Required-Stop: $local_fs swap localnet
20# Should-Stop:
21# Default-Start:
22# Default-Stop: 0 6
23# Short-Description: Attempts to kill remaining processes.
24# Description: Attempts to kill remaining processes.
25# X-LFS-Provided-By: LFS
26### END INIT INFO
27
28. /lib/lsb/init-functions
29
30case "${1}" in
31 stop)
32 log_info_msg "Sending all processes the TERM signal..."
33 killall5 -15
34 error_value=${?}
35
36 sleep ${KILLDELAY}
37
38 if [ "${error_value}" = 0 -o "${error_value}" = 2 ]; then
39 log_success_msg
40 else
41 log_failure_msg
42 fi
43
44 log_info_msg "Sending all processes the KILL signal..."
45 killall5 -9
46 error_value=${?}
47
48 sleep ${KILLDELAY}
49
50 if [ "${error_value}" = 0 -o "${error_value}" = 2 ]; then
51 log_success_msg
52 else
53 log_failure_msg
54 fi
55 ;;
56
57 *)
58 echo "Usage: ${0} {stop}"
59 exit 1
60 ;;
61
62esac
63
64exit 0
65
66# End sendsignals
Note: See TracBrowser for help on using the repository browser.