svn commit: samba r20535 - in branches: SAMBA_3_0/source/script SAMBA_3_0_24/source/script

jra at samba.org jra at samba.org
Thu Jan 4 23:25:05 GMT 2007


Author: jra
Date: 2007-01-04 23:25:04 +0000 (Thu, 04 Jan 2007)
New Revision: 20535

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=20535

Log:
Fix make install to work when root doesn't have
write access into the source tree (like when your
directory is nfs mounted for example....).
Jeremy.

Modified:
   branches/SAMBA_3_0/source/script/installswat.sh
   branches/SAMBA_3_0_24/source/script/installswat.sh


Changeset:
Modified: branches/SAMBA_3_0/source/script/installswat.sh
===================================================================
--- branches/SAMBA_3_0/source/script/installswat.sh	2007-01-04 22:52:09 UTC (rev 20534)
+++ branches/SAMBA_3_0/source/script/installswat.sh	2007-01-04 23:25:04 UTC (rev 20535)
@@ -77,11 +77,15 @@
     echo $FNAME
     if test "$mode" = 'install'; then
       if [ "x$BOOKDIR" = "x" ]; then
-        cat $f | sed 's/@BOOKDIR at .*$//' > $f.tmp
+        cat $f | sed 's/@BOOKDIR at .*$//' > $FNAME.tmp
       else
-        cat $f | sed 's/@BOOKDIR@//' > $f.tmp
+        cat $f | sed 's/@BOOKDIR@//' > $FNAME.tmp
       fi
-      f=$f.tmp
+      if test ! -f "$FNAME.tmp"; then
+        echo "Cannot install $FNAME. Does $USER have privileges? "
+        exit 1
+      fi
+      f=$FNAME.tmp
       cp "$f" "$FNAME"
       rm -f "$f"
       if test ! -f "$FNAME"; then

Modified: branches/SAMBA_3_0_24/source/script/installswat.sh
===================================================================
--- branches/SAMBA_3_0_24/source/script/installswat.sh	2007-01-04 22:52:09 UTC (rev 20534)
+++ branches/SAMBA_3_0_24/source/script/installswat.sh	2007-01-04 23:25:04 UTC (rev 20535)
@@ -77,11 +77,15 @@
     echo $FNAME
     if test "$mode" = 'install'; then
       if [ "x$BOOKDIR" = "x" ]; then
-        cat $f | sed 's/@BOOKDIR at .*$//' > $f.tmp
+        cat $f | sed 's/@BOOKDIR at .*$//' > $FNAME.tmp
       else
-        cat $f | sed 's/@BOOKDIR@//' > $f.tmp
+        cat $f | sed 's/@BOOKDIR@//' > $FNAME.tmp
       fi
-      f=$f.tmp
+      if test ! -f "$FNAME.tmp"; then
+        echo "Cannot install $FNAME. Does $USER have privileges? "
+        exit 1
+      fi
+      f=$FNAME.tmp
       cp "$f" "$FNAME"
       rm -f "$f"
       if test ! -f "$FNAME"; then



More information about the samba-cvs mailing list