PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : halt = reboot?



Florian
04.07.01, 03:03
Hallo allerseits!
Ich habe gerade frisch suse72 installiert und meine Kiste fährtnicht mehr ordentlich runter. Sowohl bei "halt" als auch bei "init 0" als auch bei "Beenden" im kdm macht sie einen reboot. Mit suse70 klappte das noch wunderbar. Weiss jemand Rat?
Florian

dwz
04.07.01, 10:53
Hi !

shutdown -h now

MfG

dwz

Florian
05.07.01, 18:31
Hab ich auch probiert. Mit dem gleichen Ergebnis! :confused:

flasheye
06.07.01, 00:49
Hi,


wenn init 0 nicht funzt, dann ist wirklich was nicht in Ordnung. Denn mit diesem Befehl sprichst Du init, den Vater aller Prozesse mit der PID 1, direkt an. shutdown macht auch nichts anderes, als im Endeffekt init mit dem Parameter 0 aufzurufen! ;)


Macht er denn bei init 6 einen korrekten reboot, so wie er soll? Check mal Deine Start und Kill Skripte. --> /sbin/init.d/rcX.d


Der Runlevel 0 = halt == rc0.d


Vielleicht steckt da der Fehler.


Bye


DasSein

[ 06. Juli 2001: Beitrag editiert von: DasSein ]

Florian
06.07.01, 10:31
Der reboot funktioniert ganz normal (nämlich zur Zeit wie ein "halt", nur dass beim "halt" angezeigt wird, dass der Rechner anhält). Es gibt da jede Menge Skripte in /etc/init.d/. Die Skripte in rc[0,6]/ sind auf halt bzw. reboot gelinkt. Wonach soll ich denn suchen?
MfG
Florian

thorwin
06.07.01, 13:23
Hatte auch mal dieses Problem. Es lag glaube ich daren, daß halt ein Link auf reboot war (oder umgekehrt ?). Ich konnte das durch entfernen des Links und "händisches" Neuinstallieren des sysvinit-Paketes lösen.

hth,
thorwin

Florian
08.07.01, 12:05
Hallo thorwin!
Ja, ganz recht: reboot ist ein Link auf halt. Das erklärt an sich aber wohl noch nicht warum der halt nicht funktioniert, oder? Ich habe den link erst in /etc/init.d/ gelöscht und dann mit yast die sysvinit neuinstalliert. Keine Besserung, der link wurde nicht wieder hergestellt. Dann /sbin/reboot->/sbin/halt gelöscht und wieder neu installiert. Dieser link wurde allerdings wieder hergestellt. Aber gebracht hat es auch nichts. Was meinst Du eigentlich mit "händischem installieren"?
*verzweifel*
Florian

flasheye
10.07.01, 19:55
Hi,

also vorweg möchte ich sagen, dass man Dateien in

/sbin/init.d

nicht gleich löschen braucht! ;)

Benenne sie einfach UM und Du hast den gleichen Effekt.Nur die Links aus den jeweiligen Runlevelvelverzeichnissen müssen gelöscht werden.

Händisch installieren bedeutet es auf der Konsole zu tun. Entweder die Sourcen (*.tgz), oder als RPMs. Das mit der händischen Installation ist aber immer so eine Sache. Kennst Du Dich richtig gut aus und weisst genau welche Bibs ein Programm zur Laufzeit benötigt, dann mach das Sinn. Ansonsten kriegst Du beim Installieren möglicherweise einen Horror.

BSP:
Ich wollte bloss den Mozilla draufziehen. Aber bevor ich das konnte, musste erst mal das gtk nebst Lib in einer aktuelleren Version her. Als das passiert war wollte das System nich zwei andere Bibliotheken, die ich mir erst mal aus dem Netz gezogen habe. Die eigentliche Mozilla Intsallation hatte dann einen Tag, bzw. Woche später stattgefunden, weil ich mir an der einen Lib fast die Zähne ausgebissen habe.

So nun zum eigentlichen Thema. Poste doch bitte mal den Inhalt des skriptes

/sbin/init.d/halt und

/sbin/init.d/kdm.

Es würde mich interessieren welche skripte aus diesen aufgerufen werden. Ich bin mir nicht wirklich sicher, ob ich Dir damit dann auch helfen kann, aber vielleicht fällt mir ja was auf.

Als dann, bye

DasSein

[ 10. Juli 2001: Beitrag editiert von: DasSein ]

Florian
10.07.01, 22:25
Hallo dassein,

hier das halt-skript, dass (glaube ich seit suse70) unter /etc/init.d/ zufinden ist. Ein /etc/init.d/kdm existiert nicht und unter /opt/kde2/bin/kdm sind viele invertierte ^@ und viele andere unleserliche Zeichen, die ich lieber nicht auch noch poste. Vielen dank für die Mühe und sorry für das lange Skript

Florian

. /etc/rc.status
. /etc/rc.config

#
# Avoid being interrupted by child or keyboard
#
trap "echo" SIGINT SIGSEGV SIGQUIT SIGTERM
set +e

