Bump version to 0.2.2
[snf-image-creator] / image_creator / os_type / linux.py
index 91f6910..0166129 100644 (file)
@@ -91,7 +91,7 @@ class Linux(Unix):
                     action = m.group(1)
                     continue
 
-            if event.strip() == "button[ /]power":
+            if event.strip() in ("button[ /]power", "button/power.*"):
                 if action:
                     if not self.g.is_file(action):
                         self.out.warn("Acpid action file: %s does not exist" %
@@ -114,6 +114,8 @@ class Linux(Unix):
                               action.strip().split()[0])
                 return
 
+        self.out.warn("No acpi power button event found!")
+
     @sysprep()
     def remove_persistent_net_rules(self, print_header=True):
         """Remove udev rules that will keep network interface names persistent
@@ -154,12 +156,12 @@ class Linux(Unix):
     @sysprep()
     def use_persistent_block_device_names(self, print_header=True):
         """Scan fstab & grub configuration files and replace all non-persistent
-        device appearences with UUIDs.
+        device references with UUIDs.
         """
 
         if print_header:
             self.out.output("Replacing fstab & grub non-persistent device "
-                            "appearences")
+                            "references")
 
         # convert all devices in fstab to persistent
         persistent_root = self._persistent_fstab()