updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / jupiter / jupiter.install
blobd0cea7cd5bf95f8b2034d8075638cd4050a28017
1 post_install() {
3   echo "Creating jupiter group and adding rules to sudoers file"
4   if [ ! "$(grep jupiter /etc/group)" ]; then
5         echo "Adding Jupiter group"
6         /usr/sbin/groupadd jupiter
7   fi
8   grep jupiter /etc/sudoers >/dev/null 2>&1 || echo "%jupiter ALL=NOPASSWD: /usr/lib/jupiter/scripts/bluetooth, /usr/lib/jupiter/scripts/camera, /usr/lib/jupiter/scripts/cpu-control, /usr/lib/jupiter/scripts/resolutions, /usr/lib/jupiter/scripts/rotate, /usr/lib/jupiter/scripts/touchpad, /usr/lib/jupiter/scripts/vga-out, /usr/lib/jupiter/scripts/wifi" >> /etc/sudoers
9       echo "Setting permissions.."
10       chown -R root:jupiter /usr/lib/jupiter
11   if [ ! -d "/var/jupiter" ]; then
12         mkdir /var/jupiter
13   fi
15   if [ -d "/var/jupiter" ]; then
16                 chown -R root:jupiter /var/jupiter
17         chmod -R 775 /var/jupiter
18   fi
20   if [ -e "/usr/lib/jupiter/scripts/jupiter" ]; then
21         /usr/lib/jupiter/scripts/jupiter || true
22   fi
23   
24   if [ -e "/etc/pm/sleep.d/00-jupiter-wifi" ]; then
25         rm -f /etc/pm/sleep.d/00-jupiter-wifi 2>/dev/null || true
26   fi
27       
28   echo "Restarting ACPID ..."
29   /etc/rc.d/acpid restart 2>/dev/null || true
31   cat <<EOF
32 ==>     Please add your user and any users who will use jupiter to the jupiter
33 ==> group (gpasswd -a user jupiter)
34 ==> If Performance Modes can't be setted, add in your /etc/rc.conf:
35 ==> MODULES=(cpufreq ...)
36 ==>
37 EOF
40 post_upgrade() {
41   post_install