~free.ekanayaka/landscape-client/jaunty-updates-1.4.4-0ubuntu0.9.04

« back to all changes in this revision

Viewing changes to debian/landscape-client.init

  • Committer: Bazaar Package Importer
  • Author(s): Free Ekanayaka
  • Date: 2009-09-21 17:59:31 UTC
  • mfrom: (1.2.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090921175931-4ucv40j9ro26i3lm
Tags: 1.3.2.3-0ubuntu0.9.04.0
* New upstream release (LP: #347983):
  - Don't clear the hash_id_requests table upon resynchronize (LP #417122)
  - Include the README file in landscape-client (LP: #396260)
  - Fix client capturing stderr from run_command when constructing
    hash-id-databases url (LP: #397480)
  - Use substvars to conditionally depend on update-motd or
    libpam-modules (LP: #393454)
  - Fix reporting wrong version to the server (LP: #391225)
  - The init script does not wait for the network to be available
    before checking for EC2 user data (LP: #383336)
  - When the broker is restarted by the watchdog, the state of the client
    is inconsistent (LP: #380633)
  - Package stays unknown forever in the client with hash-id-databases
    support (LP: #381356)
  - Standard error not captured when calling smart-update (LP: #387441)
  - Changer calls reporter without switching groups, just user (LP: #388092)
  - Run smart update in the package-reporter instead of having a cronjob (LP: #362355)
  - Package changer does not inherit proxy settings (LP: #381241)
  - The ./test script doesn't work in landscape-client (LP: #381613)
  - The source package should build on all supported releases (LP: #385098)
  - Strip smart update's output (LP: #387331)
  - The fetch() timeout isn't based on activity (#389224)
  - Client can use a UUID of "None" when fetching the hash-id-database (LP: #381291)
  - Registration should use the fqdn rather than just the hostname (LP: #385730)

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
PIDDIR=/var/run/landscape
18
18
PIDFILE=$PIDDIR/$NAME.pid
19
19
RUN=0 # overridden in /etc/default/landscape-client
 
20
CLOUD=0 # overridden in /etc/default/landscape-client
 
21
DAEMON_GROUP=landscape
20
22
 
21
23
[ -f $DAEMON ] || exit 0
22
24
 
23
25
. /lib/lsb/init-functions
24
26
[ -f $LANDSCAPE_DEFAULTS ] && . $LANDSCAPE_DEFAULTS
25
27
 
 
28
# This $RUN check should match the semantics of
 
29
# l.sysvconfig.SysVConfig.is_configured_to_run.
26
30
if [ $RUN -eq 0 ]; then
27
 
        echo "$NAME is not configured, please run landscape-config."
28
 
        exit 0
 
31
        if [ $CLOUD -eq 1 ]; then
 
32
                if landscape-is-cloud-managed; then
 
33
                        # Install the cloud default configuration file
 
34
                        cp /usr/share/landscape/cloud-default.conf /etc/landscape/client.conf
 
35
                        # Override default file for not going in this conditional again at
 
36
                        # next startup
 
37
                        echo "RUN=1" > $LANDSCAPE_DEFAULTS
 
38
                else
 
39
                        echo "$NAME is not configured, please run landscape-config."
 
40
                        exit 0
 
41
                fi
 
42
        else
 
43
                echo "$NAME is not configured, please run landscape-config."
 
44
                exit 0
 
45
        fi
29
46
fi
30
47
 
31
48
case "$1" in
35
52
                        mkdir $PIDDIR
36
53
                        chown landscape $PIDDIR
37
54
                fi
38
 
                FULL_COMMAND="start-stop-daemon --start --quiet --oknodo --startas $DAEMON --pidfile $PIDFILE -- --daemon --pid-file $PIDFILE"
 
55
                FULL_COMMAND="start-stop-daemon --start --quiet --oknodo --startas $DAEMON --pidfile $PIDFILE -g $DAEMON_GROUP -- --daemon --pid-file $PIDFILE"
39
56
                if [ x"$DAEMON_USER" != x ]; then
40
 
                    sudo -u $DAEMON_USER $FULL_COMMAND
 
57
                        sudo -u $DAEMON_USER $FULL_COMMAND
41
58
                else
42
 
                    $FULL_COMMAND
 
59
                        $FULL_COMMAND
43
60
                fi
44
61
                log_end_msg $?
45
62
                ;;