Skip to content

Commit

Permalink
PR review updates. Improved messages and modification of startup scri…
Browse files Browse the repository at this point in the history
…pts.
  • Loading branch information
cdunbar13 committed Oct 6, 2023
1 parent 7229902 commit 7bba5e9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
10 changes: 5 additions & 5 deletions modules/scripts/startup-script/files/running-script-warning.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@

WARNING=$(
cat <<EOF
** NOTICE **: Do not use this machine while the startup scripts are running.
Use the following command to check that the service is "inactive" before using
the system.
'systemctl status google-startup-scripts.service'
** NOTICE **: System services may not be running until startup scripts complete.
The output of the command below will end with "Finished Google Compute Engine
Startup Scripts." when they are complete. Please review the output for any
errors which may indicate that services are unhealthy.
sudo journalctl -b 0 -u google-startup-scripts.service
EOF
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,21 @@ readonly E_UNKNOWN_ARG=10
SUCCESS_MESSAGE=$(
cat <<-EOF
** NOTICE **: The VM startup scripts have finished running successfully.
It is now safe to start using the system.
Systems are configured and running.
EOF
)
readonly SUCCESS_MESSAGE
ERROR_MESSAGE=$(
cat <<-EOF
** ERROR **: The VM startup scripts have finished running, but produced an error.
Systems may be in an unhealthy state.
EOF
)
readonly ERROR_MESSAGE
WARNING_MESSAGE=$(
cat <<-EOF
** WARNING **: The VM startup scripts for this machine have not been completed
and system services may not be configured yet.
** WARNING **: The VM startup scripts for this machine have started.
Systems may not be configured or running.
EOF
)
readonly WARNING_MESSAGE
Expand Down
2 changes: 1 addition & 1 deletion modules/scripts/startup-script/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ locals {
{
type = "data"
content = file("${path.module}/files/running-script-warning.sh")
destination = "/etc/profile.d/20-running-script-warning.sh"
destination = "/etc/profile.d/99-running-script-warning.sh"
}
]

Expand Down

0 comments on commit 7bba5e9

Please sign in to comment.