Skip to content

Commit

Permalink
re-disable cloud init ssh root + shellcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
punoko committed Dec 23, 2023
1 parent de7f24b commit 5d149ac
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ SERVICES=(

# Cleanup
cleanup() {
if findmnt --mountpoint $MOUNT >/dev/null; then
umount --recursive $MOUNT
if findmnt --mountpoint "$MOUNT" >/dev/null; then
umount --recursive "$MOUNT"
fi
if [[ -n $LOOPDEV ]]; then
losetup --detach $LOOPDEV
losetup --detach "$LOOPDEV"
fi
rm -rf $MOUNT
rm -rf "$MOUNT"
}
trap cleanup ERR

Expand Down Expand Up @@ -126,12 +126,12 @@ options ${CMDLINE}
EOF

# https://systemd.io/BUILDING_IMAGES/
rm -f $MOUNT/etc/machine-id
rm -f $MOUNT/var/lib/systemd/random-seed
rm -f $MOUNT/$ESP_DIR/loader/random-seed
rm -f "$MOUNT/etc/machine-id"
rm -f "$MOUNT/var/lib/systemd/random-seed"
rm -f "$MOUNT/$ESP_DIR/loader/random-seed"

# Use systemd-repart to grow the root partition
mkdir $MOUNT/etc/repart.d
mkdir "$MOUNT/etc/repart.d"
cat <<EOF >"${MOUNT}/etc/repart.d/root.conf"
[Partition]
Type=root
Expand Down Expand Up @@ -195,9 +195,10 @@ system_info:
growpart:
mode: off
resize_rootfs: false
disable_root: false
ssh_deletekeys: false
ssh_genkeytypes:
ssh_genkeytypes: []
disable_root: true
disable_root_opts: "#"
EOF

# Neovim Symlinks
Expand Down

0 comments on commit 5d149ac

Please sign in to comment.