sys-apps/systemd: Adapt the sed command to new version

After systemd version 243, the lines that sed is removing now include
an exclamation mark, this commit adapts the sed command to accept both
formats.

These lines need to be removed so that the configuration set in
/usr/lib/tmpfiles.d/pam.conf file can be used (duplicate entries will
lead to systemd not doing anything).

The pam.conf configuration is shipped by of the pam package:
https://github.com/flatcar-linux/coreos-overlay/blob/flatcar-master/sys-libs/pam/files/tmpfiles.d/pam.conf

Fixes: flatcar-linux/Flatcar#75
This commit is contained in:
Marga Manterola 2020-04-07 12:10:07 +02:00
parent 3350715789
commit b9e95aa4ba

View File

@ -422,8 +422,8 @@ multilib_src_install_all() {
# Do not ship distro-specific files (nsswitch.conf pam.d)
rm -rf "${ED}"/usr/share/factory
sed -i "${ED}"/usr/lib/tmpfiles.d/etc.conf \
-e '/^C \/etc\/nsswitch\.conf/d' \
-e '/^C \/etc\/pam\.d/d'
-e '/^C!* \/etc\/nsswitch\.conf/d' \
-e '/^C!* \/etc\/pam\.d/d'
}
migrate_locale() {