File tree Expand file tree Collapse file tree 3 files changed +46
-1
lines changed Expand file tree Collapse file tree 3 files changed +46
-1
lines changed Original file line number Diff line number Diff line change 181181 do_chroot systemctl enable eth0-mackeeper
182182}
183183
184+ add_enable_headphones_service () {
185+ cat > " $DEST /etc/systemd/system/pinebook-headphones.service" << EOF
186+ [Unit]
187+ Description=Enable headpohones
188+ After=systemd-modules-load.service local-fs.target
189+
190+ [Service]
191+ Type=oneshot
192+ ExecStart=/usr/local/sbin/pinebook_enable_headphones.sh
193+
194+ [Install]
195+ WantedBy=multi-user.target
196+ EOF
197+ do_chroot systemctl enable pinebook-headphones
198+ }
199+
184200add_corekeeper_service () {
185201 cat > " $DEST /etc/systemd/system/cpu-corekeeper.service" << EOF
186202[Unit]
@@ -398,10 +414,13 @@ EOF
398414 add_mackeeper_service
399415 add_corekeeper_service
400416 add_ssh_keygen_service
417+ if [ " $MODEL " == " pinebook" ]; then
418+ add_enable_headphones_service
419+ add_hall_module_autoload
420+ fi
401421 add_disp_udev_rules
402422 add_wifi_module_autoload
403423 add_disp_module_autoload
404- add_hall_module_autoload
405424 add_asound_state
406425 sed -i
' s|After=rc.local.service|#\0|;' " $DEST /lib/systemd/system/[email protected] " 407426 rm -f " $DEST /second-phase"
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -xe
4+
5+ cd /sys/class/gpio
6+
7+ if [ ! -d gpio362 ]; then
8+ echo 362 > export
9+ fi
10+
11+ cd gpio362
12+ echo out > direction
13+ echo 1 > value
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -xe
4+
5+ cd /sys/class/gpio
6+
7+ if [ ! -d gpio362 ]; then
8+ echo 362 > export
9+ fi
10+
11+ cd gpio362
12+ echo out > direction
13+ echo 0 > value
You can’t perform that action at this time.
0 commit comments