check for existence of /etc/zephyr/server.list and read it
send a note if no servers are configured
zephyr-clients.init:
don't speculate as to why no servers are configured
zephyr-server.config:
be slightly cleverer about reading /etc/zephyr/server.list
git-svn-id: svn://svn.1ts.org/debian/trunk/zephyr@97
cbed1d16-5ef5-0310-b6a1-
d4a37b08ba1f
+zephyr (2.1.20010518.SNAPSHOT-2) unstable; urgency=low
+
+ * On linux/alpha, timeval is 16 bytes. Unfortunately, the protocol is
+ defined in terms of sizeof(struct timeval). Ooops. closes: #99158
+ * streamline server config script
+ * have client config script check for existence of /etc/zephyr/servers.list
+
+ -- Karl Ramm <kcr@debian.org> Wed, 25 Jul 2001 06:00:47 -0400
+
zephyr (2.1.20010518.SNAPSHOT-1) unstable; urgency=low
* fix typo in zephyr-server config script
db_get zephyr-clients/servers || true
if test -z "$RET"
then
- # 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"
+ # If there's an /etc/zephyr/server.list file lying around, read it
+ if test -f /etc/zephyr/server.list
then
- db_set zephyr-clients/servers $RET
+ z="`cat /etc/zephyr/server.list`"
+
+ if test -n "$z"
+ then
+ db_set zephyr-clients/servers "$z"
+ fi
+ else
+ # if there happens to be zephyr server decconf on this machine,
+ # see what its debconf knows about zephyr servers...
+ if db_get zephyr-server/servers && test -n "$RET"
+ then
+ db_set zephyr-clients/servers $RET
+ fi
fi
fi
fi
db_input high zephyr-clients/servers || true
+
db_go
+
+db_get zephyr-clients/servers
+if test -z "$RET"
+then
+ db_input high zephyr-clients/need-servers || true
+ db_go
+fi
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.
+The zephyr-clients package for whatever reason does not have any zephyr
+servers configured. 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
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.
+
+Template: zephyr-clients/need-servers
+Type: note
+Description: You have no zephyr servers specified for the client
+ The zephyr-clients package for whatever reason does not
+ have any zephyr servers configured. Please edit the file
+ /etc/default/zephyr-clients and add the names of your zephyr
+ servers, seperated by spaces to the zhm_args variable.
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
+ z="`cat /etc/zephyr/server.list`"
if test -n "$z"
then
- # remove exterraneous whitespace
- set $z
- z="$*"
-
db_set zephyr-server/read_conf false
db_set zephyr-server/servers "$z"
fi