#!/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 "Fix Server flavour on update")" # Methods fix_server_flavour() { # If the flavour is already fixed... if [ ! -d ${ETCTOKENSPATH} ]; then echo " * [ LliureX Up ] : Fix Server Flavour ... creating dir for tokens" mkdir -p ${ETCTOKENSPATH} fi if [ ! -f ${ETCTOKENSPATH}/${CDDSERVERLOST} ]; then date +%Y-%m-%d > ${ETCTOKENSPATH}/${CDDSERVERLOST} touch ${TOKENPATH}${TOKENSERVER} fi } _info() { echo "$INFO_MESSAGE" } _migrate() { fix_server_flavour } _usage() { echo "# Unknown argument" } _die() { echo "Error: $1" exit 1 } ACTION="$1" case "$ACTION" in migrate) _migrate ;; info) _info ;; *) _usage ;; esac