Skip to content

Commit a98f12e

Browse files
committed
tune: stop setting defaults with init modules
EC2 Mac images bake these values into the image now and existing systems will already have the settings applied even if updated to the new configuration file (assuming they've booted at least once, eg: to run a brew-update or equivalent). There isn't an inherent issue with configuring preferences at boot, however these particular settings for SoftwareUpdate are inconsistently persisting when applying at boot. These preferences are now set during image build time and persisted in the images, so init no longer needs to do the needful. Signed-off-by: Jacob Vallejo <jakeev@amazon.com>
1 parent f5802e7 commit a98f12e

1 file changed

Lines changed: 3 additions & 28 deletions

File tree

configuration/init.toml

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Default EC2 macOS Init init.toml config for mac1.metal instances
1+
# Default EC2 macOS Init init.toml config
22

33
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
44
#
@@ -36,7 +36,7 @@
3636
Cmd = ["/bin/zsh", "-c", "diskutil list internal physical | egrep -o '^/dev/disk\\d+' | xargs diskutil eject || true"]
3737

3838
### Group 2 ###
39-
## The only task in the first group is to make sure the network is up. Some of the subsequent actions require
39+
## The only task in this group is to make sure the network is up. Some of the subsequent actions require
4040
## a connection to IMDS and will fail if this check doesn't pass.
4141

4242
# Checks that the network is up
@@ -49,7 +49,7 @@
4949
PingCount = 3 # Three attempts
5050

5151
### Group 3 ###
52-
## The second group has many actions that can be run in parallel including:
52+
## This group has many actions that can be run in parallel including:
5353
## 1. Optimize kernel and networking parameters
5454
## 2. Disable auto-update
5555
## 3. Apply suggested SSHD security settings
@@ -86,31 +86,6 @@
8686
value = "net.inet.tcp.recvspace=1048576"
8787
[[Module.SystemConfig.Sysctl]]
8888
value = "net.link.generic.system.rcvq_maxlen=1024"
89-
[[Module.SystemConfig.Defaults]]
90-
plist = "/Library/Preferences/com.apple.SoftwareUpdate.plist"
91-
parameter = "AutomaticallyInstallMacOSUpdates"
92-
type = "bool"
93-
value = "false"
94-
[[Module.SystemConfig.Defaults]]
95-
plist = "/Library/Preferences/com.apple.SoftwareUpdate.plist"
96-
parameter = "AutomaticCheckEnabled"
97-
type = "bool"
98-
value = "false"
99-
[[Module.SystemConfig.Defaults]]
100-
plist = "/Library/Preferences/com.apple.SoftwareUpdate.plist"
101-
parameter = "AutomaticDownload"
102-
type = "bool"
103-
value = "false"
104-
[[Module.SystemConfig.Defaults]]
105-
plist = "/Library/Preferences/com.apple.SoftwareUpdate.plist"
106-
parameter = "CriticalUpdateInstall"
107-
type = "bool"
108-
value = "false"
109-
[[Module.SystemConfig.Defaults]]
110-
plist = "/Library/Preferences/com.apple.SoftwareUpdate.plist"
111-
parameter = "ConfigDataInstall"
112-
type = "bool"
113-
value = "false"
11489

11590
# Apply secure settings to SSHD on every boot
11691
# To manage ssh_config separately, disable this module

0 commit comments

Comments
 (0)