déport de la désactivation d...
|
1 |
#!/bin/bash |
2 | ||
3 |
# horrible pansement pour permettre à bumblebee de fonctionner |
|
4 |
# ref: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=963980 |
|
5 | ||
6 |
# PATH=/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/sbin:/usr/sbin |
|
7 |
# $0 : /usr/local/bin/primusrun |
|
8 | ||
9 |
if dpkg -l primus > /dev/null 2>&1; then |
|
10 |
eval "$(egrep '^\s*(export +)?[A-Za-z_]+=' /usr/bin/primusrun)" |
|
11 |
# autres variables (cf. /usr/bin/primusrun): |
|
12 |
# export PRIMUS_SYNC=${PRIMUS_SYNC:-0} |
|
13 |
# export PRIMUS_VERBOSE=${PRIMUS_VERBOSE:-1} |
|
14 |
# export PRIMUS_UPLOAD=${PRIMUS_UPLOAD:-0} |
|
15 |
# export PRIMUS_SLEEP=${PRIMUS_SLEEP:-90} |
|
16 |
# export PRIMUS_DISPLAY=${PRIMUS_DISPLAY:-:8} |
|
17 |
# export PRIMUS_libGLa=${PRIMUS_libGLa:-'/usr/$LIB/nvidia/libGL.so.1'} |
|
18 |
# export PRIMUS_libGLd=${PRIMUS_libGLd:-'/usr/$LIB/libGL.so.1'} |
|
19 |
( |
|
20 |
path=/proc/driver/nvidia |
|
21 |
if ! test -e $path; then |
|
22 |
IFS=':' read -a radio <<< $(LANG=C nmcli -t radio) |
|
23 |
nmcli radio wifi off |
|
24 |
while ! test -e $path; do |
|
25 |
continue |
|
26 |
done |
|
27 |
test ${radio[1]} = 'enabled' && nmcli radio wifi on |
|
28 |
fi |
|
29 |
)& |
|
30 |
exec "$@" |
|
31 |
else |
|
32 |
echo "primus isn't installed" |
|
33 |
exit 1 |
|
34 |
fi |