Avoid killing nbd-daemon on shutdown

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
This commit is contained in:
Gerardo Exequiel Pozzi 2011-06-18 19:46:08 -03:00
parent 93763a2d82
commit bdd302adaa
2 changed files with 10 additions and 0 deletions

View File

@ -86,5 +86,7 @@ archiso_pxe_nbd_mount_handler () {
if [ "${copytoram}" = "y" ]; then
msg "::: Disconnect NBD from ${nbdserver} at /dev/nbd0"
nbd-client -d /dev/nbd0
else
pidof nbd-client > /run/nbd_client.pid
fi
}

View File

@ -0,0 +1,8 @@
if [[ -f /run/nbd_client.pid ]]; then
omit_kill_nbd_client() {
add_omit_pids $(< /run/nbd_client.pid)
}
add_hook shutdown_prekillall omit_kill_nbd_client
add_hook single_prekillall omit_kill_nbd_client
fi