The 10.5.6 Update is recommended for all users running Mac OS X Leopard and includes general operating system fixes that enhance the stability, compatibility and security of your Mac.
For detailed information on this update, please visit this website: http://support.apple.com/kb/HT3194.
For detailed information on security updates, please visit this website: http://support.apple.com/kb/HT1222.
#!/usr/bin/perl
my $bundlePath = "$ARGV[1]";
my $bundleID = `defaults read \Q$bundlePath\E/Contents/Info CFBundleIdentifier`;
if ($?) {
print "Could not determine bundle identifier for $ARGV[1]\n";
exit 0;
}
chomp $bundleID;
open LIST, "./Tools/$bundleID.cleanup" || exit;
foreach my $file () {
chomp $file;
next if ($file eq '');
`/bin/rm -rf \Q$bundlePath\E/$file`;
}
close LIST;
#!/usr/bin/perl
$0 =~ m/.*\/(.*)$/;
my $stage = $1;
my $action = $ARGV[3];
my $wd = `pwd`;
chomp($wd);
my $actionsDir = $wd . "/" . 'postinstall' . "_actions/";
my $upgradeDir = $wd . "/" . 'postupgrade' . "_actions/";
my $upgrade = 0;
my $debug = 1;
my $count;
if ( $0 =~ /postupgrade/ || $0 =~ /preupgrade/ || $action =~ /upgrade/) {
system("logger -p install.info 'Upgrade scripts will be run.'") if ( $debug );
$upgrade = 1;
}
if ( $stage =~ /pre/ )
{
$actionsDir = $wd . "/" . 'preinstall' . "_actions/";
$upgradeDir = $wd . "/" . 'preupgrade' . "_actions/";
}
if ( $upgrade == 1 && -e $upgradeDir ) {
system("logger -p install.info 'Running Upgrade Scripts . . .'") if ( $debug );
$count = 0;
foreach my $action (`/bin/ls \"$upgradeDir\"`) {
chomp($action);
system("logger -p install.info 'Begin script: $action'") if ( $debug );
system($upgradeDir . $action, $ARGV[0], $ARGV[1], $ARGV[2], $ARGV[3]);
system("logger -p install.info 'End script: $action'") if ( $debug );
$count++;
}
system("logger -p install.info '$count Upgrade Scripts run.'") if ( $debug );
}
if ( -e $actionsDir ) {
system("logger -p install.info 'Running Install Scripts . . .'") if ( $debug );
$count = 0;
foreach my $action (`/bin/ls \"$actionsDir\"`) {
chomp($action);
system("logger -p install.info 'Begin script: $action'") if ( $debug );
system($actionsDir . $action, $ARGV[0], $ARGV[1], $ARGV[2], $ARGV[3],$upgrade);
system("logger -p install.info 'End script: $action'") if ( $debug );
$count++;
}
system("logger -p install.info '$count Install Scripts run.'") if ( $debug );
}
exit(0);
#!/usr/bin/perl
my $TARGET = "\Q$ARGV[2]\E";
my @appendListFiles = glob("./Tools/*BaseSystemAdditions");
foreach my $appendList (@appendListFiles) {
next if (!-e $appendList);
open LIST, $appendList || next;
print "Reading $appendList for additions to BaseSystem package.\n";
foreach my $file () {
chomp $file;
next if ($file eq "");
`pkgutil --edit-pkg com.apple.pkg.BaseSystem --volume $TARGET --learn $TARGET/\Q$file\E` if ( -e "$ARGV[2]/$file" );
print "processing $file\n";
}
close LIST;
}
exit 0
#!/usr/bin/perl
my @cleanListArray = glob("./Tools/cleanList*");
foreach my $cleanList (@cleanListArray) {
next if (!-e $cleanList);
open LIST, $cleanList;
print "Reading $cleanList for cleaning\n";
foreach my $file () {
chomp $file;
next if ($file eq "");
system('/bin/rmdir', "$ARGV[2]/$file") if ( -d "$ARGV[2]/$file" );
system('/bin/rm', '-f', "$ARGV[2]/$file") if ( -f "$ARGV[2]/$file" );
}
close LIST;
}
exit 0
#!/bin/sh if [ ! -e "$3/System/Library/CoreServices/ServerVersion.plist" ]; then rm -rf "$3/usr/share/servermgrd/cgi-bin/servermgr_accounts" rm -rf "$3/usr/share/servermgrd/cgi-bin/servermgr_backup" rm -rf "$3/usr/share/servermgrd/cgi-bin/servermgr_calendar" rm -rf "$3/usr/share/servermgrd/cgi-bin/servermgr_teams" rm -rf "$3/usr/share/servermgrd/html/servermgr_accounts.html" rm -rf "$3/usr/share/servermgrd/html/servermgr_backup.html" rm -rf "$3/usr/share/servermgrd/html/servermgr_calendar.html" rm -rf "$3/usr/share/servermgrd/html/servermgr_teams.html" rm -rf "$3/usr/share/servermgrd/bundles/servermgr_accounts.bundle" rm -rf "$3/usr/share/servermgrd/bundles/servermgr_backup.bundle" rm -rf "$3/usr/share/servermgrd/bundles/servermgr_calendar.bundle" rm -rf "$3/usr/share/servermgrd/bundles/servermgr_teams.bundle" fi exit 0
#!/bin/sh if [ ! -e "$3/System/Library/CoreServices/ServerVersion.plist" ]; then /usr/sbin/postconf -c "$3"/etc/postfix -e inet_interfaces=localhost fi exit 0
#!/bin/sh rm -rf "$3/System/Library/Caches/com.apple.IntlDataCache" rm -rf "$3"/private/var/folders/*/*/-Caches-/com.apple.IntlDataCache exit 0
#!/usr/bin/perl
my $INFO_PLIST = "$ARGV[2]/System/Library/SystemConfiguration/ApplicationEnhancer.bundle/Contents/Info.plist";
my $BUNDLE_PATH = "$ARGV[2]/System/Library/SystemConfiguration/ApplicationEnhancer.bundle";
if (CheckVersion($INFO_PLIST, "2.0.2", "CFBundleShortVersionString", "<=")) {
system("rm", "-rf", "$BUNDLE_PATH");
}
exit 0;
sub CheckVersion
{
my $path = $_[0];
my $version = $_[1];
my $keyName = $_[2];
my $operator = $_[3];
my $i;
if (! -e $path) {
return 0;
}
if (!$operator) {
$operator = "==";
}
my $oldSeperator = $/;
$/ = \0;
open( PLIST, "$path") || do {
return 0;
};
my $plistData = ;
$plistData =~ /(.*?)<\/dict>/gis;
my @items = split(//, $plistData);
my %versiondata;
shift @items;
foreach my $item (@items) {
$item =~ /(.*?)<\/key>.*?(.*?)<\/string>/gis;
$versiondata{ $1 } = $2;
}
close(PLIST);
$/ = $oldSeperator;
my @theVersionArray = split(/\./, $versiondata{$keyName});
for ($i = 0; $i < 3; $i++) {
if(!$theVersionArray[$i]) {
$theVersionArray[$i] = '0';
}
}
my @versionArray = split(/\./, $version);
my $actualVersion;
for ($i = 0; $i < 3; $i++) {
if (($theVersionArray[$i] != $versionArray[$i]) or ($i == 2)) {
$actualVersion = $theVersionArray[$i];
$version = $versionArray[$i];
last;
}
}
if( $operator eq '<' ){ return int($actualVersion) < int($version); }
if( $operator eq 'lt' ){ return int($actualVersion) < int($version); }
if( $operator eq '>' ){ return int($actualVersion) > int($version); }
if( $operator eq 'gt' ){ return int($actualVersion) > int($version); }
if( $operator eq '<=' ){ return int($actualVersion) <= int($version); }
if( $operator eq 'le' ){ return int($actualVersion) <= int($version); }
if( $operator eq '>=' ){ return int($actualVersion) >= int($version); }
if( $operator eq 'ge' ){ return int($actualVersion) >= int($version); }
if( $operator eq '==' ){ return int($actualVersion) == int($version); }
if( $operator eq 'eq' ){ return int($actualVersion) == int($version); }
if( $operator eq '!=' ){ return int($actualVersion) != int($version); }
if( $operator eq 'ne' ){ return int($actualVersion) != int($version); }
} #!/bin/sh chmod +a "everyone deny delete" "$3/Applications" pkgutil --volume "$3" --learn Applications chmod +a "everyone deny delete" "$3/Applications/Utilities" pkgutil --volume "$3" --learn Applications/Utilities chmod +a "everyone deny delete" "$3/Library" pkgutil --volume "$3" --learn Library chmod +a "everyone deny delete" "$3/System/Library/User Template/English.lproj/Documents" pkgutil --volume "$3" --learn "System/Library/User Template/English.lproj/Documents" chmod +a "everyone deny delete" "$3/System/Library/User Template/English.lproj/Downloads" pkgutil --volume "$3" --learn "System/Library/User Template/English.lproj/Downloads"
#!/bin/sh pkgutil --learn "$3"/private/var/spool/cups/cache/rss exit 0
#!/usr/bin/perl
my @files = ("/bin/ps",
"/System/Library/CoreServices/Finder.app/Contents/Resources/OwnerGroupTool",
"/System/Library/Extensions/webdav_fs.kext/Contents/Resources/load_webdav",
"/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/Resources/SCHelper",
"/System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/Resources/Locum",
"/System/Library/PrivateFrameworks/Install.framework/Versions/A/Resources/runner",
"/usr/bin/setregion",
"/usr/bin/top",
"/usr/sbin/scselect");
foreach my $file (@files) {
`pkgutil --volume \Q$ARGV[2]\E --learn \Q$ARGV[2]\E/"$file"` if ( -e "$ARGV[2]/$file" );
}
#!/usr/bin/perl
my @files = ("/bin/ps",
"/System/Library/CoreServices/Finder.app/Contents/Resources/OwnerGroupTool",
"/usr/bin/lppasswd");
foreach my $file (@files) {
`pkgutil --volume \Q$ARGV[2]\E --learn \Q$ARGV[2]\E/"$file"` if ( -e "$ARGV[2]/$file" );
}
#!/bin/sh ./Tools/SetFile -a V "$2/mach_kernel" ./Tools/SetFile -a V "$2/mach_kernel.ctfsys" exit 0
#!/usr/bin/perl
if( -e "$3/Library/Internet Plug-Ins/Flash Player.plugin.BAK" )
{
`rm -Rf "$3/Library/Internet Plug-Ins/Flash Player.plugin"`;
`mv "$3/Library/Internet Plug-Ins/Flash Player.plugin.BAK" "$3/Library/Internet Plug-Ins/Flash Player.plugin"`;
}
exit(0);
#!/bin/sh
if [[ -x /usr/bin/emacs-ppc || -x /usr/bin/emacs-i386 ]]; then
rm -f /usr/bin/emacs-{ppc,i386}
/usr/libexec/dumpemacs
fi
exit 0
#!/bin/sh rm -rf "$3/System/Library/Extensions/IONetworkingFamily.kext/Contents/PlugIns/AppleYukon.kext" exit 0
#!/bin/sh rm -f "$3"/var/db/BootCache.playlist
#!/bin/sh if [ -e "$3/System/Library/Extensions/AppleUSBEthernet.kext" ]; then rm -rf "$3/System/Library/Extensions/AppleUSBEthernet.kext" fi exit 0
#!/bin/sh /bin/rm -rf "$3"/usr/libexec/SmartCardServices/drivers/CCIDClassDriver.bundle
#!/bin/sh rm -rf "$3/System/Library/Extensions/ATIRage128.kext" rm -rf "$3/System/Library/Extensions/ATIRage128DVDDriver.bundle" rm -rf "$3/System/Library/Extensions/ATIRage128GA.plugin" rm -rf "$3/System/Library/Extensions/ATIRage128GLDriver.bundle" rm -rf "$3/System/Library/Extensions/ATIRagePro.kext" rm -rf "$3/System/Library/Extensions/ATIRageProGA.plugin" rm -rf "$3/System/Library/Extensions/Adaptec29160x.kext" rm -rf "$3/System/Library/Extensions/Adaptec39160.kext" rm -rf "$3/System/Library/Extensions/Adaptec78XXSCSI.kext" rm -rf "$3/System/Library/Extensions/AppleAirPort2.kext" rm -rf "$3/System/Library/Extensions/AppleCore99PE.kext" rm -rf "$3/System/Library/Extensions/AppleCuda.kext" rm -rf "$3/System/Library/Extensions/AppleGossamerPE.kext" rm -rf "$3/System/Library/Extensions/AppleGracklePCI.kext" rm -rf "$3/System/Library/Extensions/AppleHeathrow.kext" rm -rf "$3/System/Library/Extensions/CMD646ATA.kext" rm -rf "$3/System/Library/Extensions/HeathrowATA.kext" rm -rf "$3/System/Library/Extensions/IOATAFamily.kext/Contents/PlugIns/IOATABlockStorage.kext/Contents/PlugIns/ATASMARTLib.plugin" rm -rf "$3/System/Library/Extensions/IOFireWireFamily.kext/Contents/PlugIns/AppleLynx.kext" rm -rf "$3/System/Library/Extensions/IONetworkingFamily.kext/Contents/PlugIns/AppleBCM440XEthernet.kext" rm -rf "$3/System/Library/Extensions/IONetworkingFamily.kext/Contents/PlugIns/AppleBMacEthernet.kext" rm -rf "$3/System/Library/Extensions/IONetworkingFamily.kext/Contents/PlugIns/AppleDP83816Ethernet.kext" rm -rf "$3/System/Library/Extensions/IOSerialFamily.kext/Contents/PlugIns/AppleSCCIrDA.kext" rm -rf "$3/System/Library/Extensions/IOSerialFamily.kext/Contents/PlugIns/DCPModemSupport.kext" rm -rf "$3/System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBCDCDriver.kext" rm -rf "$3/System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBCDCEthernet.kext" rm -rf "$3/System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBCDCWMCControl.kext" rm -rf "$3/System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBCDCWMCData.kext" rm -rf "$3/System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBComposite.kext" rm -rf "$3/System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBCDCEthernet.kext" rm -rf "$3/System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBCDCWMCControl.kext" rm -rf "$3/System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBCDCWMCData.kext" exit 0
#!/bin/sh rm -rf "$3/usr/X11/X11.app" rm -rf "$3/usr/X11/bin/dumpkeymap" rm -rf "$3/usr/X11/include/xorg" rm -rf "$3/usr/X11/lib/X11/man/man1" rm -rf "$3/usr/X11/lib/libGLw.1.dylib" rm -rf "$3/usr/X11/lib/libGLw.dylib" rm -rf "$3/usr/X11/include/GL/GLwDrawA.h" rm -rf "$3/usr/X11/include/GL/GLwDrawAP.h" rm -rf "$3/usr/X11/include/GL/GLwMDrawA.h" rm -rf "$3/usr/X11/include/GL/GLwMDrawAP.h" exit 0
#!/bin/sh if [ -e "$3/Applications/Utilities/Boot Camp Assistant.app" ] && [ ! -e "$3/Applications/Utilities/Boot Camp Assistant.app/Contents/Resources/DA.icns" ]; then rm -rf "$3/Applications/Utilities/Boot Camp Assistant.app" fi exit 0
#!/bin/sh if [ -e "$3/Applications/Utilities/X11.app/Contents/MacOS/X11" ] && [ ! -e "$3/Applications/Utilities/X11.app/Contents/Resources/X11.icns" ]; then rm -rf "$3/Applications/Utilities/X11.app" fi exit 0
#!/bin/sh
find -E /var/at/jobs -regex ".*/[^ab][[:xdigit:]]{13}" -depth 1 -exec rm -f {} \;
#!/usr/bin/perl
my $INFO_PLIST = "$ARGV[2]/Library/Intego/contentbarrierd.bundle/Contents/Resources/ContentBarrier X4 Daemon.app/Contents/Resources/ContentBarrierService.kext/Contents/Info.plist";
my $DISABLE_FILE = "$ARGV[2]/Library/Intego/contentbarrierd.bundle/Contents/MacOS/contentbarrierd";
if (CheckVersion($INFO_PLIST, "10.4.3", "CFBundleShortVersionString", "<=")) {
system("mv", $DISABLE_FILE, "${DISABLE_FILE}_disabled");
}
exit 0;
sub CheckVersion
{
my $path = $_[0];
my $version = $_[1];
my $keyName = $_[2];
my $operator = $_[3];
my $i;
if (! -e $path) {
return 0;
}
if (!$operator) {
$operator = "==";
}
my $oldSeperator = $/;
$/ = \0;
open( PLIST, "$path") || do {
return 0;
};
my $plistData = ;
$plistData =~ /(.*?)<\/dict>/gis;
my @items = split(//, $plistData);
my %versiondata;
shift @items;
foreach my $item (@items) {
$item =~ /(.*?)<\/key>.*?(.*?)<\/string>/gis;
$versiondata{ $1 } = $2;
}
close(PLIST);
$/ = $oldSeperator;
my @theVersionArray = split(/\./, $versiondata{$keyName});
for ($i = 0; $i < 3; $i++) {
if(!$theVersionArray[$i]) {
$theVersionArray[$i] = '0';
}
}
my @versionArray = split(/\./, $version);
my $actualVersion;
for ($i = 0; $i < 3; $i++) {
if (($theVersionArray[$i] != $versionArray[$i]) or ($i == 2)) {
$actualVersion = $theVersionArray[$i];
$version = $versionArray[$i];
last;
}
}
if( $operator eq '<' ){ return int($actualVersion) < int($version); }
if( $operator eq 'lt' ){ return int($actualVersion) < int($version); }
if( $operator eq '>' ){ return int($actualVersion) > int($version); }
if( $operator eq 'gt' ){ return int($actualVersion) > int($version); }
if( $operator eq '<=' ){ return int($actualVersion) <= int($version); }
if( $operator eq 'le' ){ return int($actualVersion) <= int($version); }
if( $operator eq '>=' ){ return int($actualVersion) >= int($version); }
if( $operator eq 'ge' ){ return int($actualVersion) >= int($version); }
if( $operator eq '==' ){ return int($actualVersion) == int($version); }
if( $operator eq 'eq' ){ return int($actualVersion) == int($version); }
if( $operator eq '!=' ){ return int($actualVersion) != int($version); }
if( $operator eq 'ne' ){ return int($actualVersion) != int($version); }
}
#!/bin/bash
# 4665091
cd "$3/System/Library/LaunchDaemons"
ls | sed 's,\.plist$,,g' | while read
do
if [ -e "${INSTALLER_TEMP}/${REPLY}.enabled" ] ; then
var=`defaults read "$3/System/Library/LaunchDaemons/${REPLY}" Disabled 2>/dev/null`
if [ "$var" == "1" ] ; then
"/usr/libexec/PlistBuddy" -c "Delete Disabled" "$3/System/Library/LaunchDaemons/${REPLY}.plist"
fi
fi
done
#!/bin/sh if [ -e "$3/usr/libexec/samba/smb-conf-upgrade" ] ; then cp "$3/etc/smb.conf" "$3/etc/smb.conf.old" # Merge the required config section from the new /etc/smb.conf.template # into /etc/smb.conf. "$3/usr/libexec/samba/smb-conf-upgrade" "$@" # If we upgraded from Tiger, the /etc/smb.conf.old will not have the # required config section delimited, so the uprade will fail. In this # case, we should simply restore the most recent correct config from # /etc/smb.conf.template. if [ "$?" != "0" -o ! -s "$3/etc/smb.conf" ] ; then cp "$3/etc/smb.conf.template" "$3/etc/smb.conf" fi if [ "$3" = "/" ] ; then # Attempt to make sure /var/run/smb.conf is present /usr/libexec/samba/synchronize-preferences fi cp "$3/var/run/smb.conf" "$3/var/db/smb.conf" fi exit 0
#!/bin/sh # 4724022 /usr/bin/touch "$3/System/Library/CoreServices/CoreTypes.bundle"
#!/bin/sh touch "$3/Library/Internet Plug-Ins/Flash Player.plugin"
#!/bin/sh touch "$3"/System/Library/PreferencePanes/Mac.prefPane
#!/bin/sh chmod 755 "$3"/Library/Security chown root:wheel "$3"/Library/Security pkgutil --learn "$3"/Library/Security
#!/bin/sh chmod 755 "$3/Library/Security/SecurityAgentPlugins" pkgutil --learn "$3/Library/Security/SecurityAgentPlugins" exit 0
#!/bin/sh launchctl load /System/Library/LaunchDaemons/com.apple.dyld.plist exit 0
#!/usr/bin/perl
$0 =~ m/.*\/(.*)$/;
my $stage = $1;
my $action = $ARGV[3];
my $wd = `pwd`;
chomp($wd);
my $actionsDir = $wd . "/" . 'postinstall' . "_actions/";
my $upgradeDir = $wd . "/" . 'postupgrade' . "_actions/";
my $upgrade = 0;
my $debug = 1;
my $count;
if ( $0 =~ /postupgrade/ || $0 =~ /preupgrade/ || $action =~ /upgrade/) {
system("logger -p install.info 'Upgrade scripts will be run.'") if ( $debug );
$upgrade = 1;
}
if ( $stage =~ /pre/ )
{
$actionsDir = $wd . "/" . 'preinstall' . "_actions/";
$upgradeDir = $wd . "/" . 'preupgrade' . "_actions/";
}
if ( $upgrade == 1 && -e $upgradeDir ) {
system("logger -p install.info 'Running Upgrade Scripts . . .'") if ( $debug );
$count = 0;
foreach my $action (`/bin/ls \"$upgradeDir\"`) {
chomp($action);
system("logger -p install.info 'Begin script: $action'") if ( $debug );
system($upgradeDir . $action, $ARGV[0], $ARGV[1], $ARGV[2], $ARGV[3]);
system("logger -p install.info 'End script: $action'") if ( $debug );
$count++;
}
system("logger -p install.info '$count Upgrade Scripts run.'") if ( $debug );
}
if ( -e $actionsDir ) {
system("logger -p install.info 'Running Install Scripts . . .'") if ( $debug );
$count = 0;
foreach my $action (`/bin/ls \"$actionsDir\"`) {
chomp($action);
system("logger -p install.info 'Begin script: $action'") if ( $debug );
system($actionsDir . $action, $ARGV[0], $ARGV[1], $ARGV[2], $ARGV[3],$upgrade);
system("logger -p install.info 'End script: $action'") if ( $debug );
$count++;
}
system("logger -p install.info '$count Install Scripts run.'") if ( $debug );
}
exit(0);
#!/bin/sh launchctl unload /System/Library/LaunchDaemons/com.apple.dyld.plist exit 0
#!/bin/sh
if [ "$3" == "/" ]; then
echo "Disabling ReportCrash"
launchctl unload "/System/Library/LaunchDaemons/com.apple.ReportCrash.plist"
if [ "$USER" != "root" ]; then
echo "Disabling ReportCrash (LaunchAgent)"
sudo -u $USER launchctl unload "/System/Library/LaunchAgents/com.apple.ReportCrash.plist"
fi
fi
exit 0
#!/bin/sh WASPATCH=`pkgutil --group-pkgs com.apple.pkg.update.patch | grep com.apple.pkg.update.os.10.5.1` [ "$WASPATCH" == "" ] && exit FILES="usr/libexec/load_hdi System/Library/PrivateFrameworks/DiskManagement.framework/Versions/A/Resources/DiskManagementTool System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/Resources/Locum System/Library/PrivateFrameworks/Install.framework/Versions/A/Resources/runner System/Library/PrivateFrameworks/Admin.framework/Versions/A/Resources/readconfig System/Library/PrivateFrameworks/Admin.framework/Versions/A/Resources/writeconfig usr/libexec/authopen System/Library/CoreServices/Finder.app/Contents/Resources/OwnerGroupTool" for file in $FILES do pkgutil --edit-pkg com.apple.pkg.update.os.10.5.1 --volume "$3" --learn "$3/$file" &>/dev/null done exit 0
#!/usr/bin/perl
if( -e "$3/Library/Internet Plug-Ins/Flash Player.plugin" )
{
if( CheckVersion("$3/Library/Internet Plug-Ins/Flash Player.plugin/Contents/Info.plist", "9.0.151", "CFBundleShortVersionString", ">") )
{
`mv "$3/Library/Internet Plug-Ins/Flash Player.plugin" "$3/Library/Internet Plug-Ins/Flash Player.plugin.BAK"`;
}
}
exit(0);
sub CheckVersion
{
my $path = $_[0];
my $version = $_[1];
my $keyName = $_[2];
my $operator = $_[3];
if (! -e $path) {
return 0;
}
if (!$operator) {
$operator = "==";
}
my $oldSeperator = $/;
$/ = \0;
open( PLIST, "$path") || do {
return 0;
};
$plistData = ;
$plistData =~ /(.*?)<\/dict>/gis;
@items = split(//, $plistData);
shift @items;
foreach $item (@items) {
$item =~ /(.*?)<\/key>.*?(.*?)<\/string>/gis;
$versiondata{ $1 } = $2;
}
close(PLIST);
$/ = $oldSeperator;
@theVersionArray = split(/\./, $versiondata{$keyName});
for ($i = 0; $i < 3; $i++) {
if(!$theVersionArray[$i]) {
$theVersionArray[$i] = '0';
}
}
@versionArray = split(/\./, $version);
my $actualVersion;
for ($i = 0; $i < 3; $i++) {
if (($theVersionArray[$i] != $versionArray[$i]) or ($i == 2)) {
$actualVersion = $theVersionArray[$i];
$version = $versionArray[$i];
last;
}
}
if( $operator eq '<' ){ return int($actualVersion) < int($version); }
if( $operator eq 'lt' ){ return int($actualVersion) < int($version); }
if( $operator eq '>' ){ return int($actualVersion) > int($version); }
if( $operator eq 'gt' ){ return int($actualVersion) > int($version); }
if( $operator eq '<=' ){ return int($actualVersion) <= int($version); }
if( $operator eq 'le' ){ return int($actualVersion) <= int($version); }
if( $operator eq '>=' ){ return int($actualVersion) >= int($version); }
if( $operator eq 'ge' ){ return int($actualVersion) >= int($version); }
if( $operator eq '==' ){ return int($actualVersion) == int($version); }
if( $operator eq 'eq' ){ return int($actualVersion) == int($version); }
if( $operator eq '!=' ){ return int($actualVersion) != int($version); }
if( $operator eq 'ne' ){ return int($actualVersion) != int($version); }
}
#!/usr/bin/perl
my $APP1 = "$ARGV[2]/Applications/Utilities/Java/Java SE 6/Java Cache Viewer.app";
my $APP2 = "$ARGV[2]/Applications/Utilities/Java/Java SE 6/Java Preferences.app";
my $TARGET = "\Q$ARGV[2]";
if (CheckVersion("$APP1/Contents/Info.plist", "11.6.0", "CFBundleShortVersionString", "<=")) {
system("rm", "-rf", $APP1);
}
if (CheckVersion("$APP2/Contents/Info.plist", "11.6.0", "CFBundleShortVersionString", "<=")) {
system("rm", "-rf", $APP2);
}
`rmdir $TARGET"/Applications/Utilities/Java/Java SE 6" &>/dev/null`;
my $INFO_PLIST = "$ARGV[2]/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Resources/Info.plist";
if (CheckVersion($INFO_PLIST, "12.0.0", "CFBundleShortVersionString", "<=")) {
system("rm", "-rf", "$ARGV[2]/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0");
system("rm", "$ARGV[2]/System/Library/Frameworks/JavaVM.framework/Versions/1.6");
}
`rm $TARGET/Users/*/Library/Caches/Java/deployment.properties &>/dev/null`;
exit 0;
sub CheckVersion
{
my $path = $_[0];
my $version = $_[1];
my $keyName = $_[2];
my $operator = $_[3];
my $i;
if (! -e $path) {
return 0;
}
if (!$operator) {
$operator = "==";
}
my $oldSeperator = $/;
$/ = \0;
open( PLIST, "$path") || do {
return 0;
};
my $plistData = ;
$plistData =~ /(.*?)<\/dict>/gis;
my @items = split(//, $plistData);
my %versiondata;
shift @items;
foreach my $item (@items) {
$item =~ /(.*?)<\/key>.*?(.*?)<\/string>/gis;
$versiondata{ $1 } = $2;
}
close(PLIST);
$/ = $oldSeperator;
my @theVersionArray = split(/\./, $versiondata{$keyName});
for ($i = 0; $i < 3; $i++) {
if(!$theVersionArray[$i]) {
$theVersionArray[$i] = '0';
}
}
my @versionArray = split(/\./, $version);
my $actualVersion;
for ($i = 0; $i < 3; $i++) {
if (($theVersionArray[$i] != $versionArray[$i]) or ($i == 2)) {
$actualVersion = $theVersionArray[$i];
$version = $versionArray[$i];
last;
}
}
if( $operator eq '<' ){ return int($actualVersion) < int($version); }
if( $operator eq 'lt' ){ return int($actualVersion) < int($version); }
if( $operator eq '>' ){ return int($actualVersion) > int($version); }
if( $operator eq 'gt' ){ return int($actualVersion) > int($version); }
if( $operator eq '<=' ){ return int($actualVersion) <= int($version); }
if( $operator eq 'le' ){ return int($actualVersion) <= int($version); }
if( $operator eq '>=' ){ return int($actualVersion) >= int($version); }
if( $operator eq 'ge' ){ return int($actualVersion) >= int($version); }
if( $operator eq '==' ){ return int($actualVersion) == int($version); }
if( $operator eq 'eq' ){ return int($actualVersion) == int($version); }
if( $operator eq '!=' ){ return int($actualVersion) != int($version); }
if( $operator eq 'ne' ){ return int($actualVersion) != int($version); }
}
#!/bin/sh
# 4665091
cd "$3/System/Library/LaunchDaemons"
ls | sed 's,\.plist$,,g' | while read
do
if [ -e "$3/System/Library/LaunchDaemons/${REPLY}.plist" ] ; then
var=`defaults read "$3/System/Library/LaunchDaemons/${REPLY}" Disabled 2>/dev/null`
if [ $? != 0 ] || [ "$var" == "0" ] ; then
/usr/bin/touch "${INSTALLER_TEMP}/${REPLY}.enabled"
fi
fi
done