diff --git a/image_creator/os_type/linux.py b/image_creator/os_type/linux.py
index 724e902bc1f3f01a287d8636fc308b909d039f5b..cc7837b8f4650663def54cd70a9d3b351bc37657 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"