aboutsummaryrefslogtreecommitdiff
path: root/games/qtsixa/sixad.patch
blob: 441559fe84a2e10b3f2891acb41609d1d4767a2c (plain)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
--- sixad/sixad.orig	2011-10-12 18:39:33.000000000 +0200
+++ sixad/sixad	2013-03-30 19:15:48.576679323 +0100
@@ -48,13 +48,8 @@
 }

 bt_start () {
-$SUDO rm -f /tmp/.sixad-dbus-blocker.pid
-env sleep 1
-
-if [ -f /lib/udev/rules.d/97-bluetooth.rules ]; then
-  $SUDO /usr/sbin/bluetoothd --udev
-elif [ -f /etc/rc.d/bluetooth ]; then
-  $SUDO /etc/rc.d/bluetooth start
+if [ -f /etc/rc.d/rc.bluetooth ]; then
+  $SUDO /etc/rc.d/rc.bluetooth start
 else
   $SUDO /etc/init.d/bluetooth start
 fi
@@ -62,10 +57,12 @@

 bt_stop() {
 if (bluetoothd_running_check); then
-  $SUDO pkill -KILL bluetoothd
+  if [ -f /etc/rc.d/rc.bluetooth ]; then
+    $SUDO /etc/rc.d/rc.bluetooth stop
+  else
+    $SUDO /etc/init.d/bluetooth stop
+  fi
 fi
-
-$SUDO /usr/sbin/sixad-dbus-blocker &
 }

 case $1 in
@@ -108,38 +105,6 @@
 bt_start
   ;;

-  --boot-yes)
-# ArchLinux
-if [ -f /etc/arch-release ]; then
-  $SUDO sed '/DAEMONS=/ s/)/ sixad)/g' -i /etc/rc.conf
-# Gentoo
-elif [ -f /etc/gentoo-release ]; then
-  $SUDO rc-update add sixad
-# Debian (default)
-else
-  if [ -f /etc/rc2.d/S90sixad ]; then true; else $SUDO ln -s /etc/init.d/sixad /etc/rc2.d/S90sixad; fi
-  if [ -f /etc/rc3.d/S90sixad ]; then true; else $SUDO ln -s /etc/init.d/sixad /etc/rc3.d/S90sixad; fi
-  if [ -f /etc/rc4.d/S90sixad ]; then true; else $SUDO ln -s /etc/init.d/sixad /etc/rc4.d/S90sixad; fi
-  if [ -f /etc/rc5.d/S90sixad ]; then true; else $SUDO ln -s /etc/init.d/sixad /etc/rc5.d/S90sixad; fi
-fi
-  ;;
-
-  --boot-no)
-# ArchLinux
-if [ -f /etc/arch-release ]; then
-  $SUDO sed "s/ sixad//" -i /etc/rc.conf
-# Gentoo
-elif [ -f /etc/gentoo-release ]; then
-  $SUDO rc-update delete sixad
-# Debian (default)
-else
-  if [ -f /etc/rc2.d/S90sixad ]; then $SUDO rm /etc/rc2.d/S90sixad; fi
-  if [ -f /etc/rc3.d/S90sixad ]; then $SUDO rm /etc/rc3.d/S90sixad; fi
-  if [ -f /etc/rc4.d/S90sixad ]; then $SUDO rm /etc/rc4.d/S90sixad; fi
-  if [ -f /etc/rc5.d/S90sixad ]; then $SUDO rm /etc/rc5.d/S90sixad; fi
-fi
-  ;;
-
   --help|-help|help|-h)
 echo "[Qt]SixA Daemon"
 $0
@@ -162,9 +127,6 @@

     -r, --restore       Restore regular bluetooth

-        --boot-yes      Auto-starts sixad at boot time
-        --boot-no       Does not auto-start sixad at boot time
-
 You can also check: sixad-raw, sixad-notify"
   ;;