Index: branches/iFabio/trunk/package/Scripts/Standard/postflight =================================================================== --- branches/iFabio/trunk/package/Scripts/Standard/postflight (revision 190) +++ branches/iFabio/trunk/package/Scripts/Standard/postflight (revision 191) @@ -1,32 +0,0 @@ -#!/usr/bin/perl - -$destino = $ARGV[1]; -$destino =~ s/ /\\ /g; -$volume = $ARGV[2]; -my %mapa; - -open (MOUNT, "mount|"); -while () { - chomp; - $line = $_; - if ($line =~ /^([^ ]+) on ([^(]+) \([^)]*\)$/) { - $mapa{$2}=$1; - } -} -close (MOUNT); - -if ($mapa{$volume}) { - if ($mapa{$volume} =~ /^\/dev\/(disk\d)s(\d)$/) { - $disk = $1; - $partition = $2; - $volume =~ s/ /\\ /g; - system ($destino."/fdisk440 -f ".$destino."/boot0 -u -y /dev/r".$disk); - system ("dd if=".$destino."/boot1h of=/dev/r".$disk."s".$partition); - system ("cp ".$destino."/boot ".$volume); - open (PIPE, "|fdisk -e /dev/".$disk."|"); - print PIPE "f ".$partition."\n"; - print PIPE "write\n"; - print PIPE "y\n"; - print PIPE "exit\n"; - } -} \ No newline at end of file Index: branches/iFabio/trunk/package/Scripts/Standard/preflight =================================================================== --- branches/iFabio/trunk/package/Scripts/Standard/preflight (revision 190) +++ branches/iFabio/trunk/package/Scripts/Standard/preflight (revision 191) @@ -1,46 +0,0 @@ -#!/bin/bash - -# $3 is the installation volume passed from the installer. -# It DOES NOT contain the trailing slash -# /Volume/xxxx -if [ "$3" == "/" ]; then -# If installing to root (/) don't add extra slash (//) -# Always refer to files as ${targetVol}usr/sbin/... no slash after end curly brace - targetVol="$3" -else -# If installing to (/Volumes/xxxx) add extra slash (/Volumes/xxxx/) -# Always refer to files as ${targetVol}usr/sbin/... no slash after end curly brace - targetVol="$3/" -fi -backupDirExtension=`date '+%Y%m%d-%H%M%S'` -backupDir="${targetVol}ChameleonInstallerBackup.${backupDirExtension}/" -echo "${backupDirExtension}" > "${targetVol}ChameleonInstallerBackup.txt" - -mkdir "${backupDir}" - -# backup directory has extension .YYYYMMDD-HHMMSS year month day-hour minute second -if [ -e "${targetVol}usr/sbin/fdisk" ] ; then - mkdir -p "${backupDir}usr/sbin" - cp -fp "${targetVol}usr/sbin/fdisk" "${backupDir}usr/sbin/fdisk" -fi - -if [ -d "${targetVol}usr/standalone/i386" ] ; then - mkdir -p "${backupDir}usr/standalone/i386" - cp -Rfp "${targetVol}usr/standalone/i386" "${backupDir}usr/standalone" -fi - -if [ -d "${targetVol}Extra" ] ; then - mkdir -p "${backupDir}Extra" -# cp -Rfp "${targetVol}Extra" "${backupDir}" -# Use a move to avoid possibility of mixing incompatible files. - mv -f "${targetVol}Extra" "${backupDir}" -fi - - -if [ -e "${targetVol}boot" ] ; then - cp -fp "${targetVol}boot" "${backupDir}boot" -fi - -chown -R 0:0 "${backupDir}" - -exit 0 Index: branches/iFabio/trunk/package/Scripts/Standardhfs/postflight =================================================================== --- branches/iFabio/trunk/package/Scripts/Standardhfs/postflight (revision 190) +++ branches/iFabio/trunk/package/Scripts/Standardhfs/postflight (revision 191) @@ -1,27 +0,0 @@ -#!/usr/bin/perl - -$destino = $ARGV[1]; -$destino =~ s/ /\\ /g; -$volume = $ARGV[2]; -my %mapa; - -open (MOUNT, "mount|"); -while () { - chomp; - $line = $_; - if ($line =~ /^([^ ]+) on ([^(]+) \([^)]*\)$/) { - $mapa{$2}=$1; - } -} -close (MOUNT); - -if ($mapa{$volume}) { - if ($mapa{$volume} =~ /^\/dev\/(disk\d)s(\d)$/) { - $disk = $1; - $partition = $2; - $volume =~ s/ /\\ /g; - system ($destino."/fdisk440 -f ".$destino."/boot0hfs -u -y /dev/r".$disk); - system ("dd if=".$destino."/boot1h of=/dev/r".$disk."s".$partition); - system ("cp ".$destino."/boot ".$volume); - } -} \ No newline at end of file Index: branches/iFabio/trunk/package/Scripts/Standardhfs/preflight =================================================================== --- branches/iFabio/trunk/package/Scripts/Standardhfs/preflight (revision 190) +++ branches/iFabio/trunk/package/Scripts/Standardhfs/preflight (revision 191) @@ -1,46 +0,0 @@ -#!/bin/bash - -# $3 is the installation volume passed from the installer. -# It DOES NOT contain the trailing slash -# /Volume/xxxx -if [ "$3" == "/" ]; then -# If installing to root (/) don't add extra slash (//) -# Always refer to files as ${targetVol}usr/sbin/... no slash after end curly brace - targetVol="$3" -else -# If installing to (/Volumes/xxxx) add extra slash (/Volumes/xxxx/) -# Always refer to files as ${targetVol}usr/sbin/... no slash after end curly brace - targetVol="$3/" -fi -backupDirExtension=`date '+%Y%m%d-%H%M%S'` -backupDir="${targetVol}ChameleonInstallerBackup.${backupDirExtension}/" -echo "${backupDirExtension}" > "${targetVol}ChameleonInstallerBackup.txt" - -mkdir "${backupDir}" - -# backup directory has extension .YYYYMMDD-HHMMSS year month day-hour minute second -if [ -e "${targetVol}usr/sbin/fdisk" ] ; then - mkdir -p "${backupDir}usr/sbin" - cp -fp "${targetVol}usr/sbin/fdisk" "${backupDir}usr/sbin/fdisk" -fi - -if [ -d "${targetVol}usr/standalone/i386" ] ; then - mkdir -p "${backupDir}usr/standalone/i386" - cp -Rfp "${targetVol}usr/standalone/i386" "${backupDir}usr/standalone" -fi - -if [ -d "${targetVol}Extra" ] ; then - mkdir -p "${backupDir}Extra" -# cp -Rfp "${targetVol}Extra" "${backupDir}" -# Use a move to avoid possibility of mixing incompatible files. - mv -f "${targetVol}Extra" "${backupDir}" -fi - - -if [ -e "${targetVol}boot" ] ; then - cp -fp "${targetVol}boot" "${backupDir}boot" -fi - -chown -R 0:0 "${backupDir}" - -exit 0 Index: branches/iFabio/trunk/package/Scripts/Post/postinstall =================================================================== --- branches/iFabio/trunk/package/Scripts/Post/postinstall (revision 190) +++ branches/iFabio/trunk/package/Scripts/Post/postinstall (revision 191) @@ -1,57 +0,0 @@ -#!/bin/bash - -# $3 is the installation volume passed from the installer. -# It DOES NOT contain the trailing slash -# /Volume/xxxx -if [ "$3" == "/" ]; then -# If installing to root (/) don't add extra slash (//) -# Always refer to files as ${targetVol}usr/sbin/... no slash after end curly brace - targetVol="$3" -else -# If installing to (/Volumes/xxxx) add extra slash (/Volumes/xxxx/) -# Always refer to files as ${targetVol}usr/sbin/... no slash after end curly brace - targetVol="$3/" - -#source com.apple.boot.plist -if ! [ -f "${2}/Extra/com.apple.Boot.plist" ]; then - if [ -f "${2}/Library/Preferences/SystemConfiguration/com.apple.Boot.plist" ]; then - cp -f "${2}/Library/Preferences/SystemConfiguration/com.apple.Boot.plist" "${2}/Extra" - fi -fi - -sleep 2 - -ls -ld "${targetVol}." | grep "unknown" -if [ $? -eq 0 ] ; then - chown 0:0 "${targetVol}." -fi - -ls -ld "${targetVol}.Spotlight-V100" | grep "unknown" -if [ $? -eq 0 ] ; then - chown -R 0:0 "${targetVol}.Spotlight-V100" -fi - -ls -ld "${targetVol}.Trashes" | grep "unknown" -if [ $? -eq 0 ] ; then - chown -R 0:0 "${targetVol}.Trashes" -fi - -ls -ld "${targetVol}.fseventsd" | grep "unknown" -if [ $? -eq 0 ] ; then - chown -R 0:0 "${targetVol}.fseventsd" -fi - -# Rebuild mkext -echo "Rebuilding /Extra/Extensions.mkext" -echo "Executing \"${targetVol}usr/sbin/kextcache\" -m \"${targetVol}Extra/Extensions.mkext\" \"${targetVol}Extra/Extensions\"" -"${targetVol}usr/sbin/kextcache" -m "${targetVol}Extra/Extensions.mkext" "${targetVol}Extra/Extensions" -#kextcache -m "${targetVol}Extra/Extensions.mkext" "${targetVol}Extra/Extensions" - -#mv -f "${targetVol}Extra/Extensions.mkext" "${targetVol}Extra" -echo "Fixing permissions on /Extra/Extensions.mkext" -echo "Executing chown 0:0 \"${targetVol}Extra/Extensions.mkext\"" -chown 0:0 "${targetVol}Extra/Extensions.mkext" -echo "Executing chmod 0644 \"${targetVol}Extra/Extensions.mkext\"" -chmod 0644 "${targetVol}Extra/Extensions.mkext" - -exit 0