add 04watchdog dracut module
parent
0efc6c716a
commit
ef914f7d83
|
|
@ -254,6 +254,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||
%{_mandir}/man5/dracut.conf.5*
|
||||
%{dracutlibdir}/modules.d/00bootchart
|
||||
%{dracutlibdir}/modules.d/00dash
|
||||
%{dracutlibdir}/modules.d/04watchdog
|
||||
%{dracutlibdir}/modules.d/05busybox
|
||||
%{dracutlibdir}/modules.d/10i18n
|
||||
%{dracutlibdir}/modules.d/30convertfs
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
|
||||
check() {
|
||||
return 255
|
||||
}
|
||||
|
||||
depends() {
|
||||
return 0
|
||||
}
|
||||
|
||||
install() {
|
||||
inst_hook cmdline 00 "$moddir/watchdog.sh"
|
||||
inst_hook cmdline 50 "$moddir/watchdog.sh"
|
||||
inst_hook pre-trigger 00 "$moddir/watchdog.sh"
|
||||
inst_hook initqueue 00 "$moddir/watchdog.sh"
|
||||
inst_hook mount 00 "$moddir/watchdog.sh"
|
||||
inst_hook mount 50 "$moddir/watchdog.sh"
|
||||
inst_hook pre-pivot 00 "$moddir/watchdog.sh"
|
||||
inst_hook cleanup 00 "$moddir/watchdog.sh"
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
if [ -e /dev/watchdog ]; then
|
||||
>/dev/watchdog
|
||||
else
|
||||
modprobe ib700wdt
|
||||
fi
|
||||
|
|
@ -832,6 +832,8 @@ emergency_shell()
|
|||
fi
|
||||
[ -c "$_ctty" ] || _ctty=/dev/tty1
|
||||
strstr "$(setsid --help 2>/dev/null)" "ctty" && CTTY="-c"
|
||||
# stop watchdog
|
||||
echo 'V' > /dev/watchdog
|
||||
setsid $CTTY /bin/sh -i -l 0<$_ctty 1>$_ctty 2>&1
|
||||
else
|
||||
warn "$action has failed. To debug this issue add \"rd.shell\" to the kernel command line."
|
||||
|
|
|
|||
Loading…
Reference in New Issue