pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/comms/minicom/scripts Replace test -e with -h and -c r...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/19bb9d9b6fe2
branches:  trunk
changeset: 477885:19bb9d9b6fe2
user:      salo <salo%pkgsrc.org@localhost>
date:      Sat Jul 10 22:41:39 2004 +0000

description:
Replace test -e with -h and -c respectively.
Addresses part of PR pkg/26235 by Georg Schwarz.

diffstat:

 comms/minicom/scripts/create-dev-link |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r 4a17a7d9b7de -r 19bb9d9b6fe2 comms/minicom/scripts/create-dev-link
--- a/comms/minicom/scripts/create-dev-link     Sat Jul 10 22:35:32 2004 +0000
+++ b/comms/minicom/scripts/create-dev-link     Sat Jul 10 22:41:39 2004 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-# $NetBSD: create-dev-link,v 1.4 1998/08/07 10:36:44 agc Exp $
+# $NetBSD: create-dev-link,v 1.5 2004/07/10 22:41:39 salo Exp $
 #
 #      pre-install script for Minicom port to FreeBSD 2.x
 
@@ -26,8 +26,7 @@
 echo ""
 echo -n "Lets see if you have too..."
 
-# might want to test for ``-h'' rather than ``-e''
-if [ -e /dev/modem ]; then
+if [ -h /dev/modem -o -c /dev/modem ]; then
        echo "  Good you do:"
        /bin/ls -l /dev/modem
 else
@@ -46,7 +45,7 @@
                echo -n "Enter the number X from ttyX above : "
                read bar
                if [ ${bar} ] ; then
-                       if [ -e /dev/tty${bar} ]; then
+                       if [ -c /dev/tty${bar} ]; then
                                ln -s /dev/tty${bar} /dev/modem
                        else
                                echo "Error: /dev/tty${bar} doesn't exist."



Home | Main Index | Thread Index | Old Index