mirror of
https://github.com/actions/runner-images.git
synced 2025-12-17 23:28:57 +00:00
Add permissions and run configure-machine.sh without sudo (#5789)
This commit is contained in:
committed by
GitHub
parent
02b78d07f4
commit
03d3125c20
@@ -87,6 +87,7 @@ EOF
|
||||
sleep 10
|
||||
done
|
||||
|
||||
echo "Getting terminal windows"
|
||||
term_service=$(launchctl list | grep -i terminal | cut -f3)
|
||||
echo "Close terminal windows: gui/501/${term_service}"
|
||||
launchctl bootout gui/501/${term_service} && sleep 5
|
||||
|
||||
@@ -44,6 +44,7 @@ userValuesArray=(
|
||||
"'kTCCServiceUbiquity','com.apple.PassKitCore',0,2,5,1,NULL,NULL,NULL,'UNUSED',NULL,0,1619516250"
|
||||
"'kTCCServiceAppleEvents','/Library/Application Support/Veertu/Anka/addons/ankarund',1,2,3,1,X'fade0c00000000ac0000000100000006000000020000001e636f6d2e7665657274752e616e6b612e6164646f6e732e616e6b6172756e0000000000060000000f000000060000000e000000010000000a2a864886f76364060206000000000000000000060000000e000000000000000a2a864886f7636406010d0000000000000000000b000000000000000a7375626a6563742e4f550000000000010000000a545439464157503656340000',NULL,0,'com.apple.finder',X'fade0c000000002c00000001000000060000000200000010636f6d2e6170706c652e66696e64657200000003',NULL,1629294900"
|
||||
"'kTCCServiceAppleEvents','/Library/Application Support/Veertu/Anka/addons/ankarund',1,2,3,1,X'fade0c00000000ac0000000100000006000000020000001e636f6d2e7665657274752e616e6b612e6164646f6e732e616e6b6172756e0000000000060000000f000000060000000e000000010000000a2a864886f76364060206000000000000000000060000000e000000000000000a2a864886f7636406010d0000000000000000000b000000000000000a7375626a6563742e4f550000000000010000000a545439464157503656340000',NULL,0,'com.apple.systemevents',X'fade0c000000003400000001000000060000000200000016636f6d2e6170706c652e73797374656d6576656e7473000000000003',NULL,164456761"
|
||||
"'kTCCServiceAppleEvents','/Library/Application Support/Veertu/Anka/addons/ankarund',1,2,3,1,X'fade0c00000000ac0000000100000006000000020000001e636f6d2e7665657274752e616e6b612e6164646f6e732e616e6b6172756e0000000000060000000f000000060000000e000000010000000a2a864886f76364060206000000000000000000060000000e000000000000000a2a864886f7636406010d0000000000000000000b000000000000000a7375626a6563742e4f550000000000010000000a545439464157503656340000',NULL,0,'com.apple.Terminal',X'fade0c000000003000000001000000060000000200000012636f6d2e6170706c652e5465726d696e616c000000000003',NULL,1655808179"
|
||||
"'kTCCServiceAppleEvents','/usr/libexec/sshd-keygen-wrapper',1,2,3,1,X'fade0c000000003c0000000100000006000000020000001d636f6d2e6170706c652e737368642d6b657967656e2d7772617070657200000000000003',NULL,0,'com.apple.Terminal',X'fade0c000000003000000001000000060000000200000012636f6d2e6170706c652e5465726d696e616c000000000003',NULL,1650386089"
|
||||
)
|
||||
for values in "${userValuesArray[@]}"; do
|
||||
|
||||
@@ -123,17 +123,24 @@ build {
|
||||
"./provision/configuration/ntpconf.sh",
|
||||
"./provision/configuration/max-files.sh",
|
||||
"./provision/configuration/shell-change.sh",
|
||||
]
|
||||
environment_vars = [
|
||||
"PASSWORD=${var.vm_password}",
|
||||
"USERNAME=${var.vm_username}"
|
||||
]
|
||||
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; sudo {{ .Vars }} {{ .Path }}"
|
||||
}
|
||||
provisioner "shell" {
|
||||
scripts = [
|
||||
"./provision/configuration/preimagedata.sh",
|
||||
"./provision/configuration/configure-ssh.sh",
|
||||
"./provision/configuration/configure-machine.sh"
|
||||
]
|
||||
environment_vars = [
|
||||
"IMAGE_VERSION=${var.build_id}",
|
||||
"IMAGE_OS=${var.image_os}",
|
||||
"PASSWORD=${var.vm_password}",
|
||||
"USERNAME=${var.vm_username}"
|
||||
"IMAGE_OS=${var.image_os}"
|
||||
]
|
||||
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; sudo {{ .Vars }} {{ .Path }}"
|
||||
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
|
||||
}
|
||||
provisioner "shell" {
|
||||
script = "./provision/core/reboot.sh"
|
||||
|
||||
@@ -122,7 +122,16 @@ build {
|
||||
"./provision/configuration/screensaver-off.sh",
|
||||
"./provision/configuration/ntpconf.sh",
|
||||
"./provision/configuration/max-files.sh",
|
||||
"./provision/configuration/shell-change.sh",
|
||||
"./provision/configuration/shell-change.sh"
|
||||
]
|
||||
environment_vars = [
|
||||
"PASSWORD=${var.vm_password}",
|
||||
"USERNAME=${var.vm_username}"
|
||||
]
|
||||
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; sudo {{ .Vars }} {{ .Path }}"
|
||||
}
|
||||
provisioner "shell" {
|
||||
scripts = [
|
||||
"./provision/configuration/preimagedata.sh",
|
||||
"./provision/configuration/configure-ssh.sh",
|
||||
"./provision/configuration/configure-machine.sh"
|
||||
@@ -130,10 +139,9 @@ build {
|
||||
environment_vars = [
|
||||
"IMAGE_VERSION=${var.build_id}",
|
||||
"IMAGE_OS=${var.image_os}",
|
||||
"PASSWORD=${var.vm_password}",
|
||||
"USERNAME=${var.vm_username}"
|
||||
"PASSWORD=${var.vm_password}"
|
||||
]
|
||||
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; sudo {{ .Vars }} {{ .Path }}"
|
||||
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
|
||||
}
|
||||
provisioner "shell" {
|
||||
script = "./provision/core/reboot.sh"
|
||||
|
||||
Reference in New Issue
Block a user