Skip to content

Instantly share code, notes, and snippets.


keeleysam/ Secret

Created Mar 13, 2013
What would you like to do?
# $1 has the path to the source package
# $2 has the path to the target folder
# $3 has the path to the target volume
# $USER has the name of the user who launched the installer
echo ". . . . . running the postflight script . . . . ."
echo " source path is: $1"
echo " target path is: $2"
echo " target volume path is: $3"
export LCC36P=`dirname "$1"`
echo " path to tools is: $LCC36P"
if [ -f "/tmp/LGT_region.plist" ]; then
echo " User has already chosen keyboard, exiting"
exit 0
echo " User has not chosen keyboard yet"
if [ -f "$LCC36P/" ]; then
/usr/bin/sudo -u $USER "$LCC36P/"
if [ -e "$LCC36P/LCC Uninstaller Tool" ] ; then
"$LCC36P/LCC Uninstaller Tool" --preinstall
# "$1/Contents/Resources/RMover" "$1" --preflight
echo "try to run RMover from Scripts"
# "$1/logitechControlCenter.pkg/Scripts/RMover" "$1" --preflight
"$LCC36P/RMover" "$LCC36P" --preflight
# enforce permissions
if [ -e "/System/Library/Extensions/LogitechHIDDevices.kext" ] ; then
/usr/sbin/chown -R root:wheel "/System/Library/Extensions/LogitechHIDDevices.kext"
/bin/chmod -R ug+r,go-w "/System/Library/Extensions/LogitechHIDDevices.kext"
elif [ -e "/System/Library/Extensions/LogicoolHIDDevices.kext" ] ; then
/usr/sbin/chown -R root:wheel "/System/Library/Extensions/LogicoolHIDDevices.kext"
/bin/chmod -R ug+r,go-w "/System/Library/Extensions/LogicoolHIDDevices.kext"
echo "pausing for 3 seconds"
sleep 3
if [ -f "/tmp/LGT_region.plist" ]; then
echo "Check2: found keyboard flag file"
echo "Check2: keyboard flag file not found"
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.