-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbenchmark_section_1.sh
61 lines (56 loc) · 3.05 KB
/
benchmark_section_1.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
# Section 1.1: Check for software updates
echo "Section 1.1: Check for software updates"
echo "------------------------------------------------------------------------"
echo "Find a list of software with available updates"
echo "Output:"
softwareupdate --list
echo "\nNotes:"
echo "Use the following command to update any software:"
echo "\"sudo softwareupdate -i <packagename>\""
echo "------------------------------------------------------------------------"
echo "\n"
# Section 1.2: Enable auto-update
echo "Section 1.2: Enabling auto-update"
echo "------------------------------------------------------------------------"
echo "Check that the system will automatically check for updates."
echo "Output:"
defaults read /Library/Preferences/com.apple.SoftwareUpdate AutomaticCheckEnabled
echo "\nNotes:"
echo "Result should be 1. If output does not match use the following command:"
echo "\"sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate AutomaticCheckEnabled -int 1\""
echo "------------------------------------------------------------------------"
echo "\n"
# Section 1.3: Enable app update installs
echo "Section 1.3: Enabling app update installs"
echo "------------------------------------------------------------------------"
echo "Check that app updates are installed when they are available."
echo "Output:"
defaults read /Library/Preferences/com.apple.commerce AutoUpdate
echo "\nNotes:"
echo "Result should be 1. If output does not match use the following command:"
echo "\"sudo defaults write /Library/Preferences/com.apple.commerce AutoUpdate -bool TRUE\""
echo "(Note: Log out and log back in before changes will be seen in GUI.)"
echo "------------------------------------------------------------------------"
echo "\n"
# Section 1.4:Enable system data files and security update installs
echo "Section 1.4: Enable software updates for system data files."
echo "------------------------------------------------------------------------"
echo "Output:"
defaults read /Library/Preferences/com.apple.SoftwareUpdate | egrep '(ConfigDataInstall|CriticalUpdateInstall)'
echo "\nNotes:"
echo "Results should be 1. If output does not match use the following command:"
echo "\"sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate ConfigDataInstall -bool true && sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate CriticalUpdateInstall -bool true\""
echo "------------------------------------------------------------------------"
echo "\n"
# Section 1.5: Enable OS X update installs
echo "Section 1.5: Enable OS X update installs"
echo "------------------------------------------------------------------------"
echo "Check that OS X updates are automatically installed."
echo "Output:"
defaults read /Library/Preferences/com.apple.commerce AutoUpdateRestartRequired
echo "\nNotes:"
echo "Results should be 1. If output does not match use the following command:"
echo "\"sudo defaults write /Library/Preferences/com.apple.commerce AutoUpdateRestartRequired -bool TRUE\""
echo "------------------------------------------------------------------------"
echo "\n"