Index: trunk/dsys/comINSTALL
===================================================================
--- trunk/dsys/comINSTALL	(revision 591)
+++ trunk/dsys/comINSTALL	(revision 1)
@@ -4,22 +4,4 @@
 #
 #########################################################################
-#
-# Copyright Rainer Wichmann (2005)
-#
-# License Information:
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
 
 commandINSTALL() {
@@ -169,5 +151,5 @@
     #---------------------------------------------------------------------
 
-    tmpdir=`eval echo "${temp_dir}/sh_${src_version}_${arch}_${format}_$$"`
+    tmpdir=`eval echo "/tmp/sh_${src_version}_${arch}_${format}_$$"`
 
     if test x"$simulate" = x0
@@ -255,12 +237,4 @@
 	    printINFO "ssh -x -l root ${host} /bin/sh -c '(cd ${tmpdir} && eval ${is_command} ${tmpdir}/samhain-${src_version}.${realformat} ${tmp_iname})'"
         fi
-    elif test "x$format" = "xsolaris-pkg"
-    then
-        if test x"$simulate" = x0
-        then
-            ssh -x -l "root" "${host}" /bin/sh -c \''(cd "'${tmpdir}'" && PATH="'/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$PATH'" && export PATH && eval "'${is_command}'" "'samhain-${src_version}.${realformat} all'") >/dev/null '\'
-        else
-	    printINFO "ssh -x -l root ${host} /bin/sh -c '(cd ${tmpdir} && eval ${is_command} samhain-${src_version}.${realformat}) all'"
-        fi
     elif test "x$format" = "xtbz2"
     then
@@ -329,13 +303,6 @@
 	if test "x$mytest_file" = x; then
 	    rcfile_perm=640;
-	    xgid=`(cat /etc/group; ypcat group) 2>/dev/null |\
-              grep "^samhain:" | awk -F: '{ print $3; }'`
-	    if test "x$xgid" = x; then
-	      rcfile_owner=`ls -ld ${yule_data} | awk '{print $3 }'`
-	      rcfile_group=`ls -ld ${yule_data} | awk '{print $4 }'`
-	    else
-	      rcfile_owner=`ls -ld ${yule_data} | awk '{print $3 }'`
-	      rcfile_group=samhain
-	    fi
+	    rcfile_owner=`ls -ld ${yule_data} | awk '{print $3 }'`
+	    rcfile_group=`ls -ld ${yule_data} | awk '{print $4 }'`
 	else
 	    mytest_file=`basename $mytest_file`
@@ -373,24 +340,7 @@
     #---------------------------------------------------------------------
 
-    instlock="${yule_conf}.lockdir";
-    trap "rm -rf ${instlock}" 1 2 13 15
-
-    if test x"$simulate" = x0
-    then
-	#
-	# A lockfile will not work, because 'root' can write anyway.
-	# However, 'mkdir' an existing directory will fail even for root
-	#
-	until (umask 222; mkdir "${instlock}") 2>/dev/null   # test & set
-	do
-	   printINFO "Waiting for lock"
-	   sleep 1
-	done
-    fi
-
     Replace=`"${yule_exec}" -P "${is_passwd}" | sed s%HOSTNAME%${host}%g`
     if test "x$Replace" = x
     then
-	rm -rf "${instlock}"
 	printFATAL "Could not execute ${yule_exec} -P ${is_passwd}."
     fi
@@ -406,9 +356,5 @@
             then
 	        Seen=y
-		echo "$Replace" >>"$tmpF" 
-		if [ $? -ne 0 ]; then
-			rm -rf "${instlock}"
-			printFATAL "Cannot write new server configuration."
-		fi
+		echo "$Replace" >>"$tmpF" || printFATAL "Cannot write new server configuration."
 	    fi
         else
@@ -417,9 +363,5 @@
 		:
 	    else
-		echo "$line" >>"$tmpF"
-		if [ $? -ne 0 ]; then
-			rm -rf "${instlock}"
-			printFATAL "Cannot write new server configuration."
-		fi
+		echo "$line" >>"$tmpF" || printFATAL "Cannot write new server configuration."
             fi
         fi
@@ -438,27 +380,8 @@
     if test x"$simulate" = x0
     then
-        ageFILE "${yule_conf}"
-	if [ $? -ne 0 ]; then
-		rm -rf "${instlock}"
-		printFATAL "Could not backup ${yule_conf}"
-	fi
-
-        rm -f "${yule_conf}" && cp "$tmpF"  "${yule_conf}"
-	if [ $? -ne 0 ]; then
-		rm -rf "${instlock}"
-		printFATAL "Could not write new server config. Backup is ${yule_conf}.1"
-	fi
-
-        chown ${rcfile_owner}:${rcfile_group} "${yule_conf}"
-	if [ $? -ne 0 ]; then
-		rm -rf "${instlock}"
-		printFATAL "Could not chown ${rcfile_owner}:${rcfile_group} ${yule_conf}"
-	fi
-
-        chmod ${rcfile_perm} "${yule_conf}"
-	if [ $? -ne 0 ]; then
-		rm -rf "${instlock}"
-		printFATAL "Could not chmod ${rcfile_perm} ${yule_conf}"
-	fi
+        ageFILE "${yule_conf}" || printFATAL "Could not backup ${yule_conf}."
+        rm -f "${yule_conf}" && { cp "$tmpF"  "${yule_conf}" || printFATAL "Could not write new server config. Backup is ${yule_conf}.1"; }
+        chown ${rcfile_owner}:${rcfile_group} "${yule_conf}" || printFATAL "Could not chown ${rcfile_owner}:${rcfile_group} ${yule_conf}"
+        chmod ${rcfile_perm} "${yule_conf}" || printFATAL "Could not chmod ${rcfile_perm} ${yule_conf}"
     else
         printINFO "Backup and update ${yule_conf}"
@@ -500,5 +423,4 @@
 	sleep 5
 	#
-	rm -rf "${instlock}"
     else
         printINFO "Reloading server configuration."
@@ -506,5 +428,4 @@
 
     printLOG "Server configuration updated and reloaded."
-
 
     #---------------------------------------------------------------------
@@ -553,13 +474,6 @@
 	if test "x$mytest_file" = x; then
 	    rcfile_perm=640;
-	    xgid=`(cat /etc/group; ypcat group) 2>/dev/null |\
-              grep "^samhain:" | awk -F: '{ print $3; }'`
-	    if test "x$xgid" = x; then
-	      rcfile_owner=`ls -ld ${yule_data} | awk '{print $3 }'`
-	      rcfile_group=`ls -ld ${yule_data} | awk '{print $4 }'`
-	    else
-	      rcfile_owner=`ls -ld ${yule_data} | awk '{print $3 }'`
-	      rcfile_group=samhain
-	    fi
+	    rcfile_owner=`ls -ld ${yule_data} | awk '{print $3 }'`
+	    rcfile_group=`ls -ld ${yule_data} | awk '{print $4 }'`
 	else
 	    mytest_file=`basename $mytest_file`
