Avoid killing nbd-daemon on shutdown
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
This commit is contained in:
parent
93763a2d82
commit
bdd302adaa
@ -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
|
||||
}
|
||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user