#!/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 "Share the printers by default on servers")" # Methods _ShareTheCups() { # This method will be disabled for now # if cups will be managed later by another system # is better if [ -x /usr/sbin/cupsctl ] ; then if [ ! -e /etc/cups/lliurex-up.token ]; then /usr/sbin/cupsctl --share-printers || true echo "# Remove this file if you want to apply default cups configuration" > /etc/cups/lliurex-up.token echo "# This file was created on " >> /etc/cups/lliurex-up.token date >> /etc/cups/lliurex-up.token fi fi } _info() { echo "$INFO_MESSAGE" } _migrate() { _ShareTheCups } _usage() { echo "# Unknown argument" } _die() { echo "Error: $1" exit 1 } ACTION="$1" case "$ACTION" in migrate|partial) _migrate ;; info) _info ;; *) _usage ;; esac