~free.ekanayaka/landscape-client/lucid-1.5.2.1-0ubuntu0.10.04.0

« back to all changes in this revision

Viewing changes to debian/landscape-common.postinst

  • Committer: Bazaar Package Importer
  • Author(s): Mathias Gug, Free Ekanayaka
  • Date: 2009-07-22 14:54:50 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20090722145450-pvbp13gh8734c8ft
Tags: 1.3.2.2-0ubuntu0.9.10.1
[ Free Ekanayaka ]
* New upstream release:
  - 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:
26
26
case "$1" in
27
27
    configure)
28
28
 
29
 
        db_get $PACKAGE/sysinfo
30
 
        # Choices:
31
 
        #  * Do not display sysinfo on login
32
 
        #  * Cache sysinfo in /etc/motd
33
 
        #  * Run sysinfo on every login
34
 
        SYSINFO="${RET:-Cache sysinfo in /etc/motd}"
35
 
        WRAPPER=/usr/share/landscape/landscape-sysinfo.wrapper
36
 
        PROFILE_LOCATION=/etc/profile.d/50-landscape-sysinfo.sh
37
 
        UPDATE_MOTD_LOCATION=/etc/update-motd.d/50-landscape-sysinfo
38
 
        if [ "$RET" = "Cache sysinfo in /etc/motd" ]; then
39
 
            rm -f $PROFILE_LOCATION 2>/dev/null || true
40
 
            ln -sf $WRAPPER $UPDATE_MOTD_LOCATION
41
 
            /usr/sbin/update-motd 2>/dev/null || true
42
 
        elif [ "$RET" = "Run sysinfo on every login" ]; then
43
 
            rm -f $UPDATE_MOTD_LOCATION 2>/dev/null || true
44
 
            /usr/sbin/update-motd 2>/dev/null || true
45
 
            ln -sf $WRAPPER $PROFILE_LOCATION
46
 
        else
47
 
            rm -f $UPDATE_MOTD_LOCATION 2>/dev/null || true
48
 
            /usr/sbin/update-motd 2>/dev/null || true
49
 
            rm -f $PROFILE_LOCATION || true
50
 
        fi
 
29
       db_get $PACKAGE/sysinfo
 
30
       # Choices:
 
31
       #  * Do not display sysinfo on login
 
32
       #  * Cache sysinfo in /etc/motd
 
33
       #  * Run sysinfo on every login
 
34
       SYSINFO="${RET:-Cache sysinfo in /etc/motd}"
 
35
       WRAPPER=/usr/share/landscape/landscape-sysinfo.wrapper
 
36
       PROFILE_LOCATION=/etc/profile.d/50-landscape-sysinfo.sh
 
37
       UPDATE_MOTD_LOCATION=/etc/update-motd.d/50-landscape-sysinfo
 
38
       if [ "$RET" = "Cache sysinfo in /etc/motd" ]; then
 
39
           rm -f $PROFILE_LOCATION 2>/dev/null || true
 
40
           ln -sf $WRAPPER $UPDATE_MOTD_LOCATION
 
41
           /usr/sbin/update-motd 2>/dev/null || true
 
42
       elif [ "$RET" = "Run sysinfo on every login" ]; then
 
43
           rm -f $UPDATE_MOTD_LOCATION 2>/dev/null || true
 
44
           /usr/sbin/update-motd 2>/dev/null || true
 
45
           ln -sf $WRAPPER $PROFILE_LOCATION
 
46
       else
 
47
           rm -f $UPDATE_MOTD_LOCATION 2>/dev/null || true
 
48
           /usr/sbin/update-motd 2>/dev/null || true
 
49
           rm -f $PROFILE_LOCATION || true
 
50
       fi
51
51
 
52
52
        # 0.9.1 introduces non-backwards compatible changes.  This detects
53
53
        # whether or not the data is in the current format.  If not, all
65
65
 
66
66
        # Create landscape system user
67
67
        if ! getent passwd landscape >/dev/null; then
68
 
            adduser --quiet --system --disabled-password \
 
68
            adduser --quiet --system --group --disabled-password \
69
69
                --home /var/lib/landscape --no-create-home landscape
70
70
        fi
71
71
 
 
72
        # Create landscape system group (for <= 1.0.29.1-0ubuntu0.9.04.0)
 
73
        if ! getent group landscape >/dev/null; then
 
74
            addgroup --quiet --system landscape
 
75
        fi
 
76
 
 
77
        # Ensure primary group is landscape (for <= 1.0.29.1-0ubuntu0.9.04.0)
 
78
        usermod -g landscape landscape
 
79
 
72
80
        # Fix prior ownerships
73
81
        find /var/lib/landscape/ -wholename /var/lib/landscape/client/custom-graph-scripts -prune -or -exec chown landscape {} \;
74
82
        chown -R landscape /var/log/landscape