Skip to content

Commit

Permalink
Uploading scripts with fixed version checking.
Browse files Browse the repository at this point in the history
  • Loading branch information
rtrouton committed Jun 29, 2020
1 parent 356a625 commit 2e0d119
Show file tree
Hide file tree
Showing 65 changed files with 738 additions and 365 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
#!/bin/bash

osvers_major=$(/usr/bin/sw_vers -productVersion | awk -F. '{print $1}')
osvers_minor=$(/usr/bin/sw_vers -productVersion | awk -F. '{print $2}')
# Save current IFS state

OLDIFS=$IFS

IFS='.' read osvers_major osvers_minor osvers_dot_version <<< "$(/usr/bin/sw_vers -productVersion)"

# restore IFS to previous state

IFS=$OLDIFS


# Checks to see if the OS on the Mac is 10.x.x. If it is not, the
# following message is displayed without quotes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,16 @@ fi
# Check to see if the OS version of the Mac includes a version of the profiles tool which
# can report on user-approved MDM. If the OS check passes, run the UAMDMCheck function.

osvers_major=$(/usr/bin/sw_vers -productVersion | awk -F. '{print $1}')
osvers_minor=$(/usr/bin/sw_vers -productVersion | awk -F. '{print $2}')
# Save current IFS state

OLDIFS=$IFS

IFS='.' read osvers_major osvers_minor osvers_dot_version <<< "$(/usr/bin/sw_vers -productVersion)"

# restore IFS to previous state

IFS=$OLDIFS

osvers_dot_version=$(/usr/bin/sw_vers -productVersion | awk -F. '{print $3}')

if [[ ${osvers_major} -eq 10 ]] && [[ ${osvers_minor} -ge 14 ]]; then
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
#!/bin/bash

osvers_major=$(/usr/bin/sw_vers -productVersion | awk -F. '{print $1}')
osvers_minor=$(/usr/bin/sw_vers -productVersion | awk -F. '{print $2}')
# Save current IFS state

OLDIFS=$IFS

IFS='.' read osvers_major osvers_minor osvers_dot_version <<< "$(/usr/bin/sw_vers -productVersion)"

# restore IFS to previous state

IFS=$OLDIFS

osvers_dot_version=$(/usr/bin/sw_vers -productVersion | awk -F. '{print $3}')

