From 3d083be5a9b6e45a6fd98692926d07440b9b6860 Mon Sep 17 00:00:00 2001
From: Nikos Skalkotos <skalkoto@grnet.gr>
Date: Fri, 16 Mar 2012 17:36:23 +0200
Subject: [PATCH] Fix a bug in linux sysprep_* methods

The parameter order when calling guestfs.write was incorrect.
---
 image_creator/os_type/linux.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/image_creator/os_type/linux.py b/image_creator/os_type/linux.py
index 724e902..cc7837b 100644
--- a/image_creator/os_type/linux.py
+++ b/image_creator/os_type/linux.py
@@ -34,9 +34,9 @@ class Linux(Unix):
         '\"Power button pressed\"'
 
         if self.g.is_file('/etc/acpi/powerbtn.sh'):
-            self.g.write(action, '/etc/acpi/powerbtn.sh')
+            self.g.write('/etc/acpi/powerbtn.sh', action)
         elif self.g.is_file('/etc/acpi/actions/power.sh'):
-            self.g.write(actions, '/etc/acpi/actions/power.sh')
+            self.g.write('/etc/acpi/actions/power.sh', action)
         else:
             print "Warning: No acpid action file found"
 
-- 
GitLab