From c0f3abdca46957fead1c304b2505e7d505688f79 Mon Sep 17 00:00:00 2001 From: Nikos Skalkotos Date: Wed, 29 Aug 2012 12:07:23 +0300 Subject: [PATCH] Fix fix_acpid syspep Extend the mechanism to recognise events with value "button/power.*" as power button events. It used to only check for events with value "button[ /]power". --- image_creator/os_type/linux.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/image_creator/os_type/linux.py b/image_creator/os_type/linux.py index 91f6910..fd45152 100644 --- a/image_creator/os_type/linux.py +++ b/image_creator/os_type/linux.py @@ -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 -- 1.7.10.4