source: bootscripts/lfs/init.d/sendsignals@ 6a11766

11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 6a11766 was 6a11766, checked in by Thomas Trepl (Moody) <thomas@…>, 3 years ago

Avoid killing mdmon at shutdown/reboot

  • Property mode set to 100644
File size: 1.5 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 omit=$(pidof mdmon)
33 [ -n "$omit" ] && omit="-o $omit"
34
35 log_info_msg "Sending all processes the TERM signal..."
36 killall5 -15 $omit
37 error_value=${?}
38
39 sleep ${KILLDELAY}
40
41 if [ "${error_value}" = 0 -o "${error_value}" = 2 ]; then
42 log_success_msg
43 else
44 log_failure_msg
45 fi
46
47 log_info_msg "Sending all processes the KILL signal..."
48 killall5 -9 $omit
49 error_value=${?}
50
51 sleep ${KILLDELAY}
52
53 if [ "${error_value}" = 0 -o "${error_value}" = 2 ]; then
54 log_success_msg
55 else
56 log_failure_msg
57 fi
58 ;;
59
60 *)
61 echo "Usage: ${0} {stop}"
62 exit 1
63 ;;
64
65esac
66
67exit 0
68
69# End sendsignals
Note: See TracBrowser for help on using the repository browser.