source: lsb-bootscripts/etc/init.d/sendsignals@ 8476b9e1

7.1
Last change on this file since 8476b9e1 was f3f65e73, checked in by DJ Lucas <dj@…>, 13 years ago

Added stop_on_error parameter to rc.site and cleaned up Begin and End lines.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@9552 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 1.2 KB
RevLine 
[1c48007]1#!/bin/sh
[f3f65e73]2# Begin $RC_BASE/init.d/sendsignals
[1c48007]3
4### BEGIN INIT INFO
5# Provides: sendsignals
6# Required-Start:
7# Should-Start:
[614a14e]8# Required-Stop: $local_fs swap localnet
[010d108]9# Should-Stop:
10# Default-Start:
11# Default-Stop: 0 6
[1c48007]12# Short-Description: Attempts to kill remaining processes.
13# Description: Attempts to kill remaining processes.
14# X-LFS-Provided-By: LFS
15### END INIT INFO
16
17. /lib/lsb/init-functions
18
19case "${1}" in
20 stop)
21 message="Sending all processes the TERM signal..."
22 killall5 -15
23 error_value=${?}
[d2abc4d]24 # Account for successful return value of 2
[12078f7]25 if [ ${error_value} -eq 2 ]; then
[5597318]26 error_value=0
[d2abc4d]27 fi
[1c48007]28 sleep 3
29
30 (exit ${error_value})
31 evaluate_retval standard
32
33 message="Sending all processes the KILL signal..."
34 killall5 -9
35 error_value=${?}
[d2abc4d]36 # Account for successful return value of 2
[12078f7]37 if [ ${error_value} -eq 2 ]; then
[5597318]38 error_value=0
[d2abc4d]39 fi
[1c48007]40
41 sleep 3
42
43 (exit ${error_value})
44 evaluate_retval standard
45 ;;
46
47 *)
48 echo "Usage: ${0} {stop}"
49 exit 1
50 ;;
51
52esac
53
[f3f65e73]54# End $RC_BASE/init.d/sendsignals
Note: See TracBrowser for help on using the repository browser.