[Ovirt-devel] [PATCH node] Allow the init scripts to handle ctrl-c well

Bryan Kearney bkearney at redhat.com
Mon Dec 8 15:12:18 UTC 2008


From: Bryan Kearney <bkearney at localhost.localdomain>

---
 scripts/ovirt-functions |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/scripts/ovirt-functions b/scripts/ovirt-functions
index c6a8504..f641ea0 100644
--- a/scripts/ovirt-functions
+++ b/scripts/ovirt-functions
@@ -2,6 +2,13 @@
 
 OVIRT_LOGFILE=/var/log/ovirt.log
 
+# handle ctrl-c gracefully
+trap 'dropout' INT
+
+dropout() {
+    exit 0
+}
+
 # label of the oVirt partition
 OVIRT_LABEL=OVIRT
 # configuration defaults
-- 
1.6.0.4




More information about the ovirt-devel mailing list