rpms/kexec-tools/devel/kdump_initscripts init,1.1,1.2
Neil Horman
nhorman at fedoraproject.org
Fri Aug 14 13:30:28 UTC 2009
- Previous message (by thread): rpms/kexec-tools/devel kexec-tools.spec, 1.149, 1.150 sources, 1.21, 1.22
- Next message (by thread): rpms/kaffeine/devel .cvsignore, 1.8, 1.9 kaffeine.spec, 1.27, 1.28 sources, 1.8, 1.9
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: nhorman
Update of /cvs/extras/rpms/kexec-tools/devel/kdump_initscripts
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv9799/kdump_initscripts
Modified Files:
init
Log Message:
Updating dracut modules
Index: init
===================================================================
RCS file: /cvs/extras/rpms/kexec-tools/devel/kdump_initscripts/init,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- init 29 Jul 2009 19:34:48 -0000 1.1
+++ init 14 Aug 2009 13:30:28 -0000 1.2
@@ -174,60 +174,12 @@ while :; do
&& { flock -s 9 ; emergency_shell "Can't mount root filesystem"; } 9>/.console_lock
done
-# pre pivot scripts are sourced just before we switch over to the new root.
-getarg 'rdbreak=pre-pivot' && emergency_shell "Break pre-pivot"
-source_all pre-pivot
+# We have the root file system mounted under $NEWROOT, so copy
+# the vmcore there and call it a day
+#
+DATEDIR=`date +%d.%m.%y-%T`
+mkdir -p $NEWROOT/var/crash/$DATEDIR
+cp /proc/vmcore /var/crash/$DATEDIR/vmcore
-# by the time we get here, the root filesystem should be mounted.
-# Try to find init.
-for i in "$(getarg init=)" /sbin/init /etc/init /init /bin/sh; do
- [ -f "$NEWROOT$i" -a -x "$NEWROOT$i" ] && { INIT="$i"; break; }
-done
-[ "$INIT" ] || {
- echo "Cannot find init!"
- echo "Please check to make sure you passed a valid root filesystem!"
- emergency_shell
-}
-
-getarg rdbreak && emergency_shell "Break before switch_root"
-
-HARD=""
-while pidof udevd >/dev/null 2>&1; do
- for pid in $(pidof udevd); do
- kill $HARD $pid >/dev/null 2>&1
- done
- HARD="-9"
-done
-
-# Clean up the environment
-for i in $(export -p); do
- i=${i#declare -x}
- i=${i#export}
- i=${i%%=*}
- [ "$i" = "root" -o "$i" = "PATH" -o "$i" = "HOME" -o "$i" = "TERM" ] || unset $i
-done
-
-initargs=""
-initrdargs="$initrdargs console BOOT_IMAGE rdbreak rdinitdebug rdudevinfo rdudevdebug rdnetdebug rdcopystate rdshell"
-
-for x in "$@"; do
- for s in $initrdargs; do
- [ "${x%%=*}" = $s ] && continue 2
- done
- initargs="$initargs $x"
-done
-
-# Copy state
-mkdir /dev/.initramfs/
-if getarg rdcopystate; then
- cp /tmp/* /dev/.initramfs/ >/dev/null 2>&1
-else
- cp /tmp/net.* /dev/.initramfs/ >/dev/null 2>&1
-fi
-
-exec switch_root "$NEWROOT" "$INIT" $initargs || {
- # davej doesn't like initrd bugs
- echo "Something went very badly wrong in the initrd. Please "
- echo "file a bug against mkinitrd."
- emergency_shell
-}
+# Once the copy is done, just reboot the system
+reboot -f
- Previous message (by thread): rpms/kexec-tools/devel kexec-tools.spec, 1.149, 1.150 sources, 1.21, 1.22
- Next message (by thread): rpms/kaffeine/devel .cvsignore, 1.8, 1.9 kaffeine.spec, 1.27, 1.28 sources, 1.8, 1.9
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list