Skip to content

Commit

Permalink
Omit combustion module in initrds for already configured systems
Browse files Browse the repository at this point in the history
If the initrd is hostonly and /etc/machine-id already exists, don't include
the combustion dracut module and its dependencies.
  • Loading branch information
Vogtinator committed Aug 16, 2023
1 parent faa3bd6 commit 624b553
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Expand Up @@ -173,6 +173,9 @@ subsequent boots.

### Combustion

The `combustion` dracut module is included by default, but omitted if dracut is
run on an already configured system in `hostonly` mode.

`firstboot.target` pulls in `combustion.service` and
`combustion-prepare.service`. The latter runs after the config drive or
QEMU fw_cfg blob appears (see `combustion.rules` for details). The combustion
Expand Down
8 changes: 8 additions & 0 deletions module-setup.sh
@@ -1,3 +1,11 @@
check() {
# Omit if building for this already configured system
if [[ $hostonly ]] && [ -e /etc/machine-id ] && ! [ -e /var/lib/YaST2/reconfig_system ]; then
return 255
fi
return 0
}

depends() {
echo bash firstboot network systemd url-lib
}
Expand Down

0 comments on commit 624b553

Please sign in to comment.