Fix a bug in linux sysprep_* methods
[snf-image-creator] / image_creator / os_type / linux.py
index 724e902..cc7837b 100644 (file)
@@ -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"