rpms/kexec-tools/devel mkdumprd,1.8,1.9
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Sat Sep 23 01:49:11 UTC 2006
Author: nhorman
Update of /cvs/dist/rpms/kexec-tools/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv18980
Modified Files:
mkdumprd
Log Message:
final updates for busybox conversion
Index: mkdumprd
===================================================================
RCS file: /cvs/dist/rpms/kexec-tools/devel/mkdumprd,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- mkdumprd 22 Sep 2006 19:09:02 -0000 1.8
+++ mkdumprd 23 Sep 2006 01:49:08 -0000 1.9
@@ -25,7 +25,6 @@
# Guillaume Cottenceau <gc at mandrakesoft.com>
# Peter Jones <pjones at redhat.com>
# Neil Horman <nhorman at redhat.com>
-
umask 0022
export MALLOC_PERTURB_=204
@@ -902,7 +901,6 @@
done < $KDUMP_CONFIG_FILE
fi
-
if [ -n "$CORE_COLLECTOR" ]; then
if [ "$USING_METHOD" == "ssh" ] || [ "$USING_METHOD" == "raw" ]; then
echo "You may only use alternate core collectors with the NFS and Local Filesystem targets"
@@ -926,7 +924,6 @@
mkdir -p $MNTIMAGE/usr/share/udhcpc
ln -s bin $MNTIMAGE/sbin
-
#if we are using makedumpfile here, then generate the config file
if [ -n "$CORE_COLLECTOR" ]; then
RUN_KERN_VER=`uname -r`
@@ -938,7 +935,6 @@
exit 1;
fi
fi
-
#copy in busybox and make symlinks to its supported utilities
cp /sbin/busybox $MNTIMAGE/sbin/busybox
cd $MNTIMAGE/sbin
@@ -948,8 +944,7 @@
do
ln -s busybox $MNTIMAGE/sbin/$i
done
-cd -
-
+cd - > /dev/null 2>&1
#Busybox doesn't have a /bin/sh applet,
#so we build a reasonable faximilie here
cat >> $MNTIMAGE/bin/sh << EOF
@@ -969,7 +964,6 @@
chmod 755 $MNTIMAGE/usr/share/udhcpc/default.script
-
if [ -e /etc/fstab.sys ]; then
inst /etc/fstab.sys "$MNTIMAGE/etc/fstab.sys"
fi
@@ -1060,7 +1054,6 @@
emit "mknod /dev/ttyS$i c 4 $(($i + 64))"
done
emit "mknod /dev/mem c 1 1"
-
for MODULE in $MODULES; do
text=""
module=`echo $MODULE | sed "s|.*/||" | sed "s/.k\?o$//"`
@@ -1168,7 +1161,6 @@
echo "$KDUMP_CONFIG_FILE: $2"
exit 1
}
-
emit "DATE=\`date +%Y-%M-%d-%T\`"
if [ -n "$KDUMP_CONFIG_FILE" ]; then
memtotal=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
@@ -1284,9 +1276,13 @@
#setup nfs case
mkdir -p $MNTIMAGE/mnt
emit "mount -t nfs -o nolock $rlocation /mnt"
- emit "dd if=/dev/mem of=/dev/urandom count=1 bs=512 skip=100"
- emit "$CORE_COLLECTOR /proc/vmcore /mnt/var/crash/$lhost-%DATE"
- emit "reboot -f"
+ emit "mkdir -p /mnt/var/crash/$lhost-\$DATE"
+ emit "$CORE_COLLECTOR /proc/vmcore /mnt/var/crash/$lhost-\$DATE/vmcore"
+ emit "if [ \$? == 0 ]"
+ emit "then"
+ emit " reboot -f"
+ emit "fi"
+ emit "umount /mnt"
else
#SSH path
#rebuild $location replacing machine name with ip address
@@ -1424,5 +1420,4 @@
fi
rm -rf $MNTIMAGE $IMAGE
if [ -n "$MNTPOINT" ]; then rm -rf $MNTPOINT ; fi
-
exit $rc
More information about the fedora-cvs-commits
mailing list