Merge branch 'hvm' of 10.141.1.101:/var/lib/qubes/git/marmarek/core into hvm

This commit is contained in:
Joanna Rutkowska 2012-04-30 13:27:53 +02:00
commit de4419d9e6
2 changed files with 20 additions and 7 deletions

View File

@ -14,7 +14,9 @@ fi
shopt -s nullglob shopt -s nullglob
HOTPLUG_STORE="/var/run/xen-hotplug/${XENBUS_PATH//\//-}" if [ -n "$XENBUS_PATH" ]; then
HOTPLUG_STORE="/var/run/xen-hotplug/${XENBUS_PATH//\//-}"
fi
get_dev() { get_dev() {
dev=$1 dev=$1
@ -102,7 +104,10 @@ case "$command" in
add) add)
case $t in case $t in
snapshot|origin) snapshot|origin)
p=$(xenstore_read "$XENBUS_PATH/params") p=$(xenstore_read_default "$XENBUS_PATH/params" 'MISSING')
if [ "$p" == "MISSING" ]; then
fatal "Missing device parameters ($t $XENBUS_PATH/params)"
fi
base=${p/:*/} base=${p/:*/}
cow=${p/*:/} cow=${p/*:/}
@ -191,18 +196,20 @@ case "$command" in
if [ "$command" = "cleanup" ]; then if [ "$command" = "cleanup" ]; then
t=$2 t=$2
else else
t=$(cat $HOTPLUG_STORE-type) t=$(cat $HOTPLUG_STORE-type 2>/dev/null || echo 'MISSING')
fi fi
case $t in case "$t" in
snapshot|origin) snapshot|origin)
if [ "$command" = "cleanup" ]; then if [ "$command" = "cleanup" ]; then
node=$3 node=$3
else else
node=$(cat "$HOTPLUG_STORE-node") node=$(cat "$HOTPLUG_STORE-node" 2> /dev/null)
fi fi
if [ -z "$node" ]; then if [ -z "$node" ]; then
fatal "No device node to remove" #fatal "No device node to remove"
#Most likely already removed
exit 0
fi fi
if [ ! -e "$node" ]; then if [ ! -e "$node" ]; then
@ -258,10 +265,13 @@ case "$command" in
for dev in $deps; do for dev in $deps; do
if [ -b "$dev" ]; then if [ -b "$dev" ]; then
log debug "Removing $dev" log debug "Removing $dev"
losetup -d $dev || true 2> /dev/null losetup -d $dev 2> /dev/null || true
fi fi
done done
if [ -n "$HOTPLUG_STORE" ]; then
rm $HOTPLUG_STORE-*
fi
release_lock "block" release_lock "block"
exit 0 exit 0

View File

@ -57,6 +57,9 @@ fi
if [ -z "$PKGLIST" ]; then if [ -z "$PKGLIST" ]; then
# No new updates # No new updates
if [ "$GUI" = 1 ]; then
zenity --info --text="No new updates available"
fi
exit 0 exit 0
fi fi