]> asedeno.scripts.mit.edu Git - 1ts-debian.git/commitdiff
changelog: see below
authorkcr <kcr@cbed1d16-5ef5-0310-b6a1-d4a37b08ba1f>
Sun, 10 Jun 2001 11:38:59 +0000 (11:38 +0000)
committerkcr <kcr@cbed1d16-5ef5-0310-b6a1-d4a37b08ba1f>
Sun, 10 Jun 2001 11:38:59 +0000 (11:38 +0000)
rules default.subcriptions zephyr-server.files:
  * zephyr-server should have a default.subscriptions file now, closes: #94125
control:
  * libzephyr3-krb and zephyr-server-krb now depend on krb4-config, should
    improve out-of-box functionality
zephyr-clients.init:
  * alter init script to print a message and exit 0 if no zephyr servers
    were specified. closes: #96723
zephyr-{clients,server}.{config,postinst,templates}:
  * rework debconf stuff to be more clever about where the data is coming from.

git-svn-id: svn://svn.1ts.org/debian/trunk/zephyr@60 cbed1d16-5ef5-0310-b6a1-d4a37b08ba1f

debian/changelog
debian/default.subscriptions [new file with mode: 0644]
debian/rules
debian/zephyr-clients.config
debian/zephyr-clients.init
debian/zephyr-clients.postinst
debian/zephyr-clients.templates
debian/zephyr-server.config
debian/zephyr-server.files
debian/zephyr-server.postinst
debian/zephyr-server.templates

index 7a6ca84a061da4aa3bdec75a082810c5dbea4c6e..6400c9b446c12a1f950265105856c423ed7d3fa0 100644 (file)
@@ -1,3 +1,15 @@
+zephyr (2.1.20000421.SNAPSHOT-13) unstable; urgency=low
+
+  * The unlucky version.  No warranty express or implied.  YMMV.
+  * zephyr-server should have a default.subscriptions file now, closes: #94125
+  * libzephyr3-krb and zephyr-server-krb now depend on krb4-config, should
+    improve out-of-box functionality
+  * alter init script to print a message and exit 0 if no zephyr servers
+    were specified. closes: #96723
+  * rework debconf stuff to be more clever about where the data is coming from.
+
+ -- Karl Ramm <kcr@debian.org>  Sun, 10 Jun 2001 07:29:56 -0400
+
 zephyr (2.1.20000421.SNAPSHOT-12) unstable; urgency=low
 
   * libzephyr-dev failed to have any files in it... and no one noticed.
