IsraelTorres icon

remove-pgp-kext.sh

IsraelTorres | PRO | 03/21/12 12:56:28 AM UTC | 0 ⭐ | 405 👁️ | Never ⏰ | []
Bash |

1.93 KB

|

None

|

0 👍

/

0 👎

#!/bin/bash
# Israel Torres
# 2012-03-20
# https://plus.google.com/u/0/102921309581624765133/posts/bSJZtiVXBRE
# Mac OS X Lion 10.7.x with PGP Desktop Pro 10.2.x Kext fix on Filevaulted systems.
# also can be run after initial install to make sure this doesn't happen upon the next update!
# # manual:
# 1. Boot up using Command+R
# 2. Use Disk Utility and select the encrypted startup drive; you will be prompted to unlock the Disk.
# 3. Close Disk Utility and when taken back open the Utilities and Select Terminal.
# 4. Once in Terminal verify the offending kext (PGPwde.kext exists in the following path using ls)
# ls /Volumes/Macintosh\ HD/System/Library/Extensions/PGPwde.kext
# (it should return Contents)
# 5. Once verified create a temporary directory (if you don't outright want to delete it) like so: mkdir /Volumes/Macintosh\ HD\jnk
# 6. now move the kext to the ink (junk) directory like so:
# mv /Volumes/Macintosh\ HD/System/Library/Extensions/PGPwde.kext /Volumes/Macintosh\ HD/jnk
# 7. touch /System/Library/Extensions
# 8. Click the upper left Apple and restart.
# 9. You should now be able to login!!!! :D
# programmatic:
if [ $UID -eq 0 ]; then #SUDO check
    BAD_FILE='/Volumes/Macintosh HD/System/Library/Extensions/PGPwde.kext'
    FILENAME=$(basename "$BAD_FILE")
    KEXTPATH=$(dirname "$BAD_FILE")
    NEW_PATH='./jnk'
    if [ -e "$BAD_FILE" ]; then
        echo "$FILENAME file exists... proceeding with removal"
        mkdir ./jnk 2> /dev/null
        mv "$BAD_FILE" "$NEW_PATH"
        if [ $? = 0 ]; then #move check
            echo "$FILENAME moved to $NEW_PATH"
            chown -R "$SUDO_USER" "$NEW_PATH" #replace ownership to user
        else
            echo "$FILENAME remains; something went horribly wrong; call for help!"
        fi
        touch "$KEXTPATH"
    else
        echo "file does not exist"
    fi
else
    echo "warning: you need priviliges to run this: sudo ./remove-pgp-kext.sh"
    echo "bailing out!"
fi
#eof

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