Перезагрузка вместо выключения
Модератор: Bizdelnick
-
windas
- Сообщения: 18
Перезагрузка вместо выключения
МАНДРИВА 2009. Поставил дрова на видеокарту- слетел х. обновился до 2010.через баш. все заработало. но появилась проблема - при нажатии на выключение- комп перезагружается. чо делать.. посоветуйте. из баша тож не выключается.
ах да... kde 4.3
ах да... kde 4.3
-
megabaks
- Сообщения: 697
- ОС: Gentoo ~x86
Re: Перезагрузка вместо выключения
acpi при обновке не зацепило?
/etc/acpi/events/power
/etc/acpi/actions/pm-fallback-shutdown
/etc/acpi/events/power
Код: Выделить всё
event=button/power (PWR. |PBTN)
action=/etc/acpi/actions/pm-fallback-shutdown/etc/acpi/actions/pm-fallback-shutdown
Код: Выделить всё
#!/bin/bash
/usr/bin/pm-has-power-policy || /sbin/poweroff-
windas
- Сообщения: 18
Re: Перезагрузка вместо выключения
megabaks писал(а): ↑17.01.2010 03:45acpi при обновке не зацепило?
/etc/acpi/events/power
Код: Выделить всё
event=button/power (PWR. |PBTN) action=/etc/acpi/actions/pm-fallback-shutdown
/etc/acpi/actions/pm-fallback-shutdown
Код: Выделить всё
#!/bin/bash /usr/bin/pm-has-power-policy || /sbin/poweroff
там все впорядке..
-
megabaks
- Сообщения: 697
- ОС: Gentoo ~x86
Re: Перезагрузка вместо выключения
кстати, покажи /etc/inittab
-
nilpointer
- Сообщения: 149
- ОС: Linux
Re: Перезагрузка вместо выключения
У меня аналогичная проблема.
После выключения, стоит нажать клавишу или зацепить мышку, как идет на загрузку.
Немного достает, а на блоке питания кнопки выключения нет!
Правда с чем у меня это связано ума не приложу.
После выключения, стоит нажать клавишу или зацепить мышку, как идет на загрузку.
Немного достает, а на блоке питания кнопки выключения нет!
Правда с чем у меня это связано ума не приложу.
-
ATIpro
- Сообщения: 614
- ОС: Arch Linux x86_64
Re: Перезагрузка вместо выключения
nilpointer писал(а): ↑17.01.2010 13:29У меня аналогичная проблема.
После выключения, стоит нажать клавишу или зацепить мышку, как идет на загрузку.
Немного достает, а на блоке питания кнопки выключения нет!
Правда с чем у меня это связано ума не приложу.
В bios-е материнки посмотри. Там должны быть опции по включению по сигналу от клавы, мышки, pci-устройства и тп. Обычно подобные вещи по дефолту отключены, но мало ли.
-
windas
- Сообщения: 18
Re: Перезагрузка вместо выключения
#
# inittab This file describes how the INIT process should set up
# the system in a certain run-level.
#
# Author: Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
# Modified for RHS Linux by Marc Ewing and Donnie Barnes
#
# Default runlevel. The runlevels used by Mandriva Linux are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
#
id:5:initdefault:
# System initialization.
si::sysinit:/etc/rc.d/rc.sysinit
l0:0:wait:/etc/rc.d/rc 0
l1:1:wait:/etc/rc.d/rc 1
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6
# Trap CTRL-ALT-DELETE
ca::ctrlaltdel:/sbin/shutdown -t3 -r now
# When our UPS tells us power has failed, assume we have a few minutes
# of power left. Schedule a shutdown for 2 minutes from now.
# This does, of course, assume you have powerd installed and your
# UPS connected and working correctly.
pf::powerfail:/sbin/shutdown -f -h +2 "Power Failure; System Shutting Down"
# If power was restored before the shutdown kicked in, cancel it.
pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled"
# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6
# Single user mode
~~:S:wait:/bin/sh
-
megabaks
- Сообщения: 697
- ОС: Gentoo ~x86
Re: Перезагрузка вместо выключения
попробуй сделать как я написал здесь внизу
-
windas
- Сообщения: 18
Re: Перезагрузка вместо выключения
не могу понять каак отредактировать етот файл. нехватает прав доступа а в систему под рутом не пускает....
-
megabaks
- Сообщения: 697
- ОС: Gentoo ~x86
Re: Перезагрузка вместо выключения
))) поставь krusader - в нём есть по правому клику мыши "edit as root" или в консоли запусти от рута mc и найдя файл жми F4 поправишь, F2 и F10 - этож элементарно - азы 
-
windas
- Сообщения: 18
Re: Перезагрузка вместо выключения
ну звиняйте... мы все учились по немногу
-
megabaks
- Сообщения: 697
- ОС: Gentoo ~x86
-
windas
- Сообщения: 18
Re: Перезагрузка вместо выключения
изменения внес. всеравно перезагрузка....вместо выключения..
-
megabaks
- Сообщения: 697
- ОС: Gentoo ~x86
Re: Перезагрузка вместо выключения
покажи /etc/rc.d/rc0.d/S01halt
-
windas
- Сообщения: 18
Re: Перезагрузка вместо выключения
Код: Выделить всё
#!/bin/bash
#
# halt 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.
#
# Author: Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
# Modified for RHS Linux by Damien Neil
#
NOLOCALE=1
. /etc/init.d/functions
UMOUNT="umount"
[ ! -w /etc ] && UMOUNT="umount -n"
halt_crypto() {
fnval=0
while read dst src key; do
[ -z "$dst" -o "${dst#\#}" != "$dst" ] && continue
if [ -b "/dev/mapper/$dst" ]; then
if /sbin/dmsetup info "$dst" | grep -q '^Open count: *0$'; then
action "Stopping disk encryption for %s" $dst /sbin/cryptsetup remove "$dst"
else
fnval=1
fi
fi
done < /etc/crypttab
return $fnval
}
kill_all() {
/sbin/killall5 "$@"
rc=$?
if [ "$rc" == 1 ]; then
return 1
fi
return 0
}
# See how we were called.
case "$0" in
*halt)
message=`gprintf "Halting system..."`
command="/sbin/halt"
;;
*reboot)
message=`gprintf "Please stand by while rebooting the system..."`
command="/sbin/reboot"
kexec_command="/sbin/kexec"
;;
*)
gprintf "%s: call me as 'halt' or 'reboot' please!\n" $0
exit 1
;;
esac
case "$1" in
*start)
;;
*)
gprintf "Usage: %s\n" "$(basename $0) {start}"
exit 1
;;
esac
# Recreate the /initrd if needed
if [ ! -d /initrd ]; then
action "Creating initrd directory" mkdir /initrd
fi
if [ -d /initrd -a ! -f /initrd/README.WARNING ]; then
cat > /initrd/README.WARNING <<EOF
(mkinitrd) Don't remove this directory, it's needed at boot time,
in the initrd, to perform the pivot_root.
EOF
fi
update_boot_stage kill
# Kill all processes.
[ "${BASH+bash}" = bash ] && enable kill
OMITPIDS=
omitfile=/var/run/sendsigs.omit
if [ -e $omitfile ]; then
for pid in $(cat $omitfile); do
OMITPIDS="${OMITPIDS:+$OMITPIDS }-o $pid"
done
fi
# Find mdmon pid's and omit killing them
OMITARGS=
for i in /dev/.mdadm/*.pid; do
if [ "$i" = "mdadm.pid" -o ! -r "$i" ]; then
continue
fi
OMITARGS="$OMITARGS -o $(cat $i)"
done
action "Sending all processes the TERM signal..." kill_all -15 $OMITPIDS $OMITARGS
# No need to sleep and kill -9 if no processes to kill were found
if [ "$?" == 0 ]; then
sleep 2
action "Sending all processes the KILL signal..." kill_all -9 $OMITPIDS $OMITARGS
fi
# Write to wtmp file before unmounting /var
/sbin/halt -w
# Save mixer settings, here for lack of a better place.
if [ -s /etc/alsa/alsactl.conf -a -x /sbin/alsactl -a -w /etc/asound.state ]; then
action "Saving mixer settings" /sbin/alsactl -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf --ignore store
fi
# Save random seed
touch /var/lib/random-seed
chmod 600 /var/lib/random-seed
action "Saving random seed: " dd if=/dev/urandom of=/var/lib/random-seed count=1 bs=512 2>/dev/null
update_boot_stage clock
[ -x /sbin/hwclock ] && action "Syncing hardware clock to system time" /sbin/hwclock --systohc
if [ -x /sbin/halt.pre ]; then
/sbin/halt.pre
fi
update_boot_stage umount
# Try to unmount tmpfs filesystems to avoid swapping them in. Ignore failures.
tmpfs=$(awk '$2 ~ /^\/($|proc|dev)/ { next; }
$3 == "tmpfs" { print $2; }' /proc/mounts | sort -r)
[ -n "$tmpfs" ] && fstab-decode $UMOUNT $tmpfs 2>/dev/null
# Turn off swap, then unmount file systems.
[ -f /proc/swaps ] && SWAPS=$(awk '! /^Filename/ { print $1 }' /proc/swaps)
if [ -n "$SWAPS" ]; then
action "Turning off swap: " swapoff $SWAPS
for dst in $SWAPS; do
if [[ "$dst" =~ ^/dev/mapper ]] \
&& [ "$(dmsetup status "$dst" | cut -d ' ' -f 3)" = crypt ]; then
backdev=$(/sbin/cryptsetup status "$dst" \
| awk '$1 == "device:" { print $2 }')
/sbin/cryptsetup remove "$dst"
fi
done
fi
[ -x /sbin/quotaoff ] && action "Turning off quotas: " /sbin/quotaoff -aug
# first remove entry /initrd/loopfs as it can't be unmounted :(
mtab=$(fgrep -v "/initrd/loopfs[^/]" /etc/mtab)
(IFS=; echo $mtab > /etc/mtab)
# Unmount file systems, killing processes if we have to.
# Unmount loopback stuff first
__umount_loopback_loop
# Unmount RPC pipe file systems
__umount_loop '$3 ~ /^rpc_pipefs$/ || $3 ~ /^rpc_svc_gss_pipefs$/ {print $2}' \
/proc/mounts \
"Unmounting pipe file systems: " \
"Unmounting pipe file systems (retry): " \
-f
LANG=C __umount_loop '$2 ~ /^\/$|^\/proc|^\/dev/{next}
$2 ~ /^\/live\//{next}
$3 == "tmpfs" || $3 == "proc" {print $2; next}
/(loopfs|autofs|nfs|cifs|smbfs|ncpfs|sysfs|^none|^\/dev\/ram|^\/dev\/root$)/ {next}
{print $2}' /proc/mounts \
"Unmounting file systems: " \
"Unmounting file systems (retry): " \
-f
update_boot_stage lvm
# stop crypto devices before lvm, as they can sit on top of LVM
[ -f /etc/crypttab ] && halt_crypto
if [ -f /etc/lvm/lvm.conf -a -x /sbin/lvm2 ]; then
if grep -q -s 'device-mapper' /proc/devices; then
_vgchange_cmd="/sbin/lvm2 vgchange -a n"
fi
fi
if [ -z "${_vgscan_cmd}" -a -f /etc/lvmtab -a -e /proc/lvm ]; then
if [ -x /sbin/lvm1-vgchange ]; then
_vgchange_cmd="/sbin/lvm1-vgchange -a n"
elif [ -x /sbin/vgchange ]; then
_vgchange_cmd="/sbin/vgchange -a n"
fi
fi
if [ -n "${_vgchange_cmd}" ]; then
action "Shutting down LVM:" ${_vgchange_cmd}
fi
# for NUT
# do it here to have /proc/usb mounted for UPS on USB
if [ -f /etc/init.d/upsd ]; then
/etc/init.d/upsd powerdown
[ $? == 3 ] && exit 1
fi
[ -f /proc/bus/usb/devices ] && $UMOUNT /proc/bus/usb
# remove the crash indicator flag
rm -f /.autofsck
update_boot_stage umount_force
# Try all file systems other than root, essential filesystems and RAM disks,
# one last time.
# eugeni: we should umount the filesystems in reverse order (#53042)
tac /proc/mounts | awk '$2 !~ /\/(|dev|proc|selinux|sys)$/ && $2 !~ /^\/live\// && $1 !~ /^\/dev\/ram/ { print $2 }' | \
while read line; do
fstab-decode $UMOUNT -f $line
done
if [ -x /sbin/halt.local ]; then
/sbin/halt.local
fi
update_boot_stage remount_ro
# Remount read only anything that's left mounted.
# gprintf "Remounting remaining filesystems readonly\n"
mount | awk '{ print $3 }' | while read line; do
fstab-decode mount -n -o ro,remount $line
done
action "Unmounting proc file system: " umount /proc
# See if this is a powerfail situation.
if [ -f /etc/apcupsd/powerfail ]; then
gprintf "APCUPSD will now power off the UPS!\n"
echo
/etc/apcupsd/apccontrol killpower
echo
gprintf "Please ensure that the UPS has powered off before rebooting\n"
gprintf "Otherwise, the UPS may cut the power during the reboot!!!\n"
echo
fi
update_boot_stage halt
# If we left mdmon's running wait for the raidsets to become clean
if [ -n "$OMITARGS" ]; then
mdadm --wait-clean --scan
fi
# Now halt or reboot.
echo "$message"
if [ -f /fastboot ]; then
gprintf "On the next boot fsck will be skipped.\n"
elif [ -f /forcefsck ]; then
gprintf "On the next boot fsck will be forced.\n"
fi
# First, try kexec. If that fails, fall back to rebooting the old way.
[ -n "$kexec_command" ] && $kexec_command -e -x >& /dev/null
HALTARGS="-i -d"
[ "$INIT_HALT" != "HALT" ] && HALTARGS="$HALTARGS -p"
exec $command $HALTARGS-
megabaks
- Сообщения: 697
- ОС: Gentoo ~x86
Re: Перезагрузка вместо выключения
хм... а в консоли как пробовал выключать?
halt
init 0
shutdown -h now
shutdown -P now
halt
init 0
shutdown -h now
shutdown -P now
-
windas
- Сообщения: 18
Re: Перезагрузка вместо выключения
да пробывал. копм перезагружается.....ваще как то странно.....