HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //var/lib/dpkg/info/usrmerge.prerm
#!/bin/sh -e

can_remove() {
  dpkgconf='/etc/dpkg/dpkg.cfg.d/usrmerge'

  [ -e "$dpkgconf" ] || return 0

  local pkgs="$(awk '/^# [^ ]+$/ { print $2 }' $dpkgconf)"
  [ "$pkgs" ] || return 0

  local installed="$(dpkg-query --showformat='${Package}\n' --show $pkgs 2> /dev/null)"

  if [ "$installed" ]; then
    cat <<END

Some installed packages have not yet been converted to support usrmove:
$installed

If you remove this package then updating them will fail.
Please delete $dpkgconf to confirm that you understand this.

END
    exit 1
  fi
}

case "$1" in
    remove)
    # check if the package can be safely removed
    can_remove
    ;;
esac

# Automatically added by dh_installdeb/12.7.1ubuntu1
dpkg-maintscript-helper rm_conffile /etc/dpkg/dpkg.cfg.d/usrmerge 19\~ usrmerge -- "$@"
# End automatically added section