mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 18:42:12 +08:00
121 lines
3.1 KiB
Plaintext
121 lines
3.1 KiB
Plaintext
post_install() {
|
|
echo " > Additional desktop-specific packages:"
|
|
echo " "
|
|
echo " kdeplasma-addons : Additional Plasmoids"
|
|
echo " "
|
|
|
|
if [ -e "/etc/chakra/updates.conf" ] ; then
|
|
|
|
. /etc/chakra/updates.conf
|
|
|
|
if [ "$UPDATE_XDG_ICON_DB" = "yes" ]; then
|
|
/usr/bin/chakra-update-icons
|
|
fi
|
|
|
|
if [ "$UPDATE_GLOBAL_CONFIG" = "yes" ]; then
|
|
/usr/bin/chakra-update-sycoca
|
|
fi
|
|
|
|
if [ "$UPDATE_USER_CONFIG" = "yes" ]; then
|
|
/usr/bin/chakra-update-user-sycoca
|
|
fi
|
|
else
|
|
echo " > WARNING"
|
|
echo " The package kde-common seems not to be installed,"
|
|
echo " this can possibly break the installation. Just install it"
|
|
echo " manually after this installation/update, run the following"
|
|
echo " commands and restart KDE afterwards:"
|
|
echo " sudo chakra-config-updater"
|
|
echo " kbuildsycoca4"
|
|
echo " "
|
|
fi
|
|
|
|
groupadd -g 135 kdm &>/dev/null
|
|
useradd -u 135 -g kdm -d /var/lib/kdm -s /bin/false -r -M kdm &>/dev/null
|
|
chown -R 135:135 var/lib/kdm &>/dev/null
|
|
|
|
echo "Enabling systemd service"
|
|
systemctl enable kdm.service
|
|
}
|
|
|
|
post_upgrade() {
|
|
if [ -e "/etc/chakra/updates.conf" ] ; then
|
|
|
|
. /etc/chakra/updates.conf
|
|
|
|
if [ "$UPDATE_XDG_ICON_DB" = "yes" ]; then
|
|
/usr/bin/chakra-update-icons
|
|
fi
|
|
|
|
if [ "$UPDATE_GLOBAL_CONFIG" = "yes" ]; then
|
|
/usr/bin/chakra-update-sycoca
|
|
fi
|
|
|
|
if [ "$UPDATE_USER_CONFIG" = "yes" ]; then
|
|
/usr/bin/chakra-update-user-sycoca
|
|
fi
|
|
else
|
|
echo " > WARNING"
|
|
echo " The package kde-common seems not to be installed,"
|
|
echo " this can possibly break the installation. Just install it"
|
|
echo " manually after this installation/update, run the following"
|
|
echo " commands and restart KDE afterwards:"
|
|
echo " sudo chakra-config-updater"
|
|
echo " kbuildsycoca4"
|
|
echo " "
|
|
fi
|
|
|
|
getent group kdm >/dev/null 2>&1 || groupadd -g 135 kdm &>/dev/null
|
|
getent passwd kdm >/dev/null 2>&1 || useradd -u 135 -g kdm -d /var/lib/kdm -s /bin/false -r -M kdm &>/dev/null
|
|
chown -R 135:135 var/lib/kdm &>/dev/null
|
|
|
|
echo "Enabling systemd service"
|
|
systemctl enable kdm.service
|
|
}
|
|
|
|
pre_remove() {
|
|
echo "Disabling systemd service"
|
|
systemctl disable kdm.service
|
|
}
|
|
|
|
post_remove() {
|
|
|
|
if [ -e "/etc/chakra/updates.conf" ] ; then
|
|
|
|
. /etc/chakra/updates.conf
|
|
|
|
if [ "$UPDATE_XDG_ICON_DB" = "yes" ]; then
|
|
/usr/bin/chakra-update-icons
|
|
fi
|
|
|
|
if [ "$UPDATE_GLOBAL_CONFIG" = "yes" ]; then
|
|
/usr/bin/chakra-update-sycoca
|
|
fi
|
|
|
|
if [ "$UPDATE_USER_CONFIG" = "yes" ]; then
|
|
/usr/bin/chakra-update-user-sycoca
|
|
fi
|
|
else
|
|
echo " > WARNING"
|
|
echo " The package kde-common seems not to be installed,"
|
|
echo " this can possibly break the installation. Just install it"
|
|
echo " manually after this installation/update, run the following"
|
|
echo " commands and restart KDE afterwards:"
|
|
echo " sudo chakra-config-updater"
|
|
echo " kbuildsycoca4"
|
|
echo " "
|
|
fi
|
|
|
|
if getent passwd kdm >/dev/null 2>&1; then
|
|
userdel kdm
|
|
fi
|
|
if getent group kdm >/dev/null 2>&1; then
|
|
groupdel kdm
|
|
fi
|
|
}
|
|
|
|
op=$1
|
|
shift
|
|
|
|
$op $*
|