Lines 6-18
Link Here
|
6 |
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf |
6 |
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf |
7 |
# to enable this service: |
7 |
# to enable this service: |
8 |
# |
8 |
# |
9 |
# wacom_enable (bool): Set to NO by default. |
9 |
# wacom_enable (bool): Set to NO by default. |
10 |
# Set it to YES to enable wacom. |
10 |
# Set it to YES to enable wacom. |
|
|
11 |
# wacom_types (list): Set to "stylus eraser cursor pad touch" by |
12 |
# default. A list of wacom profiles to set up. |
13 |
# wacom_porttype (enum): Set to "%%PORTTYPE%%" by default. |
14 |
# Set this to usb or serial. |
11 |
# |
15 |
# |
12 |
# This script additionally offers setup and cleanup to configure Xorg |
16 |
# This script additionally offers setup and cleanup to configure Xorg |
13 |
# for use of the driver or remove the configuration settings. |
17 |
# for use of the driver or remove the configuration settings. |
14 |
# The input devices are only added to the first ServerLayout section |
18 |
# The input devices are only added to the first ServerLayout section |
15 |
# and also only removed once. |
19 |
# and also only removed once. |
|
|
20 |
# In USB mode the file /boot/loader.conf is also adjusted. |
16 |
# |
21 |
# |
17 |
|
22 |
|
18 |
. %%RC_SUBR%% |
23 |
. %%RC_SUBR%% |
Lines 286-291
Link Here
|
286 |
section_insert_line "$config" "ServerLayout" " InputDevice \"$ident\" \"SendCoreEvents\"" |
291 |
section_insert_line "$config" "ServerLayout" " InputDevice \"$ident\" \"SendCoreEvents\"" |
287 |
} |
292 |
} |
288 |
|
293 |
|
|
|
294 |
if [ "$(eval "echo \${${name}_porttype}")" = "usb" ]; then |
295 |
if ! /usr/bin/grep -qx 'uwacom_load="YES"' \ |
296 |
/boot/loader.conf; then |
297 |
echo "Setting up /boot/loader.conf" |
298 |
/bin/cp /boot/loader.conf /boot/loader.conf.orig |
299 |
echo 'uwacom_load="YES"' >> /boot/loader.conf |
300 |
fi |
301 |
fi |
289 |
} |
302 |
} |
290 |
|
303 |
|
291 |
# |
304 |
# |
Lines 381-391
Link Here
|
381 |
/bin/rm "$config.$$" |
394 |
/bin/rm "$config.$$" |
382 |
done |
395 |
done |
383 |
} |
396 |
} |
|
|
397 |
|
398 |
if [ "$(eval "echo \${${name}_porttype}")" = "usb" ]; then |
399 |
if /usr/bin/grep -qx 'uwacom_load="YES"' \ |
400 |
/boot/loader.conf; then |
401 |
echo "Cleaning up /boot/loader.conf" |
402 |
/bin/cp /boot/loader.conf /boot/loader.conf.orig |
403 |
/usr/bin/grep -xv 'uwacom_load="YES"' \ |
404 |
/boot/loader.conf.orig > /boot/loader.conf |
405 |
fi |
406 |
fi |
407 |
|
384 |
} |
408 |
} |
385 |
|
409 |
|
386 |
do_start() { |
410 |
do_start() { |
387 |
if /sbin/kldstat | /usr/bin/grep -q uwacom; then |
411 |
if /sbin/kldstat | /usr/bin/grep -q uwacom; then |
388 |
echo "${name} is already running." |
|
|
389 |
return 0 |
412 |
return 0 |
390 |
fi |
413 |
fi |
391 |
echo "Starting ${name}." |
414 |
echo "Starting ${name}." |