Blame 0020-Shut-down-the-appliance-cleanly.patch
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
From 02547e818821efdcf5aadb18f5764740fd6d4a17 Mon Sep 17 00:00:00 2001
|
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
From: Matthew Booth <mbooth@redhat.com>
|
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
Date: Thu, 26 Aug 2010 14:34:44 +0100
|
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
Subject: [PATCH] Shut down the appliance cleanly
|
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
|
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
When guestfsd exits, or the user exits the virt-rescue shell, the init script
|
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
exits which causes the kernel to panic. This isn't really a functional issue, as
|
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
all useful work is done by this point. However, it does cause virt-rescue to
|
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
display an unsightly error message.
|
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
|
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
This patch causes the appliance to power off cleanly before the init script
|
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
exits. Note it actually does a reboot rather than a poweroff. This is because
|
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
ACPI is disabled in the appliance, meaning poweroff doesn't work, but qemu is
|
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
configured not to restart on reboot.
|
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
(cherry picked from commit d3fc7e1e4d592dbdc6b8b9edf92dddc0a67eac28)
|
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
---
|
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
appliance/init | 2 +-
|
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
1 files changed, 1 insertions(+), 1 deletions(-)
|
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
|
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
diff --git a/appliance/init b/appliance/init
|
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
index 90da1cb..1c01195 100755
|
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
--- a/appliance/init
|
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
+++ b/appliance/init
|
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
@@ -110,8 +110,8 @@ else
|
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
bash -i
|
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
echo
|
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
echo "virt-rescue: Syncing the disk now before exiting ..."
|
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
- echo "(Don't worry if you see a 'Kernel panic' message below)"
|
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
echo
|
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
fi
|
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
|
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
sync
|
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
+/sbin/reboot -f
|
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
--
|
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
1.7.1
|
|
![](https://seccdn.libravatar.org/avatar/2b144df64913845151df534542e1c73358afff4b3b67d9228c548513b08c6d02?s=16&d=retro) |
0882396 |
|