diff options
| author | Jordan K. Hubbard <jkh@FreeBSD.org> | 1998-03-10 13:42:05 +0000 |
|---|---|---|
| committer | Jordan K. Hubbard <jkh@FreeBSD.org> | 1998-03-10 13:42:05 +0000 |
| commit | beb1c32dd3065500eb995d11b7d55cb1c33ba6cc (patch) | |
| tree | b45967662837f977e757dc6d77890228ea34b0a0 /usr.sbin/sysinstall/mouse.c | |
| parent | f380a4f2e1fc035df0e0755453badecb5a99d8be (diff) | |
Notes
Diffstat (limited to 'usr.sbin/sysinstall/mouse.c')
| -rw-r--r-- | usr.sbin/sysinstall/mouse.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/usr.sbin/sysinstall/mouse.c b/usr.sbin/sysinstall/mouse.c index c7b6c1920971..c95f9915a79d 100644 --- a/usr.sbin/sysinstall/mouse.c +++ b/usr.sbin/sysinstall/mouse.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: mouse.c,v 1.1 1998/03/07 08:59:28 jkh Exp $ */ #include "sysinstall.h" @@ -49,19 +49,21 @@ mousedTest(dialogMenuItem *self) } msgNotify("Trying to start the mouse daemon..."); - vsystem("kill `cat /var/run/moused.pid`"); - vsystem("vidcontrol -m on"); + if (file_readable("/var/run/moused.pid")) + vsystem("kill `cat /var/run/moused.pid`"); + systemExecute("vidcontrol -m on"); vsystem("moused -t %s -p %s", type, port); ret = msgYesNo("Now move the mouse and see if it works.\n" "(Note that buttons don't have any effect for now.)\n\n" " Is the mouse cursor moving?\n"); if (ret) { - vsystem("vidcontrol -m off"); - vsystem("kill `cat /var/run/moused.pid`"); - variable_set(VAR_MOUSED "=NO"); + systemExecute("vidcontrol -m off"); + if (file_readable("/var/run/moused.pid")) + vsystem("kill `cat /var/run/moused.pid`"); + variable_set2(VAR_MOUSED, "NO"); } else { - variable_set(VAR_MOUSED "=YES"); + variable_set2(VAR_MOUSED, "YES"); } return DITEM_SUCCESS; |
