Remove obsolete bootstrap script and update example script for clarity</message>
<message>Delete the existing bootstrap.sh script used for cloud-init first boot, as it is no longer needed. Update the bootstrap.sh.example script to provide clearer instructions for users on how to customize and deploy their own bootstrap script, ensuring better guidance for cloud-init integration. These changes streamline the provisioning process and enhance user experience.
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
# ├── first-boot.sh ← cloud-init runcmd downloads this
|
||||
# ├── first-boot.conf ← cloud-init runcmd downloads this (required)
|
||||
# ├── first-boot.conf.example ← reference
|
||||
# ├── bootstrap.sh ← user-data.bootstrap downloads this (main path)
|
||||
# └── first-boot/ ← FILE_SERVER points here
|
||||
# ├── steps/
|
||||
# │ ├── 01-hostname.sh … 13-reboot.sh
|
||||
@@ -31,7 +32,7 @@ REMOTE_PORTAL="/var/lib/cm4-provisioning/portal-files"
|
||||
REMOTE_FIRST_BOOT="${REMOTE_PORTAL}/first-boot"
|
||||
|
||||
# Files we sync to the portal root (outside first-boot/)
|
||||
PORTAL_ROOT_FILES=(first-boot.sh first-boot.conf first-boot.conf.example)
|
||||
PORTAL_ROOT_FILES=(first-boot.sh first-boot.conf first-boot.conf.example bootstrap.sh)
|
||||
|
||||
# ── Validate local files ────────────────────────────────────────────────
|
||||
if [[ ! -d "$FILESERVER_DIR" ]]; then
|
||||
@@ -102,7 +103,7 @@ echo ""
|
||||
echo "── Checking for extra files in portal root ────────────────────"
|
||||
|
||||
REMOTE_FILES=$(ssh "$LXC" "find $REMOTE_PORTAL -maxdepth 1 -not -path $REMOTE_PORTAL -printf '%f\n' 2>/dev/null" | sort)
|
||||
EXPECTED_FILES=$(printf '%s\n' "${PORTAL_ROOT_FILES[@]}" "first-boot" | sort)
|
||||
EXPECTED_FILES=$(printf '%s\n' "${PORTAL_ROOT_FILES[@]}" "first-boot" | sort -u)
|
||||
EXTRA_FILES=$(comm -23 <(echo "$REMOTE_FILES") <(echo "$EXPECTED_FILES"))
|
||||
|
||||
if [[ -z "$EXTRA_FILES" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user