final updates for busybox conversion
This commit is contained in:
parent
31a04fb720
commit
27e9206ed0
21
mkdumprd
21
mkdumprd
@ -25,7 +25,6 @@
|
|||||||
# Guillaume Cottenceau <gc@mandrakesoft.com>
|
# Guillaume Cottenceau <gc@mandrakesoft.com>
|
||||||
# Peter Jones <pjones@redhat.com>
|
# Peter Jones <pjones@redhat.com>
|
||||||
# Neil Horman <nhorman@redhat.com>
|
# Neil Horman <nhorman@redhat.com>
|
||||||
|
|
||||||
umask 0022
|
umask 0022
|
||||||
|
|
||||||
export MALLOC_PERTURB_=204
|
export MALLOC_PERTURB_=204
|
||||||
@ -902,7 +901,6 @@ if [ -n "$KDUMP_CONFIG_FILE" ]; then
|
|||||||
done < $KDUMP_CONFIG_FILE
|
done < $KDUMP_CONFIG_FILE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ -n "$CORE_COLLECTOR" ]; then
|
if [ -n "$CORE_COLLECTOR" ]; then
|
||||||
if [ "$USING_METHOD" == "ssh" ] || [ "$USING_METHOD" == "raw" ]; then
|
if [ "$USING_METHOD" == "ssh" ] || [ "$USING_METHOD" == "raw" ]; then
|
||||||
echo "You may only use alternate core collectors with the NFS and Local Filesystem targets"
|
echo "You may only use alternate core collectors with the NFS and Local Filesystem targets"
|
||||||
@ -926,7 +924,6 @@ mkdir -p $MNTIMAGE/modules
|
|||||||
mkdir -p $MNTIMAGE/usr/share/udhcpc
|
mkdir -p $MNTIMAGE/usr/share/udhcpc
|
||||||
ln -s bin $MNTIMAGE/sbin
|
ln -s bin $MNTIMAGE/sbin
|
||||||
|
|
||||||
|
|
||||||
#if we are using makedumpfile here, then generate the config file
|
#if we are using makedumpfile here, then generate the config file
|
||||||
if [ -n "$CORE_COLLECTOR" ]; then
|
if [ -n "$CORE_COLLECTOR" ]; then
|
||||||
RUN_KERN_VER=`uname -r`
|
RUN_KERN_VER=`uname -r`
|
||||||
@ -938,7 +935,6 @@ if [ -n "$CORE_COLLECTOR" ]; then
|
|||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#copy in busybox and make symlinks to its supported utilities
|
#copy in busybox and make symlinks to its supported utilities
|
||||||
cp /sbin/busybox $MNTIMAGE/sbin/busybox
|
cp /sbin/busybox $MNTIMAGE/sbin/busybox
|
||||||
cd $MNTIMAGE/sbin
|
cd $MNTIMAGE/sbin
|
||||||
@ -948,8 +944,7 @@ for i in `/sbin/busybox |
|
|||||||
do
|
do
|
||||||
ln -s busybox $MNTIMAGE/sbin/$i
|
ln -s busybox $MNTIMAGE/sbin/$i
|
||||||
done
|
done
|
||||||
cd -
|
cd - > /dev/null 2>&1
|
||||||
|
|
||||||
#Busybox doesn't have a /bin/sh applet,
|
#Busybox doesn't have a /bin/sh applet,
|
||||||
#so we build a reasonable faximilie here
|
#so we build a reasonable faximilie here
|
||||||
cat >> $MNTIMAGE/bin/sh << EOF
|
cat >> $MNTIMAGE/bin/sh << EOF
|
||||||
@ -969,7 +964,6 @@ EOF
|
|||||||
|
|
||||||
chmod 755 $MNTIMAGE/usr/share/udhcpc/default.script
|
chmod 755 $MNTIMAGE/usr/share/udhcpc/default.script
|
||||||
|
|
||||||
|
|
||||||
if [ -e /etc/fstab.sys ]; then
|
if [ -e /etc/fstab.sys ]; then
|
||||||
inst /etc/fstab.sys "$MNTIMAGE/etc/fstab.sys"
|
inst /etc/fstab.sys "$MNTIMAGE/etc/fstab.sys"
|
||||||
fi
|
fi
|
||||||
@ -1060,7 +1054,6 @@ for i in 0 1 2 3 ; do
|
|||||||
emit "mknod /dev/ttyS$i c 4 $(($i + 64))"
|
emit "mknod /dev/ttyS$i c 4 $(($i + 64))"
|
||||||
done
|
done
|
||||||
emit "mknod /dev/mem c 1 1"
|
emit "mknod /dev/mem c 1 1"
|
||||||
|
|
||||||
for MODULE in $MODULES; do
|
for MODULE in $MODULES; do
|
||||||
text=""
|
text=""
|
||||||
module=`echo $MODULE | sed "s|.*/||" | sed "s/.k\?o$//"`
|
module=`echo $MODULE | sed "s|.*/||" | sed "s/.k\?o$//"`
|
||||||
@ -1168,7 +1161,6 @@ kdump_chk()
|
|||||||
echo "$KDUMP_CONFIG_FILE: $2"
|
echo "$KDUMP_CONFIG_FILE: $2"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
emit "DATE=\`date +%Y-%M-%d-%T\`"
|
emit "DATE=\`date +%Y-%M-%d-%T\`"
|
||||||
if [ -n "$KDUMP_CONFIG_FILE" ]; then
|
if [ -n "$KDUMP_CONFIG_FILE" ]; then
|
||||||
memtotal=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
|
memtotal=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
|
||||||
@ -1284,9 +1276,13 @@ if [ -n "$KDUMP_CONFIG_FILE" ]; then
|
|||||||
#setup nfs case
|
#setup nfs case
|
||||||
mkdir -p $MNTIMAGE/mnt
|
mkdir -p $MNTIMAGE/mnt
|
||||||
emit "mount -t nfs -o nolock $rlocation /mnt"
|
emit "mount -t nfs -o nolock $rlocation /mnt"
|
||||||
emit "dd if=/dev/mem of=/dev/urandom count=1 bs=512 skip=100"
|
emit "mkdir -p /mnt/var/crash/$lhost-\$DATE"
|
||||||
emit "$CORE_COLLECTOR /proc/vmcore /mnt/var/crash/$lhost-%DATE"
|
emit "$CORE_COLLECTOR /proc/vmcore /mnt/var/crash/$lhost-\$DATE/vmcore"
|
||||||
emit "reboot -f"
|
emit "if [ \$? == 0 ]"
|
||||||
|
emit "then"
|
||||||
|
emit " reboot -f"
|
||||||
|
emit "fi"
|
||||||
|
emit "umount /mnt"
|
||||||
else
|
else
|
||||||
#SSH path
|
#SSH path
|
||||||
#rebuild $location replacing machine name with ip address
|
#rebuild $location replacing machine name with ip address
|
||||||
@ -1424,5 +1420,4 @@ else
|
|||||||
fi
|
fi
|
||||||
rm -rf $MNTIMAGE $IMAGE
|
rm -rf $MNTIMAGE $IMAGE
|
||||||
if [ -n "$MNTPOINT" ]; then rm -rf $MNTPOINT ; fi
|
if [ -n "$MNTPOINT" ]; then rm -rf $MNTPOINT ; fi
|
||||||
|
|
||||||
exit $rc
|
exit $rc
|
||||||
|
Loading…
Reference in New Issue
Block a user