Merge lp:~jseutter/landscape-client/autodiscover-questions into lp:~landscape/landscape-client/trunk

Proposed by Jerry Seutter
Status: Merged
Approved by: Alberto Donato
Approved revision: 458
Merge reported by: Jerry Seutter
Merged at revision: not available
Proposed branch: lp:~jseutter/landscape-client/autodiscover-questions
Merge into: lp:~landscape/landscape-client/trunk
Prerequisite: lp:~jseutter/landscape-client/assert-equal-2
Diff against target: 81 lines (+38/-1)
3 files modified
debian/landscape-client.config (+6/-0)
debian/landscape-client.postinst (+10/-1)
debian/landscape-client.templates (+22/-0)
To merge this branch: bzr merge lp:~jseutter/landscape-client/autodiscover-questions
Reviewer Review Type Date Requested Status
Alberto Donato (community) Approve
Geoff Teale (community) Approve
Review via email: mp+91958@code.launchpad.net

This proposal supersedes a proposal from 2012-02-08.

Description of the change

This branch adds questions to debconf for server autodiscovery. It asks 3 questions:
- should server autodiscovery be done?
- What string should be used for DNS SRV queries (default to _landscape._tcp.localdomain)
- What string should be used for DNS A queries (default to landscape.localdomain)

I don't have any experience with this so I could be doing something dubious, dastardly or even diabolical.

To post a comment you must log in.
Revision history for this message
Geoff Teale (tealeg) wrote :

+1 Well it looks good to me.

One thing, why the question mark? (naive question)

+_Description: Enable server autodiscovery?

review: Approve
Revision history for this message
Jerry Seutter (jseutter) wrote :

> +1 Well it looks good to me.
>
> One thing, why the question mark? (naive question)
>
> +_Description: Enable server autodiscovery?

When I ran through dpkg-reconfigure it seemed to make more sense. In this case it is a Yes/No answer rather than a "use this string" answer, hence why I used the question mark.

Revision history for this message
Alberto Donato (ack) wrote :

#1:
+ db_set $PACKAGE/server_autodiscover $TAGS
+ db_set $PACKAGE/autodiscover_srv_query_string $TAGS
+ db_set $PACKAGE/autodiscover_a_query_string $TAGS

I guess a copy/paste error, $TAGS is used in place of the correct variables.

Beside that, looks good, +1!

review: Approve
459. By Jerry Seutter

Fixing bugs in landscape-client.config

460. By Jerry Seutter

Transmitting new settings from debconf back to landscape-client.

461. By Jerry Seutter

Adding a default setting to the templates file

462. By Jerry Seutter

Merge from trunk.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/landscape-client.config'
--- debian/landscape-client.config 2012-02-14 21:22:39 +0000
+++ debian/landscape-client.config 2012-02-24 01:18:21 +0000
@@ -48,6 +48,9 @@
48 update_var "https_proxy" "$CONFIGFILE"48 update_var "https_proxy" "$CONFIGFILE"
49 update_var "otp" "$CONFIGFILE"49 update_var "otp" "$CONFIGFILE"
50 update_var "tags" "$CONFIGFILE"50 update_var "tags" "$CONFIGFILE"
51 update_var "server_autodiscover" "$CONFIGFILE"
52 update_var "autodiscover_srv_query_string" "$CONFIGFILE"
53 update_var "autodiscover_a_query_string" "$CONFIGFILE"
51fi54fi
5255
53# Ask questions.56# Ask questions.
@@ -61,5 +64,8 @@
61db_input "$priority" $PACKAGE/computer_title || true64db_input "$priority" $PACKAGE/computer_title || true
62db_input "$priority" $PACKAGE/account_name || true65db_input "$priority" $PACKAGE/account_name || true
63db_input "$priority" $PACKAGE/registration_password || true66db_input "$priority" $PACKAGE/registration_password || true
67db_input "$priority" $PACKAGE/server_autodiscover || true
68db_input "$priority" $PACKAGE/autodiscover_srv_query_string || true
69db_input "$priority" $PACKAGE/autodiscover_a_query_string || true
64db_go || true70db_go || true
6571
6672
=== modified file 'debian/landscape-client.postinst'
--- debian/landscape-client.postinst 2012-02-13 21:07:42 +0000
+++ debian/landscape-client.postinst 2012-02-24 01:18:21 +0000
@@ -56,6 +56,12 @@
56 OTP="${RET}"56 OTP="${RET}"
57 db_get $PACKAGE/tags57 db_get $PACKAGE/tags
58 TAGS="${RET}"58 TAGS="${RET}"
59 db_get $PACKAGE/server_autodiscover
60 SERVER_AUTODISCOVER="${RET}"
61 db_get $PACKAGE/autodiscover_srv_query_string
62 AUTODISCOVER_SRV_QUERY_STRING="${RET}"
63 db_get $PACKAGE/autodiscover_a_query_string
64 AUTODISCOVER_A_QUERY_STRING="${RET}"
5965
60 # Create new configuration, with private mode66 # Create new configuration, with private mode
61 TEMPFILE=$(mktemp -p /etc/landscape)67 TEMPFILE=$(mktemp -p /etc/landscape)
@@ -80,7 +86,10 @@
80 --http-proxy "$HTTP_PROXY" \86 --http-proxy "$HTTP_PROXY" \
81 --https-proxy "$HTTPS_PROXY" \87 --https-proxy "$HTTPS_PROXY" \
82 --otp "$OTP" \88 --otp "$OTP" \
83 --tags "$TAGS"89 --tags "$TAGS" \
90 --server-autodiscover "$SERVER_AUTODISCOVER" \
91 --autodiscover-srv-query-string "$AUTODISCOVER_SRV_QUERY_STRING" \
92 --autodiscover-a-query-string "$AUTODISCOVER_A_QUERY_STRING"
8493
85 # If we got the needed information, actually do the registration.94 # If we got the needed information, actually do the registration.
86 if [ -n "$ACCOUNT_NAME" -a -n "$COMPUTER_TITLE" ]; then95 if [ -n "$ACCOUNT_NAME" -a -n "$COMPUTER_TITLE" ]; then
8796
=== modified file 'debian/landscape-client.templates'
--- debian/landscape-client.templates 2011-10-20 10:59:10 +0000
+++ debian/landscape-client.templates 2012-02-24 01:18:21 +0000
@@ -83,3 +83,25 @@
83 Register this system with a preexisting Landscape account. Please83 Register this system with a preexisting Landscape account. Please
84 go to http://landscape.canonical.com if you need a Landscape account.84 go to http://landscape.canonical.com if you need a Landscape account.
8585
86Template: landscape-client/server_autodiscover
87Type: boolean
88Default: false
89_Description: Enable server autodiscovery?
90 Enable DNS searches to discover the hostname of a Landscape Dedicated
91 Server.
92
93Template: landscape-client/autodiscover_srv_query_string
94Type: string
95Default: _landscape._tcp.localdomain
96_Description: DNS SRV query string for discovering the server name:
97 When server autodiscovery is enabled, this string is used to make a
98 DNS SRV query to find the location of the Landscape server. This
99 will override portions of the ping url and https url settings.
100
101Template: landscape-client/autodiscover_a_query_string
102Type: string
103Default: landscape.localdomain
104_Description: DNS A name query string for discovering the server name:
105 When server autodiscovery is enabled, this string is used to make a
106 DNS A name query to find the location of the Landscape server. This
107 will override portions of the ping url and https url settings.

Subscribers

People subscribed via source and target branches

to all changes: