-
Notifications
You must be signed in to change notification settings - Fork 0
/
lpm.rc
48 lines (37 loc) · 1.19 KB
/
lpm.rc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
on early-init
start ueventd
write /sys/class/power_supply/battery/charging_mode_booting 1
on init
sysclktz 0
on boot
# set cpu governor to powersave while in charging mode
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor powersave
write /sys/module/sweep2wake/parameters/enable 1
write /sys/module/doubletap2wake/parameters/enable 1
# Make lvm executable
chmod 0777 /lvm/sbin/lvm
# LVM: Wait for block devices to become available, then set up LVM
# volumes
wait /dev/block/mmcblk0
start lvm_vgscan
start lvm_vgchange
# Needed for date/time in charging mode
mkdir /data
mount ext4 /dev/lvpool/data /data wait ro
mkdir /system
mount ext4 /dev/lvpool/system /system wait ro
class_start default
## Daemon processes to be run by init.
##
service ueventd /sbin/ueventd
critical
service battery_charger /charger
# LVM services
# Scan for LVM physical volumes and set up volume groups
service lvm_vgscan /lvm/sbin/lvm vgscan --mknodes --ignorelockingfailure
disabled
oneshot
# Activate LVM logical volumes in found volume groups
service lvm_vgchange /lvm/sbin/lvm vgchange -aly --ignorelockingfailure
disabled
oneshot