#!/bin/sh set -e ### added by qemu/debian/gen-module-upgrade.sh: case $1 in (upgrade|deconfigure) # only save if qemu-system-* or kvm process running # can also check version of the running processes if ps -e -o comm | grep -E -q '^(qemu-system-|kvm$)'; then echo "qemu-block-extra: qemu process(es) running, saving block modules in /run/qemu/Debian_1_10.0.8+ds-0+deb13u1+b1..." mkdir -p -m 0755 /run/qemu/Debian_1_10.0.8+ds-0+deb13u1+b1 ( cd /usr/lib/x86_64-linux-gnu/qemu/; cp -p -n -t /run/qemu/Debian_1_10.0.8+ds-0+deb13u1+b1/ block-blkio.so block-curl.so block-dmg-bz2.so block-gluster.so block-iscsi.so block-nfs.so block-rbd.so block-ssh.so ) > /run/qemu/Debian_1_10.0.8+ds-0+deb13u1+b1/.savemoddir; chmod 0744 /run/qemu/Debian_1_10.0.8+ds-0+deb13u1+b1/.savemoddir if [ ! -x /run/qemu/Debian_1_10.0.8+ds-0+deb13u1+b1/.savemoddir ]; then # mounted noexec? mountpoint -q /run/qemu/Debian_1_10.0.8+ds-0+deb13u1+b1 || mount --bind /run/qemu/Debian_1_10.0.8+ds-0+deb13u1+b1 /run/qemu/Debian_1_10.0.8+ds-0+deb13u1+b1 mount -o remount,exec /run/qemu/Debian_1_10.0.8+ds-0+deb13u1+b1 fi fi ;; esac ### end added section