OSDN Git Service

Update to lfsbook 7.2.ja
[linuxjf/JF.git] / docs / LFS-BOOK / scripts / apds18.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4   <head>
5     <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
6     <title>
7       D.18. /etc/rc.d/init.d/sendsignals
8     </title>
9     <link rel="stylesheet" href="../stylesheets/lfs.css" type="text/css" />
10     <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
11     <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
12     "text/css" media="print" />
13   </head>
14   <body class="lfs" id="lfs-7.2">
15     <div class="navheader">
16       <h4>
17         Linux From Scratch - Version 7.2
18       </h4>
19       <h3>
20         付録 D. ブートスクリプトと sysconfig スクリプト version-20120901
21       </h3>
22       <ul>
23         <li class="prev">
24           <a accesskey="p" href="apds17.html" title=
25           "/etc/rc.d/init.d/network">前のページ</a>
26           <p>
27             /etc/rc.d/init.d/network
28           </p>
29         </li>
30         <li class="next">
31           <a accesskey="n" href="apds19.html" title=
32           "/etc/rc.d/init.d/reboot">次のページ</a>
33           <p>
34             /etc/rc.d/init.d/reboot
35           </p>
36         </li>
37         <li class="up">
38           <a accesskey="u" href="scripts.html" title=
39           "付録 D. ブートスクリプトと sysconfig スクリプト version-20120901">上に戻る</a>
40         </li>
41         <li class="home">
42           <a accesskey="h" href="../index.html" title=
43           "Linux From Scratch - Version 7.2">ホーム</a>
44         </li>
45       </ul>
46     </div>
47     <div class="wrap" lang="ja" xml:lang="ja">
48       <h1 class="sect1">
49         <a id="sendsignals" name="sendsignals"></a>D.18.
50         /etc/rc.d/init.d/sendsignals
51       </h1>
52       <pre class="screen">
53 #!/bin/sh
54 ########################################################################
55 # Begin sendsignals
56 #
57 # Description : Sendsignals Script
58 #
59 # Authors     : Gerard Beekmans - gerard@linuxfromscratch.org
60 #               DJ Lucas - dj@linuxfromscratch.org
61 # Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
62 #
63 # Version     : LFS 7.0
64 #
65 ########################################################################
66
67 ### BEGIN INIT INFO
68 # Provides:            sendsignals
69 # Required-Start:
70 # Should-Start:
71 # Required-Stop:       $local_fs swap localnet
72 # Should-Stop:
73 # Default-Start:
74 # Default-Stop:        0 6
75 # Short-Description:   Attempts to kill remaining processes.
76 # Description:         Attempts to kill remaining processes.
77 # X-LFS-Provided-By:   LFS
78 ### END INIT INFO
79
80 . /lib/lsb/init-functions
81
82 case "${1}" in
83    stop)
84       log_info_msg "Sending all processes the TERM signal..."
85       killall5 -15
86       error_value=${?}
87
88       sleep ${KILLDELAY}
89
90       if [ "${error_value}" = 0 -o "${error_value}" = 2 ]; then
91          log_success_msg
92       else
93          log_failure_msg
94       fi
95
96       log_info_msg "Sending all processes the KILL signal..."
97       killall5 -9
98       error_value=${?}
99
100       sleep ${KILLDELAY}
101
102       if [ "${error_value}" = 0 -o "${error_value}" = 2 ]; then
103          log_success_msg
104       else
105          log_failure_msg
106       fi
107       ;;
108
109    *)
110       echo "Usage: ${0} {stop}"
111       exit 1
112       ;;
113
114 esac
115
116 exit 0
117
118 # End sendsignals
119 </pre>
120     </div>
121     <div class="navfooter">
122       <ul>
123         <li class="prev">
124           <a accesskey="p" href="apds17.html" title=
125           "/etc/rc.d/init.d/network">前のページ</a>
126           <p>
127             /etc/rc.d/init.d/network
128           </p>
129         </li>
130         <li class="next">
131           <a accesskey="n" href="apds19.html" title=
132           "/etc/rc.d/init.d/reboot">次のページ</a>
133           <p>
134             /etc/rc.d/init.d/reboot
135           </p>
136         </li>
137         <li class="up">
138           <a accesskey="u" href="scripts.html" title=
139           "付録 D. ブートスクリプトと sysconfig スクリプト version-20120901">上に戻る</a>
140         </li>
141         <li class="home">
142           <a accesskey="h" href="../index.html" title=
143           "Linux From Scratch - Version 7.2">ホーム</a>
144         </li>
145       </ul>
146     </div>
147   </body>
148 </html>