#!/bin/bash set -e # Automatically added by dh_systemd_enable/13.3.4 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then # This will only remove masks created by d-s-h on package removal. deb-systemd-helper unmask 'wb-prepare.service' >/dev/null || true # was-enabled defaults to true, so new installations run enable. if deb-systemd-helper --quiet was-enabled 'wb-prepare.service'; then # Enables the unit on first installation, creates new # symlinks on upgrades if the unit file has changed. deb-systemd-helper enable 'wb-prepare.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 'wb-prepare.service' >/dev/null || true fi fi # End automatically added section # Automatically added by dh_systemd_enable/13.3.4 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then # This will only remove masks created by d-s-h on package removal. deb-systemd-helper unmask 'wb-init.service' >/dev/null || true # was-enabled defaults to true, so new installations run enable. if deb-systemd-helper --quiet was-enabled 'wb-init.service'; then # Enables the unit on first installation, creates new # symlinks on upgrades if the unit file has changed. deb-systemd-helper enable 'wb-init.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 'wb-init.service' >/dev/null || true fi fi # End automatically added section # Automatically added by dh_systemd_enable/13.3.4 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then # This will only remove masks created by d-s-h on package removal. deb-systemd-helper unmask 'wb-watch-update.service' >/dev/null || true # was-enabled defaults to true, so new installations run enable. if deb-systemd-helper --quiet was-enabled 'wb-watch-update.service'; then # Enables the unit on first installation, creates new # symlinks on upgrades if the unit file has changed. deb-systemd-helper enable 'wb-watch-update.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 'wb-watch-update.service' >/dev/null || true fi fi # End automatically added section # Automatically added by dh_systemd_enable/13.3.4 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then # This will only remove masks created by d-s-h on package removal. deb-systemd-helper unmask 'wb-gsm.service' >/dev/null || true # was-enabled defaults to true, so new installations run enable. if deb-systemd-helper --quiet was-enabled 'wb-gsm.service'; then # Enables the unit on first installation, creates new # symlinks on upgrades if the unit file has changed. deb-systemd-helper enable 'wb-gsm.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 'wb-gsm.service' >/dev/null || true fi fi # End automatically added section # Automatically added by dh_systemd_enable/13.3.4 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then # This will only remove masks created by d-s-h on package removal. deb-systemd-helper unmask 'wb-usb-otg.service' >/dev/null || true # was-enabled defaults to true, so new installations run enable. if deb-systemd-helper --quiet was-enabled 'wb-usb-otg.service'; then # Enables the unit on first installation, creates new # symlinks on upgrades if the unit file has changed. deb-systemd-helper enable 'wb-usb-otg.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 'wb-usb-otg.service' >/dev/null || true fi fi # End automatically added section # Automatically added by dh_systemd_start/13.3.4 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 'wb-watch-update.service' >/dev/null || true fi fi # End automatically added section # Automatically added by dh_systemd_start/13.3.4 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 deb-systemd-invoke start 'wb-gsm.service' >/dev/null || true fi fi # End automatically added section # Automatically added by dh_systemd_start/13.3.4 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 deb-systemd-invoke start 'wb-usb-otg.service' >/dev/null || true fi fi # End automatically added section # Automatically added by dh_installdeb/13.3.4 dpkg-maintscript-helper rm_conffile /etc/init.d/wb-prepare 3.0.0~ -- "$@" # End automatically added section # Automatically added by dh_installdeb/13.3.4 dpkg-maintscript-helper rm_conffile /etc/init.d/wb-init 3.0.0~ -- "$@" # End automatically added section # Automatically added by dh_installdeb/13.3.4 dpkg-maintscript-helper rm_conffile /etc/init.d/wb-watch-update 3.0.0~ -- "$@" # End automatically added section # Automatically added by dh_installdeb/13.3.4 dpkg-maintscript-helper rm_conffile /etc/init.d/wb-gsm-rtc 3.0.0~ -- "$@" # End automatically added section if [[ -e "/usr/sbin/policy-rc.d" ]] && [[ "$(cat /usr/sbin/policy-rc.d)" == "exit 101" ]]; then echo "rootfs building mode, preparing FIT install script" /usr/lib/wb-image-update/fit/build.sh fi /usr/lib/wb-utils/prepare/wb-prepare.sh fix_hosts /usr/lib/wb-image-update/fix-broken-fit.sh || { >&2 echo -e "\nFailed to fix factory FIT (maybe we are offline?)" >&2 echo -e "You can try again later by calling 'apt install --reinstall wb-utils'.\n" >&2 echo -e "For further information see https://wirenboard.com/wiki/WB_7:_Errata#ERRWB73009\n" } exit 0