mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-7143: cleanup configure_acpid.sh code
This commit is contained in:
parent
5627b67ff3
commit
3c9f2c7227
@ -1,5 +1,11 @@
|
||||
fix_acpid() {
|
||||
# Fix acpid
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
function configure_acpid() {
|
||||
grep /usr/local/sbin/power.sh /etc/acpi/events/power && return
|
||||
|
||||
mkdir -p /etc/acpi/events
|
||||
cat >> /etc/acpi/events/power << EOF
|
||||
event=button/power.*
|
||||
@ -12,4 +18,4 @@ EOF
|
||||
chmod a+x /usr/local/sbin/power.sh
|
||||
}
|
||||
|
||||
fix_acpid
|
||||
return 2>/dev/null || configure_acpid
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user