updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / brightd / brightd.install
blobb337f05f8c7734d0a4ace5dfe132d57da8039381
1 # Niklas Schmuecker (IRC: nisc) <nschmuecker (gmail)>
3 post_install() {
4   if [ ! `egrep '^brightd:' /etc/group` ]; then
5     echo 'Adding brightd group'
6     groupadd brightd
7   fi
8   if [ ! `egrep '^brightd:' /etc/passwd` ]; then
9     echo 'Adding brightd user'
10     useradd -d / -g brightd -s /bin/false brightd
11   fi
13   echo '
14   +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15   +          Please read /usr/share/doc/brightd/*         +
16   +                                                       +
17   +             rc-script: /etc/rc.d/brightd              +
18   +                config: /etc/conf.d/brightd            +
19   +                                                       +
20   +                       Have fun!                       +
21   +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
22   '
25 post_upgrade() {
26   /bin/true
29 pre_remove() {
30   # re-setting permissions
31   chgrp root /sys/class/backlight/*/brightness
32   chmod g-w /sys/class/backlight/*/brightness
33   chgrp root /dev/input/event*
35   echo '
36   ++++++++++++++++++++++++++++++++++++++++++++++++++++
37   + Please remember to clean up changes you may have +
38   +       made to your system. Have a nice day.      +
39   ++++++++++++++++++++++++++++++++++++++++++++++++++++
40   '
43 op=$1
44 shift
45 $op $*