source: lliurex-up/trunk/fuentes/scripts/common/update-cups @ 2609

Last change on this file since 2609 was 2609, checked in by kbut, 4 years ago

refactoring

File size: 829 bytes
Line 
1#!/bin/sh
2# Installing packages (doing the real dist-upgrade)
3
4# gettext domain
5TEXTDOMAIN="lliurex-up"
6export TEXTDOMAIN
7
8COMMON_LIBRARY="/usr/share/lliurex-up/common-upgrade-vars.sh"
9if [  -r $COMMON_LIBRARY  ] ; then 
10        . $COMMON_LIBRARY
11fi
12
13#gettext messages
14INFO_MESSAGE="$(gettext "Share the printers")"
15
16# Methods
17
18_ShareTheCups()
19{
20    # This method will be disabled for now
21    # if cups will be managed later by another system
22    # is better
23        #if [ -x  /usr/sbin/cupsctl ] ; then
24        #       /usr/sbin/cupsctl --share-printers || true
25        #fi
26    echo "Disabled script by default"
27}
28
29_info()
30{
31        echo "$INFO_MESSAGE"
32}
33
34_migrate()
35{
36        _ShareTheCups
37               
38}
39
40_usage()
41{
42        echo "# Unknown argument"
43
44}
45
46_die()
47{
48        echo "Error: $1"
49        exit 1
50}
51
52ACTION="$1"
53case "$ACTION" in
54        migrate)
55                _migrate
56        ;;
57        info)
58                _info
59        ;;
60        *)
61                _usage
62        ;;
63esac
64
Note: See TracBrowser for help on using the repository browser.