case "$0" in
*halt)
message="The system will be halted immediately."
case `/bin/uname -m` in
i?86)
command="halt"
if test -e /proc/apm -o -e /proc/sys/acpi ; then
command="halt -p"
else
read cmdline < /proc/cmdline
case "$cmdline" in
*apm=smp-power-off*) command="halt -p" ;;
esac
fi
;;
*)
command="halt -p"
;;
esac
;;
*reboot)
message="Please stand by while rebooting the system..."
command="reboot"
;;
*)
echo "$0: call me as \"halt\" or \"reboot\" please!"
exit 1
;;
esac

#
# helper shell function
#
reverse ()
{
local _line
while read -r _line ; do
reverse
echo "$_line"
break
done
}


#
# first do local stuff
#
rc_reset
test -e /etc/init.d/halt.local && {
echo Running /etc/init.d/halt.local
/bin/sh /etc/init.d/halt.local
rc_status -v1 -r
}

# Write to wtmp file before unmounting /var
$command -w

# Stop blogd before umounting /var
killproc -QUIT /sbin/blogd

# Redirect our mesages to default console
test -n "$REDIRECT" && exec 0<> $REDIRECT 1>&0 2>&0

echo "Sending all processes the TERM signal..."
killall5 -15
echo -e "$rc_done_up"

sleep 1
test "$1" = "fast" -o -e /fastboot &#0124;&#0124; sleep 4

echo "Sending all processes the KILL signal..."
killall5 -9
echo -e "$rc_done_up"

echo "Turning off swap"
sync ; sync
rc_reset
swapoff -a &> /dev/null
rc_status -v1 -r
# Something forgotten?
if test -r /proc/swaps ; then
# Use cat and a pipe because swapoff changes
# /proc/swaps during direct read call
cat /proc/swaps | \
while read des rest ; do
test "$des" = "Filename" && continue
swapoff $des &> /dev/null
done
fi

mounts=/etc/fstab
test -r /proc/mounts && mounts=/proc/mounts
reverse < $mounts | \
while read des fs type rest; do
case "$des" in
""|\#*) continue ;;
/dev/loop*)
umount $fs
losetup -d $des ;;
esac
case "$fs" in
/proc) continue ;;
/dev/pts) continue ;;
/dev) continue ;;
/dev/shm) continue ;;
esac
case "$type" in
proc) umount -t proc $fs ;;
devpts) umount -t devpts $fs ;;
devfs) umount -t devfs $fs ;;
shm) umount -t shm $fs ;;
usbdevfs) umount -t usbdevfs $fs ;;
esac
done

UMOUNT_FAILED=false
echo "Unmounting file systems"
umount -avt noproc,nonfs,nosmbfs &#0124;&#0124; {
rc_status
UMOUNT_FAILED=true
}
rc_status -v1 -r

if test "$UMOUNT_FAILED" = true ; then
echo "Oops: umount failed :-( -- trying to remount readonly..."
mounts=/etc/fstab
test -r /proc/mounts && mounts=/proc/mounts
# Use cat and a pipe because umount changes
# /proc/mounts during direct read call
cat $mounts | \
while read des fs type rest; do
case "$des" in ""|\#*) continue ;; esac
case "$type" in
swap) continue ;; # No umount on swap devices
proc) continue ;; # Required
nfs) continue ;; # Avoid hanging reboot/halt
smbfs) continue ;; # Avoid hanging reboot/halt
esac
mount -v -n -o remount,ro $fs
done

echo "extra sync..."
sync; sync
echo "... hope now it's ok to reboot."
fi

umount -anvt proc

if test -d /etc/lvmtab.d -a -x /sbin/vgchange ; then
/sbin/vgchange -a n
fi

# maybe we use Multiple devices
if test -f /etc/mdtab -a -x /sbin/mdstop ; then
echo -n "Disable Multiple Devices"
/sbin/mdstop -a
rc_status -v1 -r
fi

# on umsdos fs this would lead to an error message, so direct errors to
# /dev/null
mount -no remount,ro / 2> /dev/null
sync

# Make reboot noise and wait a few seconds to give harddisks the chance
# to really flush their buffers before power goes down.
if test -n "$REDIRECT" ; then
sleep 1
case "$HALT_SOUND" in
"yes"|"quint")
echo -en "\033[10;393]\a\033[10;262]"
sleep 1
;;
"octave")
for tone in 524 491 440 393 349 328 295 ; do
echo -en "\033[10;${tone}]\a"
usleep 125000
done
echo -en "\033[10;262]"
;;
*)
echo -en "\033[10;440]\a"
usleep 250000
;;
esac
else
echo -en "\a"
sleep 2
fi
echo $message
echo -en "\a"

# Set system console back to intial value
test -n "$REDIRECT" -a -n "$CONSOLE" && setconsole $REDIRECT < $CONSOLE

# Now talk to kernel
exec $command -d -f

Florian
10.07.01, 22:27
Wie erreicht man, dass die Skriptformatierung nicht verloren geht?

Presto
02.08.01, 23:24
Hallo Florian!
Hatte das gleiche Problem. Ich schätze, du hast auch nen Aldi-PC (Board SR440BX). Ich habe das Problem gelöst, in dem ich das Bios upgedatet habe.
Das Bios gibts bei Intel oder Medion.
Gruss
Presto