1*49cdfc7eSAndroid Build Coastguard Worker#!/bin/sh -xe 2*49cdfc7eSAndroid Build Coastguard Worker 3*49cdfc7eSAndroid Build Coastguard Workerconf=${1}; shift 4*49cdfc7eSAndroid Build Coastguard Workertest=${1} 5*49cdfc7eSAndroid Build Coastguard Workercrasher=crasher 6*49cdfc7eSAndroid Build Coastguard Workerlkdtm=lkdtm 7*49cdfc7eSAndroid Build Coastguard Worker 8*49cdfc7eSAndroid Build Coastguard Worker. "${conf}" 9*49cdfc7eSAndroid Build Coastguard Worker 10*49cdfc7eSAndroid Build Coastguard Workercase "${test}" in 11*49cdfc7eSAndroid Build Coastguard Worker 12*49cdfc7eSAndroid Build Coastguard Worker "KEXEC-L") 13*49cdfc7eSAndroid Build Coastguard Worker kexec -l /boot/vmlinuz --initrd=/boot/initrd \ 14*49cdfc7eSAndroid Build Coastguard Worker --append="$(cat /proc/cmdline)" 15*49cdfc7eSAndroid Build Coastguard Worker sleep 10 16*49cdfc7eSAndroid Build Coastguard Worker kexec -e 17*49cdfc7eSAndroid Build Coastguard Worker ;; 18*49cdfc7eSAndroid Build Coastguard Worker "MNS") 19*49cdfc7eSAndroid Build Coastguard Worker echo "Not implemented" 20*49cdfc7eSAndroid Build Coastguard Worker ;; 21*49cdfc7eSAndroid Build Coastguard Worker 22*49cdfc7eSAndroid Build Coastguard Worker "MNN") 23*49cdfc7eSAndroid Build Coastguard Worker echo "Not implemented" 24*49cdfc7eSAndroid Build Coastguard Worker ;; 25*49cdfc7eSAndroid Build Coastguard Worker 26*49cdfc7eSAndroid Build Coastguard Worker "MCS") 27*49cdfc7eSAndroid Build Coastguard Worker echo "Not implemented" 28*49cdfc7eSAndroid Build Coastguard Worker ;; 29*49cdfc7eSAndroid Build Coastguard Worker 30*49cdfc7eSAndroid Build Coastguard Worker "MCN") 31*49cdfc7eSAndroid Build Coastguard Worker echo "Not implemented" 32*49cdfc7eSAndroid Build Coastguard Worker ;; 33*49cdfc7eSAndroid Build Coastguard Worker 34*49cdfc7eSAndroid Build Coastguard Worker "MCF") 35*49cdfc7eSAndroid Build Coastguard Worker echo "Not implemented" 36*49cdfc7eSAndroid Build Coastguard Worker ;; 37*49cdfc7eSAndroid Build Coastguard Worker 38*49cdfc7eSAndroid Build Coastguard Worker "ACS") 39*49cdfc7eSAndroid Build Coastguard Worker echo c >/proc/sysrq-trigger 40*49cdfc7eSAndroid Build Coastguard Worker ;; 41*49cdfc7eSAndroid Build Coastguard Worker 42*49cdfc7eSAndroid Build Coastguard Worker "ACP") 43*49cdfc7eSAndroid Build Coastguard Worker # Panic test 0 in crasher module: panic() 44*49cdfc7eSAndroid Build Coastguard Worker insmod "${crasher}"/crasher.ko 45*49cdfc7eSAndroid Build Coastguard Worker echo 0 >/proc/crasher 46*49cdfc7eSAndroid Build Coastguard Worker ;; 47*49cdfc7eSAndroid Build Coastguard Worker 48*49cdfc7eSAndroid Build Coastguard Worker "ACB") 49*49cdfc7eSAndroid Build Coastguard Worker # Panic test 1 in crasher module: BUG() 50*49cdfc7eSAndroid Build Coastguard Worker insmod "${crasher}"/crasher.ko 51*49cdfc7eSAndroid Build Coastguard Worker echo 1 >/proc/crasher 52*49cdfc7eSAndroid Build Coastguard Worker ;; 53*49cdfc7eSAndroid Build Coastguard Worker 54*49cdfc7eSAndroid Build Coastguard Worker "ACE") 55*49cdfc7eSAndroid Build Coastguard Worker # Panic test 2 in crasher module: panic_on_oops 56*49cdfc7eSAndroid Build Coastguard Worker insmod "${crasher}"/crasher.ko 57*49cdfc7eSAndroid Build Coastguard Worker echo 1 >/proc/sys/kernel/panic_on_oops 58*49cdfc7eSAndroid Build Coastguard Worker echo 2 >/proc/crasher 59*49cdfc7eSAndroid Build Coastguard Worker ;; 60*49cdfc7eSAndroid Build Coastguard Worker 61*49cdfc7eSAndroid Build Coastguard Worker "ACL") 62*49cdfc7eSAndroid Build Coastguard Worker # Panic test 3 in crasher module: hang w/double spinlock 63*49cdfc7eSAndroid Build Coastguard Worker # requires nmi_watchdog be enabled 64*49cdfc7eSAndroid Build Coastguard Worker insmod "${crasher}"/crasher.ko 65*49cdfc7eSAndroid Build Coastguard Worker echo 3 >/proc/crasher 66*49cdfc7eSAndroid Build Coastguard Worker ;; 67*49cdfc7eSAndroid Build Coastguard Worker 68*49cdfc7eSAndroid Build Coastguard Worker "KPIDB") 69*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=INT_HARDWARE_ENTRY cpoint_type=BUG cpoint_count=05 70*49cdfc7eSAndroid Build Coastguard Worker ;; 71*49cdfc7eSAndroid Build Coastguard Worker "KPIDE") 72*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=INT_HARDWARE_ENTRY cpoint_type=EXCEPTION cpoint_count=05 73*49cdfc7eSAndroid Build Coastguard Worker ;; 74*49cdfc7eSAndroid Build Coastguard Worker "KPIDL") 75*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=INT_HARDWARE_ENTRY cpoint_type=LOOP cpoint_count=05 76*49cdfc7eSAndroid Build Coastguard Worker ;; 77*49cdfc7eSAndroid Build Coastguard Worker "KPIDP") 78*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=INT_HARDWARE_ENTRY cpoint_type=PANIC cpoint_count=05 79*49cdfc7eSAndroid Build Coastguard Worker ;; 80*49cdfc7eSAndroid Build Coastguard Worker "KPIDO") 81*49cdfc7eSAndroid Build Coastguard Worker echo 1 >/proc/sys/kernel/panic_on_oops 82*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=INT_HARDWARE_ENTRY cpoint_type=OVERFLOW cpoint_count=10 83*49cdfc7eSAndroid Build Coastguard Worker ;; 84*49cdfc7eSAndroid Build Coastguard Worker "KPIEB") 85*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=INT_HW_IRQ_EN cpoint_type=BUG cpoint_count=10 86*49cdfc7eSAndroid Build Coastguard Worker ;; 87*49cdfc7eSAndroid Build Coastguard Worker "KPIEE") 88*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=INT_HW_IRQ_EN cpoint_type=EXCEPTION cpoint_count=10 89*49cdfc7eSAndroid Build Coastguard Worker ;; 90*49cdfc7eSAndroid Build Coastguard Worker "KPIEL") 91*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=INT_HW_IRQ_EN cpoint_type=LOOP cpoint_count=10 92*49cdfc7eSAndroid Build Coastguard Worker ;; 93*49cdfc7eSAndroid Build Coastguard Worker "KPIEP") 94*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=INT_HW_IRQ_EN cpoint_type=PANIC cpoint_count=10 95*49cdfc7eSAndroid Build Coastguard Worker ;; 96*49cdfc7eSAndroid Build Coastguard Worker "KPIEO") 97*49cdfc7eSAndroid Build Coastguard Worker echo 1 >/proc/sys/kernel/panic_on_oops 98*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=INT_HW_IRQ_EN cpoint_type=OVERFLOW cpoint_count=10 99*49cdfc7eSAndroid Build Coastguard Worker ;; 100*49cdfc7eSAndroid Build Coastguard Worker "KPTEB") 101*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=INT_TASKLET_ENTRY cpoint_type=BUG cpoint_count=10 102*49cdfc7eSAndroid Build Coastguard Worker ;; 103*49cdfc7eSAndroid Build Coastguard Worker "KPTEE") 104*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=INT_TASKLET_ENTRY cpoint_type=EXCEPTION cpoint_count=10 105*49cdfc7eSAndroid Build Coastguard Worker ;; 106*49cdfc7eSAndroid Build Coastguard Worker "KPTEL") 107*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=INT_TASKLET_ENTRY cpoint_type=LOOP cpoint_count=10 108*49cdfc7eSAndroid Build Coastguard Worker ;; 109*49cdfc7eSAndroid Build Coastguard Worker "KPTEP") 110*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=INT_TASKLET_ENTRY cpoint_type=PANIC cpoint_count=10 111*49cdfc7eSAndroid Build Coastguard Worker ;; 112*49cdfc7eSAndroid Build Coastguard Worker "KPTEO") 113*49cdfc7eSAndroid Build Coastguard Worker echo 1 >/proc/sys/kernel/panic_on_oops 114*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=INT_TASKLET_ENTRY cpoint_type=OVERFLOW cpoint_count=10 115*49cdfc7eSAndroid Build Coastguard Worker ;; 116*49cdfc7eSAndroid Build Coastguard Worker "KPBB") 117*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=FS_DEVRW cpoint_type=BUG cpoint_count=10 118*49cdfc7eSAndroid Build Coastguard Worker ;; 119*49cdfc7eSAndroid Build Coastguard Worker "KPBE") 120*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=FS_DEVRW cpoint_type=EXCEPTION cpoint_count=10 121*49cdfc7eSAndroid Build Coastguard Worker ;; 122*49cdfc7eSAndroid Build Coastguard Worker "KPBL") 123*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=FS_DEVRW cpoint_type=LOOP cpoint_count=10 124*49cdfc7eSAndroid Build Coastguard Worker ;; 125*49cdfc7eSAndroid Build Coastguard Worker "KPBP") 126*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=FS_DEVRW cpoint_type=PANIC cpoint_count=10 127*49cdfc7eSAndroid Build Coastguard Worker ;; 128*49cdfc7eSAndroid Build Coastguard Worker "KPBO") 129*49cdfc7eSAndroid Build Coastguard Worker echo 1 >/proc/sys/kernel/panic_on_oops 130*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=FS_DEVRW cpoint_type=OVERFLOW cpoint_count=10 131*49cdfc7eSAndroid Build Coastguard Worker ;; 132*49cdfc7eSAndroid Build Coastguard Worker "KPMSB") 133*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=MEM_SWAPOUT cpoint_type=BUG cpoint_count=10 134*49cdfc7eSAndroid Build Coastguard Worker ;; 135*49cdfc7eSAndroid Build Coastguard Worker "KPMSE") 136*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=MEM_SWAPOUT cpoint_type=EXCEPTION cpoint_count=10 137*49cdfc7eSAndroid Build Coastguard Worker ;; 138*49cdfc7eSAndroid Build Coastguard Worker "KPMSL") 139*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=MEM_SWAPOUT cpoint_type=LOOP cpoint_count=10 140*49cdfc7eSAndroid Build Coastguard Worker ;; 141*49cdfc7eSAndroid Build Coastguard Worker "KPMSP") 142*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=MEM_SWAPOUT cpoint_type=PANIC cpoint_count=10 143*49cdfc7eSAndroid Build Coastguard Worker ;; 144*49cdfc7eSAndroid Build Coastguard Worker "KPMSO") 145*49cdfc7eSAndroid Build Coastguard Worker echo 1 >/proc/sys/kernel/panic_on_oops 146*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=MEM_SWAPOUT cpoint_type=OVERFLOW cpoint_count=10 147*49cdfc7eSAndroid Build Coastguard Worker ;; 148*49cdfc7eSAndroid Build Coastguard Worker "KPTB") 149*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=TIMERADD cpoint_type=BUG cpoint_count=10 150*49cdfc7eSAndroid Build Coastguard Worker ;; 151*49cdfc7eSAndroid Build Coastguard Worker "KPTE") 152*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=TIMERADD cpoint_type=EXCEPTION cpoint_count=10 153*49cdfc7eSAndroid Build Coastguard Worker ;; 154*49cdfc7eSAndroid Build Coastguard Worker "KPTL") 155*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=TIMERADD cpoint_type=LOOP cpoint_count=10 156*49cdfc7eSAndroid Build Coastguard Worker ;; 157*49cdfc7eSAndroid Build Coastguard Worker "KPTP") 158*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=TIMERADD cpoint_type=PANIC cpoint_count=10 159*49cdfc7eSAndroid Build Coastguard Worker ;; 160*49cdfc7eSAndroid Build Coastguard Worker "KPTO") 161*49cdfc7eSAndroid Build Coastguard Worker echo 1 >/proc/sys/kernel/panic_on_oops 162*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=TIMERADD cpoint_type=OVERFLOW cpoint_count=10 163*49cdfc7eSAndroid Build Coastguard Worker ;; 164*49cdfc7eSAndroid Build Coastguard Worker "KPSB") 165*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=SCSI_DISPATCH_CMD cpoint_type=BUG cpoint_count=10 166*49cdfc7eSAndroid Build Coastguard Worker ;; 167*49cdfc7eSAndroid Build Coastguard Worker "KPSE") 168*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=SCSI_DISPATCH_CMD cpoint_type=EXCEPTION cpoint_count=10 169*49cdfc7eSAndroid Build Coastguard Worker ;; 170*49cdfc7eSAndroid Build Coastguard Worker "KPSL") 171*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=SCSI_DISPATCH_CMD cpoint_type=LOOP cpoint_count=10 172*49cdfc7eSAndroid Build Coastguard Worker ;; 173*49cdfc7eSAndroid Build Coastguard Worker "KPSP") 174*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=SCSI_DISPATCH_CMD cpoint_type=PANIC cpoint_count=10 175*49cdfc7eSAndroid Build Coastguard Worker ;; 176*49cdfc7eSAndroid Build Coastguard Worker "KPSO") 177*49cdfc7eSAndroid Build Coastguard Worker echo 1 >/proc/sys/kernel/panic_on_oops 178*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=SCSI_DISPATCH_CMD cpoint_type=OVERFLOW cpoint_count=10 179*49cdfc7eSAndroid Build Coastguard Worker ;; 180*49cdfc7eSAndroid Build Coastguard Worker "KPIB") 181*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=IDE_CORE_CP cpoint_type=BUG cpoint_count=10 182*49cdfc7eSAndroid Build Coastguard Worker ;; 183*49cdfc7eSAndroid Build Coastguard Worker "KPIE") 184*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=IDE_CORE_CP cpoint_type=EXCEPTION cpoint_count=10 185*49cdfc7eSAndroid Build Coastguard Worker ;; 186*49cdfc7eSAndroid Build Coastguard Worker "KPIL") 187*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=IDE_CORE_CP cpoint_type=LOOP cpoint_count=10 188*49cdfc7eSAndroid Build Coastguard Worker ;; 189*49cdfc7eSAndroid Build Coastguard Worker "KPIP") 190*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=IDE_CORE_CP cpoint_type=PANIC cpoint_count=10 191*49cdfc7eSAndroid Build Coastguard Worker ;; 192*49cdfc7eSAndroid Build Coastguard Worker "KPIO") 193*49cdfc7eSAndroid Build Coastguard Worker echo 1 >/proc/sys/kernel/panic_on_oops 194*49cdfc7eSAndroid Build Coastguard Worker insmod "${lkdtm}"/lkdtm.ko cpoint_name=IDE_CORE_CP cpoint_type=OVERFLOW cpoint_count=01 195*49cdfc7eSAndroid Build Coastguard Worker ;; 196*49cdfc7eSAndroid Build Coastguard Worker "KLEXT") 197*49cdfc7eSAndroid Build Coastguard Worker echo "ext3 ${EXT3_PART}" >/etc/kdump.conf 198*49cdfc7eSAndroid Build Coastguard Worker if [ "${FILTER}" -eq 1 ]; then 199*49cdfc7eSAndroid Build Coastguard Worker echo "core_collector makedumpfile ${MAKE_OPTIONS}" >>/etc/kdump.conf 200*49cdfc7eSAndroid Build Coastguard Worker fi 201*49cdfc7eSAndroid Build Coastguard Worker /etc/init.d/kdump restart 202*49cdfc7eSAndroid Build Coastguard Worker echo c >/proc/sysrq-trigger 203*49cdfc7eSAndroid Build Coastguard Worker ;; 204*49cdfc7eSAndroid Build Coastguard Worker 205*49cdfc7eSAndroid Build Coastguard Worker "KLLBL") 206*49cdfc7eSAndroid Build Coastguard Worker echo "ext3 LABEL=${EXT3_LABEL}" >/etc/kdump.conf 207*49cdfc7eSAndroid Build Coastguard Worker if [ "${FILTER}" -eq 1 ]; then 208*49cdfc7eSAndroid Build Coastguard Worker echo "core_collector makedumpfile ${MAKE_OPTIONS}" >>/etc/kdump.conf 209*49cdfc7eSAndroid Build Coastguard Worker fi 210*49cdfc7eSAndroid Build Coastguard Worker /etc/init.d/kdump restart 211*49cdfc7eSAndroid Build Coastguard Worker echo c >/proc/sysrq-trigger 212*49cdfc7eSAndroid Build Coastguard Worker ;; 213*49cdfc7eSAndroid Build Coastguard Worker 214*49cdfc7eSAndroid Build Coastguard Worker "KLUID") 215*49cdfc7eSAndroid Build Coastguard Worker echo "ext3 UUID=${EXT3_UID}" >/etc/kdump.conf 216*49cdfc7eSAndroid Build Coastguard Worker if [ "${FILTER}" -eq 1 ]; then 217*49cdfc7eSAndroid Build Coastguard Worker echo "core_collector makedumpfile ${MAKE_OPTIONS}" >>/etc/kdump.conf 218*49cdfc7eSAndroid Build Coastguard Worker fi 219*49cdfc7eSAndroid Build Coastguard Worker /etc/init.d/kdump restart 220*49cdfc7eSAndroid Build Coastguard Worker echo c >/proc/sysrq-trigger 221*49cdfc7eSAndroid Build Coastguard Worker ;; 222*49cdfc7eSAndroid Build Coastguard Worker 223*49cdfc7eSAndroid Build Coastguard Worker "KLRAW") 224*49cdfc7eSAndroid Build Coastguard Worker echo "raw ${RAW_PART}" >/etc/kdump.conf 225*49cdfc7eSAndroid Build Coastguard Worker if [ "${FILTER}" -eq 1 ]; then 226*49cdfc7eSAndroid Build Coastguard Worker echo "core_collector makedumpfile ${MAKE_OPTIONS}" >>/etc/kdump.conf 227*49cdfc7eSAndroid Build Coastguard Worker fi 228*49cdfc7eSAndroid Build Coastguard Worker /etc/init.d/kdump restart 229*49cdfc7eSAndroid Build Coastguard Worker echo c >/proc/sysrq-trigger 230*49cdfc7eSAndroid Build Coastguard Worker ;; 231*49cdfc7eSAndroid Build Coastguard Worker 232*49cdfc7eSAndroid Build Coastguard Worker "KNSCP") 233*49cdfc7eSAndroid Build Coastguard Worker echo "net ${SCP_PATH}" >/etc/kdump.conf 234*49cdfc7eSAndroid Build Coastguard Worker if [ "${LINK_DELAY}" ]; then 235*49cdfc7eSAndroid Build Coastguard Worker echo "link_delay ${LINK_DELAY}" >>/etc/kdump.conf 236*49cdfc7eSAndroid Build Coastguard Worker fi 237*49cdfc7eSAndroid Build Coastguard Worker 238*49cdfc7eSAndroid Build Coastguard Worker expect -f ./ssh.tcl "/etc/init.d/kdump propagate" "${SCP_PASS}" 239*49cdfc7eSAndroid Build Coastguard Worker if [ "${FILTER}" -eq 1 ]; then 240*49cdfc7eSAndroid Build Coastguard Worker echo "core_collector makedumpfile ${MAKE_OPTIONS}" >>/etc/kdump.conf 241*49cdfc7eSAndroid Build Coastguard Worker fi 242*49cdfc7eSAndroid Build Coastguard Worker /etc/init.d/kdump restart 243*49cdfc7eSAndroid Build Coastguard Worker echo c >/proc/sysrq-trigger 244*49cdfc7eSAndroid Build Coastguard Worker ;; 245*49cdfc7eSAndroid Build Coastguard Worker 246*49cdfc7eSAndroid Build Coastguard Worker "KNNFS") 247*49cdfc7eSAndroid Build Coastguard Worker echo "net ${NFS_PATH}" >/etc/kdump.conf 248*49cdfc7eSAndroid Build Coastguard Worker if [ "${LINK_DELAY}" ]; then 249*49cdfc7eSAndroid Build Coastguard Worker echo "link_delay ${LINK_DELAY}" >>/etc/kdump.conf 250*49cdfc7eSAndroid Build Coastguard Worker fi 251*49cdfc7eSAndroid Build Coastguard Worker 252*49cdfc7eSAndroid Build Coastguard Worker if [ "${FILTER}" -eq 1 ]; then 253*49cdfc7eSAndroid Build Coastguard Worker echo "core_collector makedumpfile ${MAKE_OPTIONS}" >>/etc/kdump.conf 254*49cdfc7eSAndroid Build Coastguard Worker fi 255*49cdfc7eSAndroid Build Coastguard Worker /etc/init.d/kdump restart 256*49cdfc7eSAndroid Build Coastguard Worker echo c >/proc/sysrq-trigger 257*49cdfc7eSAndroid Build Coastguard Worker ;; 258*49cdfc7eSAndroid Build Coastguard Worker 259*49cdfc7eSAndroid Build Coastguard Worker "KDENB") 260*49cdfc7eSAndroid Build Coastguard Worker echo "net ${SCP_PATH}" >/etc/kdump.conf 261*49cdfc7eSAndroid Build Coastguard Worker expect -f ./ssh.tcl "/etc/init.d/kdump propagate" "${SCP_PASS}" 262*49cdfc7eSAndroid Build Coastguard Worker /etc/init.d/kdump restart 263*49cdfc7eSAndroid Build Coastguard Worker ;; 264*49cdfc7eSAndroid Build Coastguard Worker 265*49cdfc7eSAndroid Build Coastguard Worker *) 266*49cdfc7eSAndroid Build Coastguard Worker echo "Unknown test." 267*49cdfc7eSAndroid Build Coastguard Worker ;; 268*49cdfc7eSAndroid Build Coastguard Worker 269*49cdfc7eSAndroid Build Coastguard Workeresac 270*49cdfc7eSAndroid Build Coastguard Worker 271*49cdfc7eSAndroid Build Coastguard Workerexit 0 272