home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 August / Chip_2003-08_cd1.bin / zkuste / macos / Files / Safari.dmg / Safari.pkg / Contents / Resources / preflight < prev    next >
Text File  |  2003-06-16  |  502b  |  23 lines

  1. #!/usr/bin/perl
  2.  
  3. my $permissions_info_file = "/tmp/com.apple.installation.savedperm";
  4. my $target_disk = $ARGV[2];
  5. my @stat_info;
  6. my $MODE = 2;
  7. my $UID = 4;
  8. my $GID = 5;
  9.  
  10. if(! -e $permissions_info_file || (-e $permissions_info_file && unlink($permissions_info_file))) {
  11.     @stat_info = stat($target_disk);
  12.  
  13.     if(open(PERMS_FILE_HDL, ">$permissions_info_file")) {
  14.         print(PERMS_FILE_HDL join("\n", stat($target_disk)));
  15.         close(PERMS_FILE_HDL);
  16.         chmod(oct(700), "$permissions_info_file");
  17.     }
  18. }
  19.  
  20. exit(0);
  21.  
  22.  
  23.