summaryrefslogtreecommitdiff
path: root/.local/share/libvirt-hooks/qemu
diff options
context:
space:
mode:
authorseth <[email protected]>2022-01-21 16:47:39 -0500
committerseth <[email protected]>2022-08-04 04:40:49 -0400
commitac74db5a8fa69e5d3047b35f70c65b27dc07cfcb (patch)
tree5b6fcdb6cbf7c8c81a8b0a745e013094bdd82793 /.local/share/libvirt-hooks/qemu
parente5605617b57264069374ea0753c19cd69714df6d (diff)
update shell dotfiles
Diffstat (limited to '.local/share/libvirt-hooks/qemu')
-rwxr-xr-x.local/share/libvirt-hooks/qemu34
1 files changed, 0 insertions, 34 deletions
diff --git a/.local/share/libvirt-hooks/qemu b/.local/share/libvirt-hooks/qemu
deleted file mode 100755
index 155ec57..0000000
--- a/.local/share/libvirt-hooks/qemu
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/bash
-#
-# Author: Sebastiaan Meijer ([email protected])
-#
-# Copy this file to /etc/libvirt/hooks, make sure it's called "qemu".
-# After this file is installed, restart libvirt.
-# From now on, you can easily add per-guest qemu hooks.
-# Add your hooks in /etc/libvirt/hooks/qemu.d/vm_name/hook_name/state_name.
-# For a list of available hooks, please refer to https://www.libvirt.org/hooks.html
-#
-
-GUEST_NAME="$1"
-HOOK_NAME="$2"
-STATE_NAME="$3"
-MISC="${@:4}"
-
-BASEDIR="$(dirname $0)"
-
-HOOKPATH="$BASEDIR/qemu.d/$GUEST_NAME/$HOOK_NAME/$STATE_NAME"
-
-set -e # If a script exits with an error, we should as well.
-
-# check if it's a non-empty executable file
-if [ -f "$HOOKPATH" ] && [ -s "$HOOKPATH"] && [ -x "$HOOKPATH" ]; then
- eval \"$HOOKPATH\" "$@"
-elif [ -d "$HOOKPATH" ]; then
- while read file; do
- # check for null string
- if [ ! -z "$file" ]; then
- eval \"$file\" "$@"
- fi
- done <<< "$(find -L "$HOOKPATH" -maxdepth 1 -type f -executable -print;)"
-fi
-