dracut: Support diverted configuration files of Calamares
When a configuration file for Calamares is diverted by e.g. `config-package-dev`, it becomes a symlink. The in-place modifications must be applied on the symlinked file, not on a newly created copy. After removal of the package, no remainders are left. See https://salsa.debian.org/live-team/live-build/-/merge_requests/353#note_540394
This commit is contained in:
parent
111a6c2c65
commit
0959dda89f
|
@ -29,17 +29,17 @@ apt-get autoremove --yes
|
|||
# Adjust the path for Calamares
|
||||
if [ -e /etc/calamares/modules/unpackfs.conf ]
|
||||
then
|
||||
sed -i -e 's|/run/live/medium|/run/initramfs/live|' /etc/calamares/modules/unpackfs.conf
|
||||
sed --follow-symlinks -i -e 's|/run/live/medium|/run/initramfs/live|' /etc/calamares/modules/unpackfs.conf
|
||||
fi
|
||||
# Use dracut instead of initramfs-tools
|
||||
if [ -e /etc/calamares/settings.conf ]
|
||||
then
|
||||
sed -i -e '/initramfscfg/d;s/initramfs/dracut/' /etc/calamares/settings.conf
|
||||
sed --follow-symlinks -i -e '/initramfscfg/d;s/initramfs/dracut/' /etc/calamares/settings.conf
|
||||
fi
|
||||
# Add dracut-live to the list of packages to uninstall
|
||||
if [ -e /etc/calamares/modules/packages.conf ]
|
||||
then
|
||||
sed -i -e "s/'live-boot'/'dracut-live'/" /etc/calamares/modules/packages.conf
|
||||
sed --follow-symlinks -i -e "s/'live-boot'/'dracut-live'/" /etc/calamares/modules/packages.conf
|
||||
fi
|
||||
# Calamares script for /etc/apt/sources.list during the installation
|
||||
SOURCES_MEDIA=/usr/share/calamares/helpers/calamares-sources-media
|
||||
|
|
Loading…
Reference in New Issue