summaryrefslogtreecommitdiffstats
path: root/qemu/scripts/qemu-guest-agent/fsfreeze-hook
diff options
context:
space:
mode:
authorRajithaY <rajithax.yerrumsetty@intel.com>2017-04-25 03:31:15 -0700
committerRajitha Yerrumchetty <rajithax.yerrumsetty@intel.com>2017-05-22 06:48:08 +0000
commitbb756eebdac6fd24e8919e2c43f7d2c8c4091f59 (patch)
treeca11e03542edf2d8f631efeca5e1626d211107e3 /qemu/scripts/qemu-guest-agent/fsfreeze-hook
parenta14b48d18a9ed03ec191cf16b162206998a895ce (diff)
Adding qemu as a submodule of KVMFORNFV
This Patch includes the changes to add qemu as a submodule to kvmfornfv repo and make use of the updated latest qemu for the execution of all testcase Change-Id: I1280af507a857675c7f81d30c95255635667bdd7 Signed-off-by:RajithaY<rajithax.yerrumsetty@intel.com>
Diffstat (limited to 'qemu/scripts/qemu-guest-agent/fsfreeze-hook')
-rwxr-xr-xqemu/scripts/qemu-guest-agent/fsfreeze-hook33
1 files changed, 0 insertions, 33 deletions
diff --git a/qemu/scripts/qemu-guest-agent/fsfreeze-hook b/qemu/scripts/qemu-guest-agent/fsfreeze-hook
deleted file mode 100755
index c27b29f28..000000000
--- a/qemu/scripts/qemu-guest-agent/fsfreeze-hook
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-
-# This script is executed when a guest agent receives fsfreeze-freeze and
-# fsfreeze-thaw command, if it is specified in --fsfreeze-hook (-F)
-# option of qemu-ga or placed in default path (/etc/qemu/fsfreeze-hook).
-# When the agent receives fsfreeze-freeze request, this script is issued with
-# "freeze" argument before the filesystem is frozen. And for fsfreeze-thaw
-# request, it is issued with "thaw" argument after filesystem is thawed.
-
-LOGFILE=/var/log/qga-fsfreeze-hook.log
-FSFREEZE_D=$(dirname -- "$0")/fsfreeze-hook.d
-
-# Check whether file $1 is a backup or rpm-generated file and should be ignored
-is_ignored_file() {
- case "$1" in
- *~ | *.bak | *.orig | *.rpmnew | *.rpmorig | *.rpmsave | *.sample)
- return 0 ;;
- esac
- return 1
-}
-
-# Iterate executables in directory "fsfreeze-hook.d" with the specified args
-[ ! -d "$FSFREEZE_D" ] && exit 0
-for file in "$FSFREEZE_D"/* ; do
- is_ignored_file "$file" && continue
- [ -x "$file" ] || continue
- printf "$(date): execute $file $@\n" >>$LOGFILE
- "$file" "$@" >>$LOGFILE 2>&1
- STATUS=$?
- printf "$(date): $file finished with status=$STATUS\n" >>$LOGFILE
-done
-
-exit 0