Skip to content

Commit

Permalink
Improve examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Unrud committed May 8, 2016
1 parent 9657e22 commit 432d60c
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 7 deletions.
3 changes: 2 additions & 1 deletion etc/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
This directory contains setup examples.
This directory contains setup examples. The script should be installed to
`/usr/local/sbin/init-headphone`.
3 changes: 2 additions & 1 deletion etc/linux-grub/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
This directory contains configuration for **GRUB** to add required kernel
parameters.

Copy the file `init-headphone.cfg` to `/etc/default/grub.d`.
Copy the file `init-headphone.cfg` to `/etc/default/grub.d` and run
`update-grub`.
4 changes: 2 additions & 2 deletions etc/linux-pm-utils/init-headphone
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/sh

if [ ! -x /usr/sbin/init-headphone ]; then
if [ ! -x /usr/local/sbin/init-headphone ]; then
exit 0
fi

case $1 in
resume|thaw)
/usr/sbin/init-headphone
/usr/local/sbin/init-headphone
;;
esac
3 changes: 2 additions & 1 deletion etc/linux-systemd/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
This directory contains a configuration for **systemd** to run the script
on boot and after suspend and hibernation.

Copy the file `init-headphone.service` to `/etc/systemd/system`.
Copy the file `init-headphone.service` to `/etc/systemd/system` and run
`systemctl enable init-headphone`.
2 changes: 1 addition & 1 deletion etc/linux-systemd/init-headphone.service
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ After=hybrid-sleep.target

[Service]
Type=oneshot
ExecStart=/usr/sbin/init-headphone
ExecStart=/usr/local/sbin/init-headphone

[Install]
WantedBy=suspend.target
Expand Down
4 changes: 3 additions & 1 deletion etc/linux-upstart/init-headphone.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
description "Initialize headphone amplifier found in some Clevo laptops"

start on runlevel [2345]
exec /usr/sbin/init-headphone

exec /usr/local/sbin/init-headphone

0 comments on commit 432d60c

Please sign in to comment.