/usr/share/doc/HOWTO/ja-html/Root-RAID-HOWTO-9.html is in doc-linux-ja-html 2006.05.25-1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.21">
<TITLE>Root RAID HOWTO cookbook: $B%7%c%C%H%@%&%s%9%/%j%W%H$NNc(B </TITLE>
<LINK HREF="Root-RAID-HOWTO-10.html" REL=next>
<LINK HREF="Root-RAID-HOWTO-8.html" REL=previous>
<LINK HREF="Root-RAID-HOWTO.html#toc9" REL=contents>
</HEAD>
<BODY>
<A HREF="Root-RAID-HOWTO-10.html">$B<!$N%Z!<%8(B</A>
<A HREF="Root-RAID-HOWTO-8.html">$BA0$N%Z!<%8(B</A>
<A HREF="Root-RAID-HOWTO.html#toc9">$BL\<!$X(B</A>
<HR>
<H2><A NAME="Appendix-B"></A> <A NAME="s9">9.</A> <A HREF="Root-RAID-HOWTO.html#toc9">$B%7%c%C%H%@%&%s%9%/%j%W%H$NNc(B </A></H2>
<P>
<UL>
<LI>
<A HREF="#Slackware">Slackware</A></LI>
<LI>
<A HREF="#Debian">Debian</A></LI>
</UL>
</P>
<H2><A NAME="Slackware"></A> <A NAME="ss9.1">9.1</A> <A HREF="Root-RAID-HOWTO.html#toc9.1">Slackware - /etc/rc.d/rc.6 </A>
</H2>
<P>
<PRE>
#! /bin/sh
#
# rc.6 This file is executed by init when it goes into runlevel
# 0 (halt) or runlevel 6 (reboot). It kills all processes,
# unmounts file systems and then either halts or reboots.
#
# Version: @(#)/etc/rc.d/rc.6 1.50 1994-01-15
#
# Author: Miquel van Smoorenburg <miquels@drinkel.nl.mugnet.org>
# Modified by: Patrick J. Volkerding, <volkerdi@ftp.cdrom.com>
#
# Modified by: Michael A. Robinton < michael@bizsystems.com >
# to add call to rc.raidown
# Set the path.
PATH=/sbin:/etc:/bin:/usr/bin
# Set linefeed mode to avoid staircase effect.
stty onlcr
echo "Running shutdown script $0:"
# Find out how we were called.
case "$0" in
*0)
message="The system is halted."
command="halt"
;;
*6)
message="Rebooting."
command=reboot
;;
*)
echo "$0: call me as \"rc.0\" or \"rc.6\" please!"
exit 1
;;
esac
############ Save raid boot and status info ##############
#
if [ -x /etc/rc.d/rc.raidown ]; then
/etc/rc.d/rc.raidown
fi
################## end raid boot #########################
# Kill all processes.
# INIT is supposed to handle this entirely now, but this didn't always
# work correctly without this second pass at killing off the processes.
# Since INIT already notified the user that processes were being killed,
# we'll avoid echoing this info this time around.
if [ "$1" != "fast" ]; then # shutdown did not already kill all processes
killall5 -15
killall5 -9
fi
# Try to turn off quota and accounting.
if [ -x /usr/sbin/quotaoff ]
then
echo "Turning off quota."
/usr/sbin/quotaoff -a
fi
if [ -x /sbin/accton ]
then
echo "Turning off accounting."
/sbin/accton
fi
# Before unmounting file systems write a reboot or halt record to wtmp.
$command -w
# Save localtime
[ -e /usr/lib/zoneinfo/localtime ] && cp /usr/lib/zoneinfo/localtime /etc
# Asynchronously unmount any remote filesystems:
echo "Unmounting remote filesystems."
umount -a -tnfs &
# Turn off swap, then unmount local file systems.
echo "Turning off swap."
swapoff -a
echo "Unmounting local file systems."
umount -a -tnonfs
# Don't remount UMSDOS root volumes:
if [ ! "`mount | head -1 | cut -d ' ' -f 5`" = "umsdos" ]; then
mount -n -o remount,ro /
fi
################ for raid arrays #########################
# Stop all known raid arrays (except root which won't stop)
if [ -x /sbin/mdstop ]; then
echo "Stopping raid"
/sbin/mdstop -a
fi
##########################################################
# See if this is a powerfail situation.
if [ -f /etc/powerstatus ]; then
echo "Turning off UPS, bye."
/sbin/powerd -q
exit 1
fi
# Now halt or reboot.
echo "$message"
[ ! -f /etc/fastboot ] && echo "On the next boot fsck will be FORCED."
$command -f
############### end rc.6 #################################
</PRE>
</P>
<H2><A NAME="Debian"></A> <A NAME="ss9.2">9.2</A> <A HREF="Root-RAID-HOWTO.html#toc9.2">Debian bo - /etc/init.d/halt and /etc/init.d/reboot </A>
</H2>
<P>The modifications shown here for Debian bo halt and reboot files are NOT
TESTED. When you test this, please e-mail me so I can remove this comment.</P>
<H3>/etc/init.d/halt</H3>
<P>
<PRE>
#! /bin/sh
#
# halt The commands in this script are executed as the last
# step in runlevel 0, ie halt.
#
# Version: @(#)halt 1.10 26-Apr-1997 miquels@cistron.nl
#
PATH=/sbin:/bin:/usr/sbin:/usr/bin
############ Save raid boot and status info ##############
#
if [ -x /etc/rc.d/rc.raidown ]; then
/etc/rc.d/rc.raidown
fi
################## end raid boot #########################
# Kill all processes.
echo -n "Sending all processes the TERM signal... "
killall5 -15
echo "done."
sleep 5
echo -n "Sending all processes the KILL signal... "
killall5 -9
echo "done."
# Write a reboot record to /var/log/wtmp.
halt -w
# Save the random seed between reboots.
/etc/init.d/urandom stop
echo -n "Deactivating swap... "
swapoff -a
echo "done."
echo -n "Unmounting file systems... "
umount -a
echo "done."
mount -n -o remount,ro /
################ for raid arrays #########################
# Stop all known raid arrays (except root which won't stop)
if [ -x /sbin/mdstop ]; then
echo "Stopping raid"
/sbin/mdstop -a
fi
##########################################################
# See if we need to cut the power.
if [ -x /etc/init.d/ups-monitor ]
then
/etc/init.d/ups-monitor poweroff
fi
halt -d -f
############# end halt ####################
</PRE>
</P>
<H3>/etc/init.d/reboot</H3>
<P>
<PRE>
#! /bin/sh
#
# reboot The commands in this script are executed as the last
# step in runlevel 6, ie reboot.
#
# Version: @(#)reboot 1.9 02-Feb-1997 miquels@cistron.nl
#
PATH=/sbin:/bin:/usr/sbin:/usr/bin
############ Save raid boot and status info ##############
#
if [ -x /etc/rc.d/rc.raidown ]; then
/etc/rc.d/rc.raidown
fi
################## end raid boot #########################
# Kill all processes.
echo -n "Sending all processes the TERM signal... "
killall5 -15
echo "done."
sleep 5
echo -n "Sending all processes the KILL signal... "
killall5 -9
echo "done."
# Write a reboot record to /var/log/wtmp.
halt -w
# Save the random seed between reboots.
/etc/init.d/urandom stop
echo -n "Deactivating swap... "
swapoff -a
echo "done."
echo -n "Unmounting file systems... "
umount -a
echo "done."
mount -n -o remount,ro /
################ for raid arrays #########################
# Stop all known raid arrays (except root which won't stop)
if [ -x /sbin/mdstop ]; then
echo "Stopping raid"
/sbin/mdstop -a
fi
##########################################################
echo -n "Rebooting... "
reboot -d -f -i
</PRE>
</P>
<HR>
<A HREF="Root-RAID-HOWTO-10.html">$B<!$N%Z!<%8(B</A>
<A HREF="Root-RAID-HOWTO-8.html">$BA0$N%Z!<%8(B</A>
<A HREF="Root-RAID-HOWTO.html#toc9">$BL\<!$X(B</A>
</BODY>
</HTML>
|