mirror of
https://github.com/kairos-io/osbuilder.git
synced 2025-12-25 04:42:52 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1372a93911 | ||
|
|
ccc0d52393 | ||
|
|
b65986b47e | ||
|
|
b44b329fb7 | ||
|
|
3c419594b4 | ||
|
|
1101a59c9e | ||
|
|
a892113ff6 |
@@ -71,7 +71,8 @@ cleanup() {
|
||||
if [ -n "$oem" ]; then
|
||||
umount $oem || true
|
||||
fi
|
||||
losetup -D || true
|
||||
|
||||
losetup -D "${LOOP}" || true;
|
||||
}
|
||||
|
||||
ensure_dir_structure() {
|
||||
@@ -423,23 +424,30 @@ fi
|
||||
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
|
||||
if [ "$disable_lvm" == "false" ]; then
|
||||
mkdir $WORKDIR/oem
|
||||
mount $oem_lv $WORKDIR/oem
|
||||
|
||||
cp -rfv /defaults.yaml $WORKDIR/oem/01_defaults.yaml
|
||||
|
||||
# Set a OEM config file if specified
|
||||
if [ -n "$config" ]; then
|
||||
echo ">> Copying $config OEM config file"
|
||||
get_url $config $WORKDIR/oem/99_custom.yaml
|
||||
fi
|
||||
|
||||
umount $WORKDIR/oem
|
||||
else
|
||||
echo "LVM disabled: Not adding default config with default user/pass and custom config file"
|
||||
echo "Enable LVM to copy those files into /oem"
|
||||
fi
|
||||
|
||||
grub2-editenv $WORKDIR/state/grub_oem_env set "default_menu_entry=$menu_entry"
|
||||
|
||||
# We copy the file we saved earier to the STATE partition
|
||||
cp -rfv "${tmpgrubconfig}" $WORKDIR/state/grubmenu
|
||||
|
||||
# Set a OEM config file if specified
|
||||
if [ -n "$config" ]; then
|
||||
echo ">> Copying $config OEM config file"
|
||||
get_url $config $WORKDIR/persistent/cloud-config/99_custom.yaml
|
||||
fi
|
||||
umount $WORKDIR/persistent
|
||||
|
||||
# Copy over content
|
||||
cp -arf $EFI/* $WORKDIR/efi
|
||||
|
||||
Reference in New Issue
Block a user