diff options
author | veego <veego> | 2001-08-12 19:55:56 +0000 |
---|---|---|
committer | veego <veego> | 2001-08-12 19:55:56 +0000 |
commit | 8eafaf51dc4f0d3aa885dd65e754cfaadb94eb07 (patch) | |
tree | 8a80fc1a77c2a4fa8e361c3097efc2b0979d3c0b /print/cups | |
parent | 15b1593646c4a0c2b6a8aca9123077d9f48607f1 (diff) | |
download | pkgsrc-8eafaf51dc4f0d3aa885dd65e754cfaadb94eb07.tar.gz |
Fix same problems with the user check:
- use 'id' instead of 'finger'. this is not a real problem, but it
is enough and fixing the next problem makes it possible to use it.
- grep -q doesn't work on solaris, so use a different way to suppress
the output from the user check.
- the return code check for the user was reversed.
Diffstat (limited to 'print/cups')
-rw-r--r-- | print/cups/pkg/INSTALL | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/print/cups/pkg/INSTALL b/print/cups/pkg/INSTALL index 6c23fc07ab1..b7cc673ed55 100644 --- a/print/cups/pkg/INSTALL +++ b/print/cups/pkg/INSTALL @@ -1,6 +1,6 @@ #! /bin/sh # -# $NetBSD: INSTALL,v 1.9 2001/08/02 03:37:40 jlam Exp $ +# $NetBSD: INSTALL,v 1.10 2001/08/12 19:55:56 veego Exp $ PKGNAME=$1 STAGE=$2 @@ -45,16 +45,16 @@ PRE-INSTALL) fi ${RM} -f "/tmp/grouptest.$$" - # Use `finger' to be able to use NIS. + # Use `id' to be able to use NIS. # - finger ${USER} 2>&1 | ${GREP} -q "no such user" + id ${USER} 2>/dev/null >/dev/null if [ $? -eq 0 ] then + echo "User '${USER}' already exists...proceeding." + else echo "Creating '${USER}' user..." ${ADDUSER} -c "Common UNIX Printing System user" -g ${GROUP} -s /bin/sh ${USER} echo "Done." - else - echo "User '${USER}' already exists...proceeding." fi ;; |