update scriptlet for migrating to DynamicUser=

The directory /var/lib/systemd/journal-upload must not exist.
If both private and non-private directory exist, then
systemd cannot create link to private directory, and
the service fails to start.
This makes the script try to remove the non-private directory.
This commit is contained in:
Yu Watanabe 2017-12-13 12:34:34 +09:00
parent 2125b9b134
commit e0aa12142f
1 changed files with 1 additions and 0 deletions

View File

@ -633,6 +633,7 @@ if [ $1 -eq 1 ] ; then
if [ -f %{_localstatedir}/lib/systemd/journal-upload/state -a ! -L %{_localstatedir}/lib/systemd/journal-upload ] ; then
mkdir -p %{_localstatedir}/lib/private/systemd/journal-upload
mv %{_localstatedir}/lib/systemd/journal-upload/state %{_localstatedir}/lib/private/systemd/journal-upload/.
rmdir %{_localstatedir}/lib/systemd/journal-upload || :
fi
fi