Dimon
09-10-2003, 18:46
Имеется следующая проблема: слака 9.0, не производится нормальная перезагрузка и выключение
системы. Выдается следующее:
INIT: Sending processes TERM signal
INIT: Sending processes KILL signal
INIT: cannot execute /etc/rc.d/rc.0:/sbin/poweroff (/sbin/reboot)
Содержимое /etc/rc.d/rc.0 (rc.6)
#Set the path.
PATH=/sbin:/etc:/bin:/usr/bin
# If there are SystemV init scripts for this runlevel, run them.
if [ -x /etc/rc.d/rc.sysvinit ]; then
. /etc/rc.d/rc.sysvinit
fi
# Set linefeed mode to avoid staircase effect.
stty onlcr
echo "Running shutdown script $0:"
# Find out how we were called.
case "$0" in
*0)
command="halt" echo "HALT"
;;
*6)
command=reboot
;;
*)
echo "$0: call me as \"rc.0\" or \"rc.6\" please!"
exit 1
;;
esac
# Save the system time to the hardware clock using hwclock --systohc.
# Detect SGI Visual Workstation, since hwclock will make those freeze up:
if fgrep -l Cobalt-APIC /proc/interrupts 1> /dev/null 2> /dev/null ; then
echo "SGI Visual Workstation detected. Not running hwclock."
elif [ -x /sbin/hwclock ]; then
if grep "^UTC" /etc/hardwareclock 1> /dev/null 2> /dev/null ; then
echo "Saving system time to the hardware clock (UTC)."
/sbin/hwclock --utc --systohc
else
echo "Saving system time to the hardware clock (localtime)."
/sbin/hwclock --localtime --systohc
fi
fi
# Stop the Apache web server:
echo "Stopping Apache server"
if [ -x /etc/rc.d/rc.httpd ]; then
/etc/rc.d/rc.httpd stop
fi
# Stop the Samba server:
echo "Stopping Samba server"
if [ -x /etc/rc.d/rc.samba ]; then
. /etc/rc.d/rc.samba stop
fi
# Shut down the NFS server:
echo "Shutting down NFS server"
if [ -x /etc/rc.d/rc.nfsd ]; then
/etc/rc.d/rc.nfsd stop
fi
# Unmount any NFS or SMB filesystems:
echo "Unmounting remote filesystems."
umount -a -r -t nfs,smbfs
# Stopping vmware services
echo "Stopping VMware services"
if [ -x /etc/rc.d/rc.vmware_stop ]; then
exec /etc/rc.d/rc.vmware_stop stop
fi
# Try to kill dhcpcd so the DHCP leases can be returned:
killall -15 dhcpcd 1> /dev/null 2> /dev/null
# Shut down PCMCIA devices:
if [ -x /etc/rc.d/rc.pcmcia ] ; then
. /etc/rc.d/rc.pcmcia stop
# The cards might need a little extra time here to initialize.
sleep 5
fi
# Turn off process accounting:
if [ -x /sbin/accton -a -r /var/log/pacct ]; then
echo "Turning off process accounting."
/sbin/accton
fi
# 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
sleep 5
killall5 -9
fi
# Try to turn off quota:
if fgrep quota /etc/fstab 1> /dev/null 2> /dev/null ; then
if [ -x /sbin/quotaoff ]; then
echo "Turning off filesystem quotas."
/sbin/quotaoff -a
fi
fi
# Before unmounting file systems write a reboot or halt record to wtmp.
$command -w
# Carry a random seed between reboots.
# Save 512 bytes, which is the size of the entropy pool.
echo "Saving random seed from /dev/urandom in /etc/random-seed."
dd if=/dev/urandom of=/etc/random-seed count=1 bs=512 2> /dev/null
# Clear /var/lock/subsys.
if [ -d /var/lock/subsys ]; then
rm -f /var/lock/subsys/*
fi
# Turn off swap, then unmount local file systems.
echo "Turning off swap."
swapoff -a
echo "Unmounting local file systems."
# Don't remount UMSDOS root volumes:
if [ ! "`mount | head -1 | cut -d ' ' -f 5`" = "umsdos" ]; then
umount -a -r -t nonfs
echo "Remounting root filesystem read-only."
mount -n -o remount,ro /
else
umount -a -r -t nonfs,noumsdos,nosmbfs
fi
# This never hurts:
sync
# If we're using LVM, we need to deactivate the volume groups:
if [ -r /etc/lvmtab ]; then
/sbin/vgchange -an
fi
# sleep 1 fixes problems with some hard drives that don't
# otherwise finish syncing before reboot or poweroff
sleep 1
# This is to ensure all processes have completed on SMP machines:
wait
if [ -x /sbin/genpowerd ]; then
# See if this is a powerfail situation:
if grep FAIL /etc/upsstatus 1> /dev/null 2> /dev/null ; then
# Signal UPS to shut off the inverter:
/sbin/genpowerd -k /dev/ttyS4 tripp-nt
if [ ! $? = 0 ]; then
echo
echo "There was an error signaling the UPS."
echo "Perhaps you need to edit /etc/rc.d/rc.6 to configure"
echo "the serial line and UPS type."
# Wasting 15 seconds of precious power:
sleep 15
fi
fi
fi
Содержимое /etc/inittab:
#
# inittabThis file describes how the INIT process should set up
#the system in a certain run-level.
#
# Version:@(#)inittab2.0417/05/93MvS
# 2.10 02/10/95 PV
# 3.00 02/06/1999 PV
# 4.00 04/10/2002 PV
#
# Author:Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
# Modified by:Patrick J. Volkerding, <volkerdi@slackware.com>
#
# These are the default runlevels in Slackware:
# 0 = halt
# 1 = single user mode
# 2 = unused (but configured the same as runlevel 3)
# 3 = multiuser mode (default Slackware runlevel)
# 4 = X11 with KDM/GDM/XDM (session managers)
# 5 = unused (but configured the same as runlevel 3)
# 6 = reboot
# Default runlevel. (Do not set to 0 or 6)
id:4:initdefault:
# System initialization (runs when system boots).
si:S:sysinit:/etc/rc.d/rc.S
# Script to run when going single user (runlevel 1).
su:1S:wait:/etc/rc.d/rc.K
# Script to run when going multi user.
rc:2345:wait:/etc/rc.d/rc.M
# What to do at the "Three Finger Salute".
ca::ctrlaltdel:/sbin/shutdown -t5 -r now
# Runlevel 0 halts the system.
l0:0:wait:/etc/rc.d/rc.0:/sbin/shutdown -t5 -r now
# Runlevel 6 reboots the system.
l6:6:wait:/etc/rc.d/rc.6:/sbin/reboot
# What to do when power fails.
pf::powerfail:/sbin/genpowerfail start
# If power is back, cancel the running shutdown.
pg::powerokwait:/sbin/genpowerfail stop
# These are the standard console login getties in multiuser mode:
c1:1235:respawn:/sbin/agetty 38400 tty1 linux
c2:1235:respawn:/sbin/agetty 38400 tty2 linux
c3:1235:respawn:/sbin/agetty 38400 tty3 linux
c4:1235:respawn:/sbin/agetty 38400 tty4 linux
c5:1235:respawn:/sbin/agetty 38400 tty5 linux
c6:12345:respawn:/sbin/agetty 38400 tty6 linux
# Local serial lines:
#s1:12345:respawn:/sbin/agetty -L ttyS0 9600 vt100
#s2:12345:respawn:/sbin/agetty -L ttyS1 9600 vt100
# Dialup lines:
#d1:12345:respawn:/sbin/agetty -mt60 38400,19200,9600,2400,1200 ttyS0 vt100
#d2:12345:respawn:/sbin/agetty -mt60 38400,19200,9600,2400,1200 ttyS1 vt100
# Runlevel 4 used to be for an X window only system, until we discovered
# that it throws init into a loop that keeps your load avg at least 1 all
# the time. Thus, there is now one getty opened on tty6. Hopefully no one
# will notice. ;^)
# It might not be bad to have one text console anyway, in case something
# happens to X.
x1:4:wait:/etc/rc.d/rc.4
# End of /etc/inittab
В чем может быть дело?
системы. Выдается следующее:
INIT: Sending processes TERM signal
INIT: Sending processes KILL signal
INIT: cannot execute /etc/rc.d/rc.0:/sbin/poweroff (/sbin/reboot)
Содержимое /etc/rc.d/rc.0 (rc.6)
#Set the path.
PATH=/sbin:/etc:/bin:/usr/bin
# If there are SystemV init scripts for this runlevel, run them.
if [ -x /etc/rc.d/rc.sysvinit ]; then
. /etc/rc.d/rc.sysvinit
fi
# Set linefeed mode to avoid staircase effect.
stty onlcr
echo "Running shutdown script $0:"
# Find out how we were called.
case "$0" in
*0)
command="halt" echo "HALT"
;;
*6)
command=reboot
;;
*)
echo "$0: call me as \"rc.0\" or \"rc.6\" please!"
exit 1
;;
esac
# Save the system time to the hardware clock using hwclock --systohc.
# Detect SGI Visual Workstation, since hwclock will make those freeze up:
if fgrep -l Cobalt-APIC /proc/interrupts 1> /dev/null 2> /dev/null ; then
echo "SGI Visual Workstation detected. Not running hwclock."
elif [ -x /sbin/hwclock ]; then
if grep "^UTC" /etc/hardwareclock 1> /dev/null 2> /dev/null ; then
echo "Saving system time to the hardware clock (UTC)."
/sbin/hwclock --utc --systohc
else
echo "Saving system time to the hardware clock (localtime)."
/sbin/hwclock --localtime --systohc
fi
fi
# Stop the Apache web server:
echo "Stopping Apache server"
if [ -x /etc/rc.d/rc.httpd ]; then
/etc/rc.d/rc.httpd stop
fi
# Stop the Samba server:
echo "Stopping Samba server"
if [ -x /etc/rc.d/rc.samba ]; then
. /etc/rc.d/rc.samba stop
fi
# Shut down the NFS server:
echo "Shutting down NFS server"
if [ -x /etc/rc.d/rc.nfsd ]; then
/etc/rc.d/rc.nfsd stop
fi
# Unmount any NFS or SMB filesystems:
echo "Unmounting remote filesystems."
umount -a -r -t nfs,smbfs
# Stopping vmware services
echo "Stopping VMware services"
if [ -x /etc/rc.d/rc.vmware_stop ]; then
exec /etc/rc.d/rc.vmware_stop stop
fi
# Try to kill dhcpcd so the DHCP leases can be returned:
killall -15 dhcpcd 1> /dev/null 2> /dev/null
# Shut down PCMCIA devices:
if [ -x /etc/rc.d/rc.pcmcia ] ; then
. /etc/rc.d/rc.pcmcia stop
# The cards might need a little extra time here to initialize.
sleep 5
fi
# Turn off process accounting:
if [ -x /sbin/accton -a -r /var/log/pacct ]; then
echo "Turning off process accounting."
/sbin/accton
fi
# 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
sleep 5
killall5 -9
fi
# Try to turn off quota:
if fgrep quota /etc/fstab 1> /dev/null 2> /dev/null ; then
if [ -x /sbin/quotaoff ]; then
echo "Turning off filesystem quotas."
/sbin/quotaoff -a
fi
fi
# Before unmounting file systems write a reboot or halt record to wtmp.
$command -w
# Carry a random seed between reboots.
# Save 512 bytes, which is the size of the entropy pool.
echo "Saving random seed from /dev/urandom in /etc/random-seed."
dd if=/dev/urandom of=/etc/random-seed count=1 bs=512 2> /dev/null
# Clear /var/lock/subsys.
if [ -d /var/lock/subsys ]; then
rm -f /var/lock/subsys/*
fi
# Turn off swap, then unmount local file systems.
echo "Turning off swap."
swapoff -a
echo "Unmounting local file systems."
# Don't remount UMSDOS root volumes:
if [ ! "`mount | head -1 | cut -d ' ' -f 5`" = "umsdos" ]; then
umount -a -r -t nonfs
echo "Remounting root filesystem read-only."
mount -n -o remount,ro /
else
umount -a -r -t nonfs,noumsdos,nosmbfs
fi
# This never hurts:
sync
# If we're using LVM, we need to deactivate the volume groups:
if [ -r /etc/lvmtab ]; then
/sbin/vgchange -an
fi
# sleep 1 fixes problems with some hard drives that don't
# otherwise finish syncing before reboot or poweroff
sleep 1
# This is to ensure all processes have completed on SMP machines:
wait
if [ -x /sbin/genpowerd ]; then
# See if this is a powerfail situation:
if grep FAIL /etc/upsstatus 1> /dev/null 2> /dev/null ; then
# Signal UPS to shut off the inverter:
/sbin/genpowerd -k /dev/ttyS4 tripp-nt
if [ ! $? = 0 ]; then
echo
echo "There was an error signaling the UPS."
echo "Perhaps you need to edit /etc/rc.d/rc.6 to configure"
echo "the serial line and UPS type."
# Wasting 15 seconds of precious power:
sleep 15
fi
fi
fi
Содержимое /etc/inittab:
#
# inittabThis file describes how the INIT process should set up
#the system in a certain run-level.
#
# Version:@(#)inittab2.0417/05/93MvS
# 2.10 02/10/95 PV
# 3.00 02/06/1999 PV
# 4.00 04/10/2002 PV
#
# Author:Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
# Modified by:Patrick J. Volkerding, <volkerdi@slackware.com>
#
# These are the default runlevels in Slackware:
# 0 = halt
# 1 = single user mode
# 2 = unused (but configured the same as runlevel 3)
# 3 = multiuser mode (default Slackware runlevel)
# 4 = X11 with KDM/GDM/XDM (session managers)
# 5 = unused (but configured the same as runlevel 3)
# 6 = reboot
# Default runlevel. (Do not set to 0 or 6)
id:4:initdefault:
# System initialization (runs when system boots).
si:S:sysinit:/etc/rc.d/rc.S
# Script to run when going single user (runlevel 1).
su:1S:wait:/etc/rc.d/rc.K
# Script to run when going multi user.
rc:2345:wait:/etc/rc.d/rc.M
# What to do at the "Three Finger Salute".
ca::ctrlaltdel:/sbin/shutdown -t5 -r now
# Runlevel 0 halts the system.
l0:0:wait:/etc/rc.d/rc.0:/sbin/shutdown -t5 -r now
# Runlevel 6 reboots the system.
l6:6:wait:/etc/rc.d/rc.6:/sbin/reboot
# What to do when power fails.
pf::powerfail:/sbin/genpowerfail start
# If power is back, cancel the running shutdown.
pg::powerokwait:/sbin/genpowerfail stop
# These are the standard console login getties in multiuser mode:
c1:1235:respawn:/sbin/agetty 38400 tty1 linux
c2:1235:respawn:/sbin/agetty 38400 tty2 linux
c3:1235:respawn:/sbin/agetty 38400 tty3 linux
c4:1235:respawn:/sbin/agetty 38400 tty4 linux
c5:1235:respawn:/sbin/agetty 38400 tty5 linux
c6:12345:respawn:/sbin/agetty 38400 tty6 linux
# Local serial lines:
#s1:12345:respawn:/sbin/agetty -L ttyS0 9600 vt100
#s2:12345:respawn:/sbin/agetty -L ttyS1 9600 vt100
# Dialup lines:
#d1:12345:respawn:/sbin/agetty -mt60 38400,19200,9600,2400,1200 ttyS0 vt100
#d2:12345:respawn:/sbin/agetty -mt60 38400,19200,9600,2400,1200 ttyS1 vt100
# Runlevel 4 used to be for an X window only system, until we discovered
# that it throws init into a loop that keeps your load avg at least 1 all
# the time. Thus, there is now one getty opened on tty6. Hopefully no one
# will notice. ;^)
# It might not be bad to have one text console anyway, in case something
# happens to X.
x1:4:wait:/etc/rc.d/rc.4
# End of /etc/inittab
В чем может быть дело?