# Move old stuff around in /var/lib
[ -d /var/lib/systemd/random-seed ] && rm -rf /var/lib/systemd/random-seed >/dev/null 2>&1 || :
[ -e /var/lib/random-seed ] && mv /var/lib/random-seed /var/lib/systemd/random-seed >/dev/null 2>&1 || :
[ -e /var/lib/backlight ] && mv /var/lib/backlight /var/lib/systemd/backlight >/dev/null 2>&1 || :
/lib/systemd/systemd-random-seed save >/dev/null 2>&1 || :
# rm symlinks for network.service
[ -L /etc/systemd/system/network.target.wants/network.service ] && rm -f /etc/systemd/system/network.target.wants/network.service >/dev/null 2>&1 || :
[ -L /etc/systemd/system/multi-user.target.wants/network.service ] && rm -f /etc/systemd/system/multi-user.target.wants/network.service >/dev/null 2>&1 || :
# rm symlinks for prefdm.service
[ -L /etc/systemd/system/graphical.target.wants/prefdm.service ] && rm -f /etc/systemd/system/graphical.target.wants/prefdm.service >/dev/null 2>&1 || :
if [ $1 -eq 1 ] ; then
# create /var/log/journal only on initial installation
mkdir -p /var/log/journal
fi
# Make sure new journal files will be owned by the "systemd-journal" group
chgrp systemd-journal /run/log/journal/ /run/log/journal/`cat /etc/machine-id 2> /dev/null` /var/log/journal/ /var/log/journal/`cat /etc/machine-id 2> /dev/null` >/dev/null 2>&1 || :
chmod g+s /run/log/journal/ /run/log/journal/`cat /etc/machine-id 2> /dev/null` /var/log/journal/ /var/log/journal/`cat /etc/machine-id 2> /dev/null` >/dev/null 2>&1 || :
# Apply ACL to the journal directory
setfacl -Rnm g:wheel:rx,d:g:wheel:rx,g:adm:rx,d:g:adm:rx /var/log/journal/ >/dev/null 2>&1 || :
# remove obsolete systemd-readahead file and services symlink
rm -f /.readahead > /dev/null 2>&1 || :
[ -L /etc/systemd/system/default.target.wants/systemd-readahead-collect.service ] && rm -f /etc/systemd/system/default.target.wants/systemd-readahead-collect.service
[ -L /etc/systemd/system/default.target.wants/systemd-readahead-replay.service ] && rm -f /etc/systemd/system/default.target.wants/systemd-readahead-replay.service
[ -L /etc/systemd/system/system-update.target.wants/systemd-readahead-drop.service ] && rm -f /etc/systemd/system/system-update.target.wants/systemd-readahead-drop.service
if [ $1 -eq 1 ] ; then
# Enable the services we install by default
systemctl preset-all >/dev/null 2>&1 || :
systemctl --global preset-all >/dev/null 2>&1 || :
fi