Sonntag, 7. Juni 2015

Mac OS X 10.10 (Yosemite) - Mac Pro 1.1 - Repair recovery partition automatized

Heyyo Dudes,
i automized a script to repair the recovery partition
- done it several times on a mac pro 1,1
- so i had no lust to do it over and over again after every update per hand.
can someone try the script out to confirm that it works well?
the only thing what made me concerns are the permissions.
maybe somone can proof them before and after execution.

Warning:
Please proof with 'diskutil list' if the script is executed on the right partition.

#!/bin/bash
sudo su
diskutil mount /dev/disk0s3
cd /Volumes/Recovery\ HD/com.apple.recovery.boot/
/usr/libexec/PlistBuddy -c "Add :SupportedBoardIds: string 'Mac-F4208DC8'" PlatformSupport.plist
/usr/libexec/PlistBuddy -c "Add :SupportedBoardIds: string 'Mac-F4208DA9'" PlatformSupport.plist
/usr/libexec/PlistBuddy -c "Add :SupportedModelProperties: string 'MacPro1,1'" PlatformSupport.plist
/usr/libexec/PlistBuddy -c "Add :SupportedModelProperties: string 'MacPro2,1'" PlatformSupport.plist
hdiutil convert BaseSystem.dmg -format UDRW -o ~/Downloads/BaseSystemUDRW.dmg
cd ~/Downloads
chmod 777 BaseSystemUDRW.dmg
hdiutil attach -readwrite BaseSystemUDRW.dmg
# Piker-Alpha_bootloader_-_black_-_build_3b402a9
curl -o piker.zip 'http://forums.macrumors.com/attachments/boot-black-zip.511172/'
unzip piker.zip
chmod 644 boot.efi
cd /Volumes/OS\ X\ Base\ System/
rm -rf /System/Library/CoreServices/boot.efi
rm -rf /usr/standalone/i386/boot.efi
cp ~/Downloads/boot.efi /System/Library/CoreServices/
cp ~/Downloads/boot.efi /usr/standalone/i386/
cd /Volumes/OS\ X\ Base\ System/System/Library/CoreServices/
/usr/libexec/PlistBuddy -c "Add :SupportedBoardIds: string 'Mac-F4208DC8'" PlatformSupport.plist
/usr/libexec/PlistBuddy -c "Add :SupportedBoardIds: string 'Mac-F4208DA9'" PlatformSupport.plist
/usr/libexec/PlistBuddy -c "Add :SupportedModelProperties: string 'MacPro1,1'" PlatformSupport.plist
/usr/libexec/PlistBuddy -c "Add :SupportedModelProperties: string 'MacPro2,1'" PlatformSupport.plist
cd /Volumes/OS\ X\ Base\ System/System/Library/CoreServices/com.apple.recovery.boot/
/usr/libexec/PlistBuddy -c "Add :SupportedBoardIds: string 'Mac-F4208DC8'" PlatformSupport.plist
/usr/libexec/PlistBuddy -c "Add :SupportedBoardIds: string 'Mac-F4208DA9'" PlatformSupport.plist
/usr/libexec/PlistBuddy -c "Add :SupportedModelProperties: string 'MacPro1,1'" PlatformSupport.plist
/usr/libexec/PlistBuddy -c "Add :SupportedModelProperties: string 'MacPro2,1'" PlatformSupport.plist
hdiutil convert ~/Downloads/BaseSystemUDZW.dmg -format UDZO -imagekey zlib-level=9 -o BaseSystem.dmg
cd /Volumes/Recovery\ HD/com.apple.recovery.boot/
rm -rf boot.efi
rm -rf BaseSystem.dmg
cp ~/Downloads/boot.efi /
cp ~/Downloads/BaseSystem.dmg /
chflags uchg boot.efi

add execution permission in terminal to the script:
chmod +x repairrecovery.command
Execute it with doubleclick.

macrumors.com

Mac OS X 10.6 (Snow Leopard) - Teamviewer - Wartungsskript

Hey Leute,
supporte zur Zeit öfters Mac OS X Maschinen over Teamviewer -
leider war die support experience für den Arsch...

Das Dock (vergrößern, verschwinden...)
sowie der Finder (Minimiereffekte...)
sind ja mit zahlreichen Effekten versehen -

das führte bei mir immer wieder zu Missclicks
- ein flüssiges Arbeiten war kaum möglich.

Deshalb dachte ich mir - bastel dir ein Script:

#!/bin/bash
#User Script
defaults -currentHost write com.apple.screensaver idleTime 480
defaults write com.apple.Dock mineffect suck
defaults write com.apple.dock autohide -bool true
defaults write com.apple.Dock orientation -string right
defaults write com.apple.dock magnification -bool true
killall Dock
defaults write com.apple.finder AppleShowAllFiles FALSE
killall Finder
killall Terminal
killall TextEdit
apply "; exit"

#!/bin/bash
#Maintenance Script
defaults -currentHost write com.apple.screensaver idleTime 0
defaults write com.apple.Dock mineffect scale
defaults write com.apple.Dock orientation -string bottom
defaults write com.apple.dock magnification -bool false
defaults write com.apple.dock autohide -bool false
killall Dock
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder
open -a TextEdit

Das User Script müsst ihr natürlich entsprechend anpassen.