mirror of
https://github.com/kairos-io/osbuilder.git
synced 2025-08-31 06:35:23 +00:00
Create cloud-config dir when preparing ARM, add default config
This commit is contained in:
@@ -71,5 +71,7 @@ COPY ./add-cloud-init.sh /add-cloud-init.sh
|
||||
COPY ./build-arm-image.sh /build-arm-image.sh
|
||||
COPY ./arm /arm
|
||||
|
||||
COPY defaults.yaml /defaults.yaml
|
||||
|
||||
|
||||
ENTRYPOINT [ "/entrypoint.sh" ]
|
||||
|
@@ -374,15 +374,20 @@ mount $recovery $WORKDIR/recovery
|
||||
mount $state $WORKDIR/state
|
||||
mount $efi $WORKDIR/efi
|
||||
|
||||
mkdir $WORKDIR/persistent
|
||||
mount $persistent $WORKDIR/persistent
|
||||
mkdir -p $WORKDIR/persistent/cloud-config
|
||||
|
||||
cp -rfv /defaults.yaml $WORKDIR/persistent/cloud-config/01_defaults.yaml
|
||||
|
||||
grub2-editenv $WORKDIR/state/grub_oem_env set "display_name=Kairos"
|
||||
|
||||
# Set a OEM config file if specified
|
||||
if [ -n "$config" ]; then
|
||||
echo ">> Copying $config OEM config file"
|
||||
mkdir $WORKDIR/persistent
|
||||
mount $persistent $WORKDIR/persistent
|
||||
mkdir $WORKDIR/persistent/cloud-config
|
||||
get_url $config $WORKDIR/persistent/cloud-config/99_custom.yaml
|
||||
umount $WORKDIR/persistent
|
||||
fi
|
||||
umount $WORKDIR/persistent
|
||||
|
||||
# Copy over content
|
||||
cp -arf $EFI/* $WORKDIR/efi
|
||||
|
8
tools-image/defaults.yaml
Normal file
8
tools-image/defaults.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
name: "Default user"
|
||||
stages:
|
||||
initramfs:
|
||||
- name: "Set default user/pass"
|
||||
users:
|
||||
kairos:
|
||||
passwd: "kairos"
|
Reference in New Issue
Block a user