IRKHashCheck(){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,16 @@

GatekeeperCheck(){

osvers_major=$(/usr/bin/sw_vers -productVersion | awk -F. '{print $1}')
osvers_minor=$(/usr/bin/sw_vers -productVersion | awk -F. '{print $2}')
# Save current IFS state

OLDIFS=$IFS

IFS='.' read osvers_major osvers_minor osvers_dot_version <<< "$(/usr/bin/sw_vers -productVersion)"

# restore IFS to previous state

IFS=$OLDIFS

osvers_dot_version=$(/usr/bin/sw_vers -productVersion | awk -F. '{print $3}')

if [[ ${osvers_major} -eq 10 && ${osvers_minor} -lt 7 ]] || [[ ${osvers_major} -eq 10 && ${osvers_minor} -eq 7 && ${osvers_dot_version} -lt 5 ]]; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,16 @@

XProtectCheck(){

osvers_major=$(/usr/bin/sw_vers -productVersion | awk -F. '{print $1}')
osvers_minor=$(/usr/bin/sw_vers -productVersion | awk -F. '{print $2}')
# Save current IFS state

OLDIFS=$IFS

IFS='.' read osvers_major osvers_minor osvers_dot_version <<< "$(/usr/bin/sw_vers -productVersion)"

# restore IFS to previous state

IFS=$OLDIFS


if [[ ${osvers_major} -eq 10 ]] && [[ ${osvers_minor} -lt 6 ]]; then

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@

# This script performs common tasks using to fix AD binding issues

# Determine OS version
osvers=$(sw_vers -productVersion | awk -F. '{print $2}')
# Save current IFS state

OLDIFS=$IFS

IFS='.' read osvers_major osvers_minor osvers_dot_version <<< "$(/usr/bin/sw_vers -productVersion)"

# restore IFS to previous state

IFS=$OLDIFS

# Set time server. The NTP server address is being
# passed to the script via Parameter 4.
Expand All @@ -16,10 +23,10 @@ timeserver="$4"

# Restart directory services

if [[ ${osvers} -ge 7 ]]; then
/usr/bin/killall opendirectoryd
else
if [[ ( ${osvers_major} -eq 10 && ${osvers_minor} -lt 7 ) ]]; then
/usr/bin/killall DirectoryService
else
/usr/bin/killall opendirectoryd
fi

# Sleep 30 seconds to allow time for the
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
#!/bin/bash

# Determine OS version
osvers=$(sw_vers -productVersion | awk -F. '{print $2}')
# Save current IFS state

OLDIFS=$IFS

IFS='.' read osvers_major osvers_minor osvers_dot_version <<< "$(/usr/bin/sw_vers -productVersion)"

# restore IFS to previous state

IFS=$OLDIFS

# Check /Library/Printers/Canon/CUPSPS2/Utilities/Canon CUPS PS Printer Utility.app/Contents/Info.plist
# for the CFBundleVersion key value. It should match the version of the installed drivers.
Expand All @@ -28,17 +36,15 @@ elif [[ ${installed_driver_int} -eq ${driver_version_int} ]]; then
echo "Canon PS $driver_version Print Drivers installed."
elif [[ ${installed_driver_int} -lt ${driver_version_int} ]]; then
echo "Canon PS $driver_version not found or drivers are not installed. Installing Canon PS $driver_version Print Drivers."
if [[ ${osvers} -lt 7 ]]; then
if [[ ( ${osvers_major} -eq 10 && ${osvers_minor} -lt 7 ) ]]; then

"$jamfHelper" -windowType utility -description "$description" -button1 "$button1" -icon "$icon" -timeout 10

fi

if [[ ${osvers} -ge 7 ]]; then
else

jamf displayMessage -message "$dialog"

fi
fi
jamf policy -event companycanondrivers
fi

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
#!/bin/bash

# Determine OS version
OSVERS=$(sw_vers -productVersion | awk -F. '{print $2}')
# Save current IFS state

OLDIFS=$IFS

IFS='.' read osvers_major osvers_minor osvers_dot_version <<< "$(/usr/bin/sw_vers -productVersion)"

# restore IFS to previous state

IFS=$OLDIFS


# Check /Library/Printers/Xerox/PDEs/XeroxFeatures.plugin for the CFBundleShortVersionString
# key value. It should match the version of the installed drivers.
Expand All @@ -12,7 +21,7 @@ button1="OK"
jamfHelper="/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper"
icon="/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertNoteIcon.icns"

if [[ ${OSVERS} -eq 5 ]]; then
if [[ ( ${osvers_major} -eq 10 && ${osvers_minor} -eq 5 ) ]]; then

# If the Mac is running 10.5.x, specify the current driver version
# by setting parameter 5 in the script on the JSS
Expand All @@ -33,7 +42,7 @@ if [[ ${OSVERS} -eq 5 ]]; then
fi
fi

if [[ ${OSVERS} -eq 6 ]]; then
if [[ ( ${osvers_major} -eq 10 && ${osvers_minor} -eq 6 ) ]]; then

# If the Mac is running 10.6.x, specify the current driver version
# by setting parameter 6 in the script on the JSS
Expand All @@ -54,7 +63,7 @@ if [[ ${OSVERS} -eq 6 ]]; then
fi
fi

if [[ ${OSVERS} -ge 7 ]]; then
if [[ ( ${osvers_major} -eq 10 && ${osvers_minor} -ge 7 ) ]]; then

# If the Mac is running 10.7.x or higher, specify the current driver version
# by setting parameter 7 in the script on the JSS
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
#!/bin/bash

# Determine OS version
osvers=$(sw_vers -productVersion | awk -F. '{print $2}')
# Save current IFS state

OLDIFS=$IFS

IFS='.' read osvers_major osvers_minor osvers_dot_version <<< "$(/usr/bin/sw_vers -productVersion)"

# restore IFS to previous state

IFS=$OLDIFS

dialog="Please quit all browsers now, as the installation of this software will fail if it detects a browser running. This installer is 4 GBs in size, so it it may take up to 30 minutes to download and install. Please be patient."
description=`echo "$dialog"`
button1="OK"
jamfHelper="/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper"
icon="/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertNoteIcon.icns"

if [[ ${osvers} -lt 7 ]]; then

"$jamfHelper" -windowType utility -description "$description" -button1 "$button1" -icon "$icon"
if [[ ( ${osvers_major} -eq 10 && ${osvers_minor} -lt 7 ) ]]; then

fi
"$jamfHelper" -windowType utility -description "$description" -button1 "$button1" -icon "$icon" -timeout 10

if [[ ${osvers} -ge 7 ]]; then
else

jamf displayMessage -message "$dialog"
jamf displayMessage -message "$dialog"

fi

Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
#!/bin/bash

# Determine OS version
osvers=$(sw_vers -productVersion | awk -F. '{print $2}')
# Save current IFS state

OLDIFS=$IFS

IFS='.' read osvers_major osvers_minor osvers_dot_version <<< "$(/usr/bin/sw_vers -productVersion)"

# restore IFS to previous state

IFS=$OLDIFS

dialog="Please quit all browsers now, as the installation of this software will fail if it detects a browser running. This installer is 3 GBs in size, so it it may take up to 30 minutes to download and install. Please be patient."
description=`echo "$dialog"`
button1="OK"
jamfHelper="/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper"
icon="/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertNoteIcon.icns"

if [[ ${osvers} -lt 7 ]]; then

"$jamfHelper" -windowType utility -description "$description" -button1 "$button1" -icon "$icon"
if [[ ( ${osvers_major} -eq 10 && ${osvers_minor} -lt 7 ) ]]; then

fi
"$jamfHelper" -windowType utility -description "$description" -button1 "$button1" -icon "$icon" -timeout 10

if [[ ${osvers} -ge 7 ]]; then
else

jamf displayMessage -message "$dialog"
jamf displayMessage -message "$dialog"

fi

Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
#!/bin/bash

# Determine OS version
osvers=$(sw_vers -productVersion | awk -F. '{print $2}')
# Save current IFS state

OLDIFS=$IFS

IFS='.' read osvers_major osvers_minor osvers_dot_version <<< "$(/usr/bin/sw_vers -productVersion)"

# restore IFS to previous state

IFS=$OLDIFS

dialog="Please quit all browsers now, as the installation of this software will fail if it detects the Flash internet plug-in running. This installer is 4 GBs in size, so it it may take up to 30 minutes to download and install. Please be patient."
description=`echo "$dialog"`
button1="OK"
jamfHelper="/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper"
icon="/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertNoteIcon.icns"

if [[ ${osvers} -lt 7 ]]; then

"$jamfHelper" -windowType utility -description "$description" -button1 "$button1" -icon "$icon"
if [[ ( ${osvers_major} -eq 10 && ${osvers_minor} -lt 7 ) ]]; then

fi
"$jamfHelper" -windowType utility -description "$description" -button1 "$button1" -icon "$icon" -timeout 10

if [[ ${osvers} -ge 7 ]]; then
else

jamf displayMessage -message "$dialog"
jamf displayMessage -message "$dialog"

fi

Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
#!/bin/bash

# Determine OS version
osvers=$(sw_vers -productVersion | awk -F. '{print $2}')
# Save current IFS state

OLDIFS=$IFS

IFS='.' read osvers_major osvers_minor osvers_dot_version <<< "$(/usr/bin/sw_vers -productVersion)"

# restore IFS to previous state

IFS=$OLDIFS

dialog="This installer is 3 GBs in size, so it may take up to 30 minutes to download and install. Please be patient."
description=`echo "$dialog"`
button1="OK"
jamfHelper="/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper"
icon="/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertNoteIcon.icns"

if [[ ${osvers} -lt 7 ]]; then

"$jamfHelper" -windowType utility -description "$description" -button1 "$button1" -icon "$icon"
if [[ ( ${osvers_major} -eq 10 && ${osvers_minor} -lt 7 ) ]]; then

fi
"$jamfHelper" -windowType utility -description "$description" -button1 "$button1" -icon "$icon" -timeout 10

if [[ ${osvers} -ge 7 ]]; then
else

jamf displayMessage -message "$dialog"
jamf displayMessage -message "$dialog"

fi

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
#!/bin/bash

# Determine OS version
osvers=$(sw_vers -productVersion | awk -F. '{print $2}')
# Save current IFS state

OLDIFS=$IFS

IFS='.' read osvers_major osvers_minor osvers_dot_version <<< "$(/usr/bin/sw_vers -productVersion)"

# restore IFS to previous state

IFS=$OLDIFS

dialog="This installer is 3 GBs in size, so it may take up to 30 minutes to download and install. Please be patient."
description=`echo "$dialog"`
Expand All @@ -10,15 +18,13 @@ jamfHelper="/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/
icon="/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertNoteIcon.icns"


if [[ ${osvers} -lt 7 ]]; then

"$jamfHelper" -windowType utility -description "$description" -button1 "$button1" -icon "$icon"
if [[ ( ${osvers_major} -eq 10 && ${osvers_minor} -lt 7 ) ]]; then

fi
"$jamfHelper" -windowType utility -description "$description" -button1 "$button1" -icon "$icon" -timeout 10

if [[ ${osvers} -ge 7 ]]; then
else

jamf displayMessage -message "$dialog"
jamf displayMessage -message "$dialog"

fi

Expand Down
Loading

0 comments on commit 2e0d119

Please sign in to comment.