%PDF- %PDF-
Direktori : /var/lib/dpkg/info/ |
Current File : /var/lib/dpkg/info/gnome-remote-desktop.postinst |
#! /bin/sh # postinst script for gnome-remote-desktop # inspired by polkitd.postinst # # This can be dropped if https://bugs.debian.org/1070473 gets fixed # # see: dh_installdeb(1) set -e case "$1" in configure) # Disable the job by default for users updating from a buggy version if dpkg --compare-versions "$2" lt-nl 42.1.1-2~; then if deb-systemd-helper --user --quiet was-enabled 'gnome-remote-desktop.service'; then printf "Disable user unit that shouldn't have been auto enabled\n" deb-systemd-helper --user disable 'gnome-remote-desktop.service' >/dev/null || true fi fi if ! getent passwd gnome-remote-desktop >/dev/null; then user_changed=yes else user_changed= fi # Intentionally not using dh_installsysusers: we need enough control # over sequencing to reload dbus-daemon after doing this, but before # restarting gnome-remote-desktop if command -v systemd-sysusers >/dev/null; then systemd-sysusers ${DPKG_ROOT:+--root="$DPKG_ROOT"} gnome-remote-desktop-sysusers.conf || true fi if command -v systemd-tmpfiles >/dev/null; then systemd-tmpfiles ${DPKG_ROOT:+--root="$DPKG_ROOT"} --create gnome-remote-desktop-tmpfiles.conf || true fi # If the gnome-remote-desktop user was newly created, # the dbus-daemon might not know about that until reloaded. # dbus-broker's service has a dbus.service alias, so this will reload # either dbus-daemon or dbus-broker, whichever is used. if [ -z "${DPKG_ROOT-}" ] && [ -n "$user_changed" ]; then invoke-rc.d dbus reload || true fi ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # Automatically added by dh_installsystemduser/13.14.1ubuntu5 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then if [ -z "${DPKG_ROOT:-}" ]; then if deb-systemd-helper --user debian-installed 'gnome-remote-desktop-handover.service' ; then # The following line should be removed in trixie or trixie+1 deb-systemd-helper --user unmask 'gnome-remote-desktop-handover.service' >/dev/null || true if deb-systemd-helper --quiet --user was-enabled 'gnome-remote-desktop-handover.service' ; then # Create new symlinks, if any. deb-systemd-helper --user enable 'gnome-remote-desktop-handover.service' >/dev/null || true fi fi # Update the statefile to add new symlinks (if any), which need to be cleaned # up on purge. Also remove old symlinks. deb-systemd-helper --user update-state 'gnome-remote-desktop-handover.service' >/dev/null || true fi fi # End automatically added section # Automatically added by dh_installsystemduser/13.14.1ubuntu5 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then if [ -z "${DPKG_ROOT:-}" ]; then if deb-systemd-helper --user debian-installed 'gnome-remote-desktop-headless.service' ; then # The following line should be removed in trixie or trixie+1 deb-systemd-helper --user unmask 'gnome-remote-desktop-headless.service' >/dev/null || true if deb-systemd-helper --quiet --user was-enabled 'gnome-remote-desktop-headless.service' ; then # Create new symlinks, if any. deb-systemd-helper --user enable 'gnome-remote-desktop-headless.service' >/dev/null || true fi fi # Update the statefile to add new symlinks (if any), which need to be cleaned # up on purge. Also remove old symlinks. deb-systemd-helper --user update-state 'gnome-remote-desktop-headless.service' >/dev/null || true fi fi # End automatically added section # Automatically added by dh_installsystemduser/13.14.1ubuntu5 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then if [ -z "${DPKG_ROOT:-}" ]; then if deb-systemd-helper --user debian-installed 'gnome-remote-desktop.service' ; then # The following line should be removed in trixie or trixie+1 deb-systemd-helper --user unmask 'gnome-remote-desktop.service' >/dev/null || true if deb-systemd-helper --quiet --user was-enabled 'gnome-remote-desktop.service' ; then # Create new symlinks, if any. deb-systemd-helper --user enable 'gnome-remote-desktop.service' >/dev/null || true fi fi # Update the statefile to add new symlinks (if any), which need to be cleaned # up on purge. Also remove old symlinks. deb-systemd-helper --user update-state 'gnome-remote-desktop.service' >/dev/null || true fi fi # End automatically added section # Automatically added by dh_installsystemd/13.14.1ubuntu5 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then # The following line should be removed in trixie or trixie+1 deb-systemd-helper unmask 'gnome-remote-desktop.service' >/dev/null || true # was-enabled defaults to true, so new installations run enable. if deb-systemd-helper --quiet was-enabled 'gnome-remote-desktop.service'; then # Enables the unit on first installation, creates new # symlinks on upgrades if the unit file has changed. deb-systemd-helper enable 'gnome-remote-desktop.service' >/dev/null || true else # Update the statefile to add new symlinks (if any), which need to be # cleaned up on purge. Also remove old symlinks. deb-systemd-helper update-state 'gnome-remote-desktop.service' >/dev/null || true fi fi # End automatically added section # Automatically added by dh_installsystemd/13.14.1ubuntu5 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then if [ -d /run/systemd/system ]; then systemctl --system daemon-reload >/dev/null || true if [ -n "$2" ]; then _dh_action=restart else _dh_action=start fi deb-systemd-invoke $_dh_action 'gnome-remote-desktop.service' >/dev/null || true fi fi # End automatically added section exit 0