#!/bin/sh # Installing packages (doing the real dist-upgrade) # gettext domain TEXTDOMAIN="lliurex-up" export TEXTDOMAIN COMMON_LIBRARY="/usr/share/lliurex-up/common-upgrade-vars.sh" if [ -r $COMMON_LIBRARY ] ; then . $COMMON_LIBRARY fi #gettext messages INFO_MESSAGE="$(gettext "Remove Mirror")" # Methods remove_lliurex_mirror() { rc=0 dpkg -s lliurex-mirror-core || rc=1 if [ $rc -eq 0 ]; then apt-get remove -y --force-yes lliurex-mirror-core || true apt-get autoremove -y --force-yes fi # apache2-utils apache2.2-common reprepro rc=0 dpkg -s apache2-utils || rc=1 if [ $rc -eq 0 ]; then apt-get remove -y --force-yes apache2-utils || true apt-get autoremove -y --force-yes fi rc=0 dpkg -s apache2.2-common || rc=1 if [ $rc -eq 0 ]; then apt-get remove -y --force-yes apache2.2-common || true apt-get autoremove -y --force-yes fi rc=0 dpkg -s reprepro || rc=1 if [ $rc -eq 0 ]; then apt-get remove -y --force-yes reprepro || true apt-get autoremove -y --force-yes fi } _info() { echo "$INFO_MESSAGE" } _migrate() { remove_lliurex_mirror } _usage() { echo "# Unknown argument" } _die() { echo "Error: $1" exit 1 } ACTION="$1" case "$ACTION" in migrate) _migrate ;; info) _info ;; *) _usage ;; esac