bug1873: formatting only

This commit is contained in:
Axel Uhl
2024-03-01 11:06:44 +01:00
parent f922927ea1
commit 41a02258d0
2 changed files with 10 additions and 8 deletions
@@ -1,10 +1,11 @@
#!/bin/bash
# Purpose: The first parameter is an image type. This script iterates over the image types' USER folders, concatenating all the symbolic
# links (referencing locations within configuration/crontabs) into one file for each user. It also takes the name of the user containing a copy of the git repo
# Purpose: The first parameter is an image type. This script iterates over the image types' USER folders,
# concatenating all the symbolic links (referencing locations within configuration/crontabs) into one crontab
# file for each user. It also takes the name of the user containing a copy of the git repo
# as well as the name of the dir within that user to go to. The created files for each user go into that user's
# home dir and are installed for that user too. Note: within these crontabs are certain regexes, which are replaced by the path to the git home dir and the matching
# user's home.
# home dir and are installed for that user too. Note: within these crontabs are certain regexes, which are
# replaced by the path to the git home dir and the matching user's home.
# Useful files are also copied across from the "files" dir within each image type.
if [[ $# -ne 3 && $# -ne 4 && $# -ne 5 ]]; then
@@ -37,6 +38,7 @@ if [[ -d "users" ]]; then
for dir in $(ls -d */ ); do
USERNAME=$(echo $dir | sed "s/\/$//") # Dirname is the username. The trailing slash is removed.
HOME_DIR=$(eval echo $(printf "~%q" "$USERNAME")) # The path to the home dir of the user whose cronjob will be installed.
# Clear the crontab file before assembling it from the snippets:
> $HOME_DIR/crontab
for crontab in $(ls ${USERNAME}/crontab*); do
cat "${crontab}">> $HOME_DIR/crontab
@@ -56,4 +58,4 @@ if [[ "$ONLY_CRONTAB" != "true" && -d "files" ]]; then
fi
systemctl daemon-reload
systemctl reenable $(find /etc/systemd/system/ -type f) # to recreate all the dependency links.
systemctl reenable $(find /etc/systemd/system/ -type f) # to recreate all the dependency links.
+3 -3
View File
@@ -1,7 +1,7 @@
#!/bin/bash
# Setup script for Amazon Linux 2. May need to update macro definitions for the archive IP.
# Parameter 1 is the IP and parameter 2 is the bearer token to be installed in the root home dir.
# Setup script for Amazon Linux 2. May need to update macro definitions for the archive IP.
# Parameter 1 is the IP and parameter 2 is the bearer token to be installed in the root home dir.
# Ensure that the security for requesting the metadata uses IMDSv1
IP=$1
BEARER_TOKEN=$2
@@ -64,4 +64,4 @@ systemctl start httpd
sudo systemctl start crond.service
systemctl enable imageupgrade.service
cd /
SECONDEOF
SECONDEOF