--- install.sh.orig	Wed Jul  8 08:30:44 1998
+++ install.sh	Wed Jul  8 08:32:18 1998
@@ -43,7 +43,19 @@
 UMASK=022
 OWNER=`expr "$id" : '.*uid=.*(\(.*\)).*gid'`
 GROUP=`expr "$id" : '.*gid=[0-9]*(\([a-zA-Z0-9_]*\))'`
-BINOWNER=$OWNER
+if [ -z "$BINOWNER" ]
+then
+	BINOWNER=$OWNER
+fi
+if [ -z "$BINGROUP" ]
+then
+	BINGROUP=$GROUP
+fi
+if [ -z "$INSTALL" ]
+then
+	INSTALL=/usr/bin/install
+fi
+
 
 USERS=100
 HANGS=10
@@ -223,28 +235,13 @@
 			rm -f $2
 		fi
 
-		cp $1 $2
+		$INSTALL -c -m $3 -o $4 -g $5 $1 $2
 		if [ $? != 0 ]
 		then
 			logerr -n "Cannot install $2: file copy error."
 			return 1
 		fi
 
-		if [ -f $2 ]
-		then
-			if [ $3 != default ]
-			then
-				chmod $3 $2 2>/dev/null
-			fi
-			if [ $4 != default ]
-			then
-				chown $4 $2 2>/dev/null
-			fi
-			if [ $5 != default ]
-			then
-				chgrp $5 $2 2>/dev/null
-			fi
-		fi
 		return 0
 	else
 		$ECHO "\t$2 NOT installed"
@@ -792,7 +789,7 @@
 $ECHO "\nInstalling files..."
 
 # Binaries
-instfile cddbd ${BINDIR}/cddbd $BINPERM $BINOWNER $GROUP
+instfile cddbd ${BINDIR}/cddbd $BINPERM $BINOWNER $BINGROUP
 
 if [ "$CGIDIR" != "" ]
 then
