diff --git a/config/71-axp-power-button.rules b/config/71-axp-power-button.rules new file mode 100644 index 0000000000..7d66933f45 --- /dev/null +++ b/config/71-axp-power-button.rules @@ -0,0 +1,5 @@ +# Handle AXP power button with systemd +ACTION=="remove", GOTO="power_switch_end" +SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="axp20x-pek", TAG+="power-switch" +SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="axp[12][890]-supplyer", TAG+="power-switch" +LABEL="power_switch_end" \ No newline at end of file diff --git a/distributions.sh b/distributions.sh index 929a1c0478..64b1223bdd 100644 --- a/distributions.sh +++ b/distributions.sh @@ -91,8 +91,12 @@ jessie) # seting timeout mkdir -p $DEST/cache/sdcard/etc/systemd/system/systemd-modules-load.service.d/ - echo "[Service]" > $DEST/cache/sdcard/etc/systemd/system/systemd-modules-load.service.d/10-timeout.conf - echo "TimeoutStopSec=10" >> $DEST/cache/sdcard/etc/systemd/system/systemd-modules-load.service.d/10-timeout.conf + echo "[Service]" > $DEST/cache/sdcard/etc/systemd/system/systemd-modules-load.service.d/10-timeout.conf + echo "TimeoutStopSec=10" >> $DEST/cache/sdcard/etc/systemd/system/systemd-modules-load.service.d/10-timeout.conf + + # handle PMU power button + mkdir -p $DEST/cache/sdcard/etc/udev/rules.d/ + cp $SRC/lib/config/71-axp-power-button.rules $DEST/cache/sdcard/etc/udev/rules.d/ ;; # Ubuntu Trusty