diff --git a/debian/default.subscriptions b/debian/default.subscriptions
new file mode 100644 (file)
index 0000000..2ef3863
--- /dev/null
@@ -0,0 +1,3 @@
+operations,message,*
+message,personal,%me%
+message,urgent,%me%
index fb15d2a2e72bcb12b13c61598c7c2eb38be8e13f..36ca0d2b2eea2efbcae63e23152fcef812e56c5f 100755 (executable)
@@ -78,6 +78,7 @@ install: build
        mkdir -p debian/tmp/etc/zephyr/acl
        set -x; for i in debian/acl/*; do install -c -m 644 -o root $$i debian/tmp/etc/zephyr/acl; done; set +x
        install -c -m 644 debian/zephyr.vars debian/tmp/etc/zephyr
+       install -c -m 644 debian/default.subscriptions debian/tmp/etc/zephyr
        cp -pr debian/tmp/etc/zephyr/acl debian/tmp-krb/etc/zephyr
 
 # Build architecture-independent files here.
index 16a003d016e06c7f71079bc5b15273cd2baa8666..e07b0d02f1c90c4c762d3f487b3c75c45ae2ac0e 100644 (file)
@@ -1,14 +1,30 @@
 #!/bin/sh -e
 
 . /usr/share/debconf/confmodule
+db_version 2.0
 
-zhm_args=""
-if test -f /etc/default/zephyr-clients
+db_get zephyr-clients/servers || true
+if test -z "$RET"
 then
-       . /etc/default/zephyr-client
+       # if there happens to be a zephyr server running on this machine,
+        # see what its debconf knows about zephyr servers...
+       if db_get zephyr-server/servers && -n "$RET"
+       then
+               db_set zephyr-clients/servers $RET
+       fi
 fi
-if test -z "$zhm_args"
+
+db_get zephyr-clients/read_conf 
+if test -f /etc/default/zephyr-clients -a \( "$RET" = true \)
 then
-       db_input high zephyr-clients/servers || true
-       db_go
+       zhm_args=""
+       . /etc/default/zephyr-client
+       if test -n "$zhm_args"
+       then
+               db_set zephyr-clients/read_conf false
+               db_set zephyr-clients/servers "$zhm_args"
+       fi
 fi
+
+db_input high zephyr-clients/servers || true
+db_go
index 293d7be66ce8837510ee6bf318ea2b9c4d3bc1f7..bfed4a7cd61e3a6cb316384b6f036e72e778487e 100644 (file)
@@ -27,6 +27,18 @@ fi
 
 case "$1" in
   start)
+       # note that the following will need revisting when we get hesiod support
+       if test -z "$zhm_args"
+       then
+               cat <<EOF
+The zephyr-clients package for whatever reason does not have any zephyr servers
+configured.  This is often because you have the threshold for debconf 
+asking question cranked up too high but regardless, please edit the file
+/etc/default/zephyr-clients and add the names of your zephyr servers, seperated
+by spaces to the zhm_args variable.
+EOF
+               exit 0
+       fi
        echo -n "Starting $DESC: "
        start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
                --exec $DAEMON -- $zhm_args
index 8f71a29b8af790727349f94056fed2c6573302ae..5569b775ff0e62c996a0f17b00227193d085efe4 100644 (file)
@@ -26,8 +26,9 @@ case "$1" in
     configure)
 
        . /usr/share/debconf/confmodule
+       db_version 2.0
 
-       tmpfile=`tempfile`
+       db_set zephyr-clients/read_conf true
 
        if test -f /etc/zephyr/zephyr.conf
        then
@@ -37,21 +38,22 @@ case "$1" in
                fi
        fi
 
-       zhm_args=""
+       # if /etc/default/zephyr-clients already exists and has a zhm_args
+        # line, the config script should have sucked it into debconf
+       db_get zephyr-clients/servers
+
+       tmpfile=/etc/default/zephyr-client.dpkg-new
        if test -f /etc/default/zephyr-clients
        then
-               . /etc/default/zephyr-clients
-       fi
-       if test -z "$zhm_args"
-       then
-               db_get zephyr-clients/servers
-               if test -f /etc/default/zephyr-clients
-               then
-                       grep -v ^zhm_args /etc/default/zephyr-clients > $tmpfile || true
-               fi
-               echo zhm_args=\"${RET}\" >> $tmpfile
-               cat $tmpfile > /etc/default/zephyr-clients
+               grep -v ^zhm_args /etc/default/zephyr-clients > $tmpfile || true
+       else
+               cat > $tmpfile << EOF
+# This file is automatically rewritten by the zephyr-clients post-install
+# script.  So treat it right.
+EOF
        fi
+       echo zhm_args=\"${RET}\" >> $tmpfile
+       cat $tmpfile > /etc/default/zephyr-clients
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)
index eca31194da9e13c55de0e702d0c8e37410f75555..16a1b5c058f6a049c0af474af3508797d98f6c71 100644 (file)
@@ -3,3 +3,14 @@ Type: string
 Description: What are your zephyr servers?
  Please type the full names of your zephyr servers, seperated by spaces.
  (note that this can be a subset of what you're telling the servers)
+
+Template: zephyr-clients/read_conf
+Type: boolean
+Default: true
+Description: You should never see this
+ We want to try and capture user changes when they edit a config file 
+ manually.  To do this we look at the file in the config script.
+ However, in the case of preconfigure, the config script is run twice
+ before the postinst is run.  Thus we may read the wrong value before the 
+ edited value is written out in postinst.
+ If this is false we skip reading config files until postinst runs.
index 762108a94eb091e9d3370d58ac4511a9b4a76476..a883fbb752200d490baf1ae452ec7ab48b7758b3 100644 (file)
@@ -1,6 +1,41 @@
 #!/bin/sh -e
 
 . /usr/share/debconf/confmodule
+db_version 2.0
+
+db_get zephyr-server/servers || true
+if -z "$RET"
+then
+       # if there happens to be zephyr-clients runnin on this machine
+       # it might know something about servers.
+       # else default to just the current host
+       z="`hostname --fqdn`"
+       if db_get zephyr-clients/servers && -n "$RET"
+       then
+               z="$RET $z"
+       fi
+       db_set zephyr-server/servers "$z"
+fi
+
+db_get zephyr-server/read_conf
+if test -f /etc/zephyr/server.list -a \( "$RET" = true \)
+then
+       z=""
+       while read x
+       do
+               z="$z $x"
+       done < /etc/zephyr-server.list
+       
+       # remove exterraneous whitespace
+       set $z
+       z="$*"
+
+       if test -n "$z"
+       then
+               db_set zephyr-server/read_conf false
+               db_set zephyr-server/servers "$z"
+       fi
+fi
 
 db_input high zephyr-server/servers || true
 db_go
index 9bebf95670bcd463acfaeadd3b0b8cba5a34f863..f0f96871672f21d15dda1e6d4ea7c4df119eabc7 100644 (file)
@@ -33,3 +33,4 @@ etc/zephyr/acl/xmt-user_locate.acl
 etc/zephyr/acl/xmt-wg_ctl.acl
 etc/zephyr/acl/xmt-zephyr_admin.acl
 etc/zephyr/acl/xmt-zephyr_ctl.acl
+etc/zephyr/default.subscriptions
index d076eece6334817f5141f1588ee4a959215ab8f4..3157084d29c45bc29729ec14feeb40d15722f70a 100644 (file)
@@ -26,6 +26,9 @@ case "$1" in
     configure)
 
        . /usr/share/debconf/confmodule
+       db_version 2.0
+
+       db_set zephyr-server/read_conf true
 
        db_get zephyr-server/servers
        : > /etc/zephyr/server.list
index 6c53f2dbb584407983f47de9b6f00f9b3dbc2a76..d6686a7df8fa0050da9cd3b4f658b1c2a4fc1787 100644 (file)
@@ -3,3 +3,14 @@ Type: string
 Description: What are your zephyr servers?
  Please type the full names of your zephyr servers, seperated by spaces.
  (Note that this can be a superset of that you're telling the clients.)
+
+Template: zephyr-server/read_conf
+Type: boolean
+Default: true
+Description: You should never see this
+ We want to try and capture user changes when they edit a config file
+ manually.  To do this we look at the file in the config script.
+ However, in the case of preconfigure, the config script is run twice
+ before the postinst is run.  Thus we may read the wrong value before the
+ edited value is written out in postinst.
+ If this is false we skip reading config files until postinst runs.