cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [08/50] git commit: updated refs/heads/master to 1290e10
Date Mon, 22 Sep 2014 19:44:07 GMT
CLOUDSTACK-7143: cleanup configure_acpid.sh code


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3c9f2c72
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3c9f2c72
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3c9f2c72

Branch: refs/heads/master
Commit: 3c9f2c72271bdb49b01dd8d9df922440427f05e4
Parents: 5627b67
Author: Leo Simons <lsimons@schubergphilis.com>
Authored: Mon Jul 21 11:19:48 2014 +0200
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Mon Sep 22 21:31:36 2014 +0200

----------------------------------------------------------------------
 .../definitions/systemvmtemplate/configure_acpid.sh     | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3c9f2c72/tools/appliance/definitions/systemvmtemplate/configure_acpid.sh
----------------------------------------------------------------------
diff --git a/tools/appliance/definitions/systemvmtemplate/configure_acpid.sh b/tools/appliance/definitions/systemvmtemplate/configure_acpid.sh
index 70abe30..4e986c0 100644
--- a/tools/appliance/definitions/systemvmtemplate/configure_acpid.sh
+++ b/tools/appliance/definitions/systemvmtemplate/configure_acpid.sh
@@ -1,5 +1,11 @@
-fix_acpid() {
-  # Fix acpid
+#!/bin/bash
+
+set -e
+set -x
+
+function configure_acpid() {
+  grep /usr/local/sbin/power.sh /etc/acpi/events/power && return
+
   mkdir -p /etc/acpi/events
   cat >> /etc/acpi/events/power << EOF
 event=button/power.*
@@ -12,4 +18,4 @@ EOF
   chmod a+x /usr/local/sbin/power.sh
 }
 
-fix_acpid
+return 2>/dev/null || configure_acpid


Mime
View raw message