Update of /cvsroot/fink/scripts/installer/resources
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22054

Modified Files:
        VolumeCheck 
Log Message:
Add diskutil permissions/ownership verification on the target volume.


Index: VolumeCheck
===================================================================
RCS file: /cvsroot/fink/scripts/installer/resources/VolumeCheck,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- VolumeCheck 7 Jun 2006 16:52:57 -0000       1.10
+++ VolumeCheck 10 Nov 2009 14:56:21 -0000      1.11
@@ -7,6 +7,7 @@
 my $PACKAGE_PATH = $ENV{PACKAGE_PATH};
 my $TARGET_VOLUME = $ARGV[0];
 my $targetdir = "$TARGET_VOLUME$basedir";
+my $cmd = "/usr/sbin/diskutil info \"$TARGET_VOLUME\" 2>&1";
 
 # set to index (16-31) of msg in *.lproj/InstallationCheck.strings if error
 my $errmsg = 0;
@@ -40,6 +41,20 @@
                $errmsg = 21;
                last;
        }
+
+       my @cmd_out = `$cmd`;
+       if (! @cmd_out || !$?) {
+               @cmd_out = map { /(?:Permissions|Owners):\s*(Enabled|Disabled)/ 
} @cmd_out;
+               if (! $cmd_out[0]) {
+                       print "Permissions and ownership are not enabled on 
${TARGET_VOLUME}!\n";
+                       $errmsg = 19;
+                       last;
+               }
+       } else {
+               print "Could not find the diskutil program which is necessary 
to check permissions and ownership on ${TARGET_VOLUME}!\n";
+               $errmsg = 20;
+               last;
+       }
 }
 
 # see 
http://developer.apple.com/documentation/DeveloperTools/Conceptual/SoftwareDistribution/Concepts/sd_volume_check_ref.html


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.cvs

Reply via email to