changeset 310:150e75d3c785 noffle

[svn] fixed config for in case of multiple servers
author godisch
date Wed, 19 Feb 2003 07:36:16 +0000
parents 21ba70d6eb38
children 7c6035f8656f
files debian/changelog debian/config
diffstat 2 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/debian/changelog	Wed Feb 19 06:26:09 2003 +0000
+++ b/debian/changelog	Wed Feb 19 07:36:16 2003 +0000
@@ -1,6 +1,7 @@
 noffle (1.1.5-0.cvs20030219) unstable; urgency=low
 
   * New upstream release, closes: #181320 (syslog when fetching).
+  * Fixed debconf scripts, closes: #181069.
   * Clarified init output, closes: #181171.
   * Updated debian/rules, incorporated manual patches.
   * Removed /var/lock/noffle on purge.
--- a/debian/config	Wed Feb 19 06:26:09 2003 +0000
+++ b/debian/config	Wed Feb 19 07:36:16 2003 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $Id: config 434 2003-02-14 13:54:32Z godisch $
+# $Id: config 444 2003-02-19 07:36:16Z godisch $
 
 set -e
 . /usr/share/debconf/confmodule
@@ -24,7 +24,7 @@
 [ "$RET" = false ] && exit 0
 
 # read server port value from inetd.conf
-port="`grep '[[:space:]]/usr/bin/noffle[[:space:]]' /etc/inetd.conf | sed 's/^#<off># //;s/[[:space:]].*//' 2> /dev/null`" || :
+port="`grep '[[:space:]]/usr/bin/noffle[[:space:]]' /etc/inetd.conf | head -n 1 | sed 's/^#<off># //;s/[[:space:]].*//' 2> /dev/null`" || :
 if [ "$port" ]; then
 	# read port value from debconf db
 	db_get noffle/port || RET=""
@@ -39,27 +39,27 @@
 # read server, username, password, maxfetch, default-expire from $server_config
 if [ -s "$server_config" ]; then
 	db_get noffle/server || RET=""
-	server="`grep '^server' $server_config | sed 's/^server[[:space:]]*//;s/[[:space:]].*//' 2> /dev/null`" || :
+	server="`grep '^server' $server_config | head -n 1 | sed 's/^server[[:space:]]*//;s/[[:space:]].*//' 2> /dev/null`" || :
 	[ "$server" = "$RET" ] || db_fset noffle/server seen false || :
 	[ "$server" ] && db_set noffle/server "$server" || :
 
 	db_get noffle/username || RET=""
-	server="`grep '^server' $server_config | sed 's/^server[[:space:]]*//;s/[^[:space:]]*[[:space:]]*//;s/[[:space:]].*//' 2> /dev/null`" || :
+	server="`grep '^server' $server_config | head -n 1 | sed 's/^server[[:space:]]*//;s/[^[:space:]]*[[:space:]]*//;s/[[:space:]].*//' 2> /dev/null`" || :
 	[ "$username" = "$RET" ] || db_fset noffle/username seen false || :
 	[ "$username" ] && db_set noffle/username "$username" || :
 
 	db_get noffle/password || RET=""
-	server="`grep '^server' $server_config | sed 's/^server[[:space:]]*//;s/[^[:space:]]*[[:space:]]*//;s/[^[:space:]]*[[:space:]]*//;s/[[:space:]].*//' 2> /dev/null`" || :
+	server="`grep '^server' $server_config | head -n 1 | sed 's/^server[[:space:]]*//;s/[^[:space:]]*[[:space:]]*//;s/[^[:space:]]*[[:space:]]*//;s/[[:space:]].*//' 2> /dev/null`" || :
 	[ "$password" = "$RET" ] || db_fset noffle/password seen false || :
 	[ "$password" ] && db_set noffle/password "$password" || :
 
 	db_get noffle/maxfetch || RET=""
-	maxfetch="`grep '^max-fetch' $server_config | sed 's/^max-fetch[[:space:]]*//' 2> /dev/null`" || :
+	maxfetch="`grep '^max-fetch' $server_config | head -n 1 | sed 's/^max-fetch[[:space:]]*//' 2> /dev/null`" || :
 	[ "$maxfetch" = "$RET" ] || db_fset noffle/maxfetch seen false || :
 	[ "$maxfetch" ] && db_set noffle/maxfetch "$maxfetch" || :
 
 	db_get noffle/default-expire || RET=""
-	defexpire="`grep '^default-expire' $server_config | sed 's/^default-expire[[:space:]]*//' 2> /dev/null`" || :
+	defexpire="`grep '^default-expire' $server_config | head -n 1 | sed 's/^default-expire[[:space:]]*//' 2> /dev/null`" || :
 	[ "$defexpire" = "$RET" ] || db_fset noffle/defexpire seen false || :
 	[ "$defexpire" ] && db_set noffle/default-expire "$defexpire" || :
 fi