/usr/src/etc/rc.d/moused patch
This is a multi-part message in MIME format.
--------------020206000208040005030200
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
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
--------------020206000208040005030200
Content-Type: text/plain;
name="patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="patch"
*** /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"
--------------020206000208040005030200--
討論串 (同標題文章)
完整討論串 (本文為第 1 之 10 篇):