From c4d43142181a45b849a15cf8ec5ebe61cea33897 Mon Sep 17 00:00:00 2001 From: Sn4il Date: Wed, 10 Jan 2024 16:57:29 +0300 Subject: LFS 12 mirror --- lfs-12.0-sysv/scripts/apds17.html | 151 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 lfs-12.0-sysv/scripts/apds17.html (limited to 'lfs-12.0-sysv/scripts/apds17.html') diff --git a/lfs-12.0-sysv/scripts/apds17.html b/lfs-12.0-sysv/scripts/apds17.html new file mode 100644 index 0000000..f67d58a --- /dev/null +++ b/lfs-12.0-sysv/scripts/apds17.html @@ -0,0 +1,151 @@ + + + + + + D.17. /etc/rc.d/init.d/sendsignals + + + + + + + + +
+

+ D.17. + /etc/rc.d/init.d/sendsignals +

+
#!/bin/sh
+########################################################################
+# Begin sendsignals
+#
+# Description : Sendsignals Script
+#
+# Authors     : Gerard Beekmans - gerard@linuxfromscratch.org
+#               DJ Lucas - dj@linuxfromscratch.org
+# Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
+#
+# Version     : LFS 7.0
+#
+########################################################################
+
+### BEGIN INIT INFO
+# Provides:            sendsignals
+# Required-Start:
+# Should-Start:
+# Required-Stop:       $local_fs swap localnet
+# Should-Stop:
+# Default-Start:
+# Default-Stop:        0 6
+# Short-Description:   Attempts to kill remaining processes.
+# Description:         Attempts to kill remaining processes.
+# X-LFS-Provided-By:   LFS
+### END INIT INFO
+
+. /lib/lsb/init-functions
+
+case "${1}" in
+   stop)
+      omit=$(pidof mdmon)
+      [ -n "$omit" ] && omit="-o $omit"
+
+      log_info_msg "Sending all processes the TERM signal..."
+      killall5 -15 $omit
+      error_value=${?}
+
+      sleep ${KILLDELAY}
+
+      if [ "${error_value}" = 0 -o "${error_value}" = 2 ]; then
+         log_success_msg
+      else
+         log_failure_msg
+      fi
+
+      log_info_msg "Sending all processes the KILL signal..."
+      killall5 -9 $omit
+      error_value=${?}
+
+      sleep ${KILLDELAY}
+
+      if [ "${error_value}" = 0 -o "${error_value}" = 2 ]; then
+         log_success_msg
+      else
+         log_failure_msg
+      fi
+      ;;
+
+   *)
+      echo "Usage: ${0} {stop}"
+      exit 1
+      ;;
+
+esac
+
+exit 0
+
+# End sendsignals
+
+
+ + + -- cgit v1.2.3