DragonFly BSD
DragonFly submit List (threaded) for 2004-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

/usr/src/etc/rc.d/moused patch


From: Sascha Wildner <saw@xxxxxxxxx>
Date: Tue, 27 Apr 2004 18:16:16 +0200

Hello,

please review the attached patch. This should fix all moused issues.

----
Fix an inaccuracy causing vidcontrol to be run more than once when moused is enabled. This caused error messages at boot time.


Add a stop_cmd so that moused properly restarts.
----

Regards,
Sascha

--
http://yoyodyne.ath.cx
*** /usr/src/etc/rc.d/moused	Tue Apr 27 18:08:53 2004
--- /usr/s/src/etc/rc.d/moused	Tue Apr 27 18:08:26 2004
***************
*** 15,20 ****
--- 15,26 ----
  rcvar=`set_rcvar`
  command="/usr/sbin/${name}"
  start_cmd="moused_start"
+ stop_cmd="moused_stop"
+ sig_stop="-INT"
+ 
+ # stdin must be redirected because it might be for a serial console
+ #
+ viddev=/dev/ttyv0
  
  moused_start()
  {
***************
*** 31,41 ****
  		;;
  	esac
  
! 	for ttyv in /dev/ttyv* ; do
! 		vidcontrol < ${ttyv} ${_mousechar_arg} -m on
! 	done
  	echo '.'
  }
  
  load_rc_config $name
  run_rc_command "$1"
--- 37,56 ----
  		;;
  	esac
  
! 	vidcontrol < ${viddev} ${_mousechar_arg} -m on
! 
  	echo '.'
  }
  
+ moused_stop()
+ {
+ 	pids="`check_process $command`"
+ 	if [ -n "$pids" ]; then
+ 		for pid in $pids; do
+ 			kill $sig_stop $pid
+ 		done
+ 	fi
+ }
+ 
  load_rc_config $name
  run_rc_command "$1"


[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]