mdraid: add mdmon-offroot@.service and takeover mdmon in shutdown
parent
ebd1d65a1b
commit
ffc4f173b6
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
_do_mdmon_takeover() {
|
||||
local ret
|
||||
mdmon --takeover --all
|
||||
ret=$?
|
||||
[ $ret -eq 0 ] && info "Taking over mdmon processes."
|
||||
return $ret
|
||||
}
|
||||
|
||||
if command -v mdmon >/dev/null; then
|
||||
_do_mdmon_takeover $1
|
||||
else
|
||||
:
|
||||
fi
|
||||
|
|
@ -88,5 +88,8 @@ install() {
|
|||
inst_hook shutdown 30 "$moddir/md-shutdown.sh"
|
||||
inst_script "$moddir/mdraid-cleanup.sh" /sbin/mdraid-cleanup
|
||||
inst_script "$moddir/mdraid_start.sh" /sbin/mdraid_start
|
||||
if [ -e /lib/systemd/system/mdmon-offroot@.service ]; then
|
||||
inst_simple /lib/systemd/system/mdmon-offroot@.service
|
||||
fi
|
||||
inst_hook pre-shutdown 30 "$moddir/mdmon-pre-shutdown.sh"
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue