From: Nikos Skalkotos Date: Wed, 29 Aug 2012 09:07:23 +0000 (+0300) Subject: Fix fix_acpid syspep X-Git-Tag: v0.1~25 X-Git-Url: https://code.grnet.gr/git/snf-image-creator/commitdiff_plain/c0f3abdca46957fead1c304b2505e7d505688f79 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". --- 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