Bug#378970: /var/lib/dpkg/tmp.ci/preinst: line 15: [: too many arguments

2006-07-20 Thread Arnaud Quette
Hi Shaul,long time no see ;-)2006/7/20, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
Package: nutVersion: 2.0.3-4Severity: normalTags: patchWith a fresh install I got:Unpacking nut (from .../archives/nut_2.0.3-4_i386.deb) .../var/lib/dpkg/tmp.ci/preinst: line 15: [: too many arguments
Setting up nut (2.0.3-4) ...Stopping Network UPS Tools:.Starting Network UPS Tools:.Apparently the reason is that I have set up a nut user in /etc/passwdin advance, and that it had some characters in it which confused the
shell. I sugget the following patch:--- nut.preinst  2006-03-13 10:14:40.0 +0200+++ nut.preinst 2006-07-20 07:06:35.0 +0300@@ -4,7 +4,7 @@ . /usr/share/debconf/confmodule
 check_and_create_group() {-   if [ -z `getent group nut` ]; then+   if [ ! "`getent group nut`" ]; thenaddgroup --quiet --system nut #  else #  printf "error: user \"nut\" already exists... see /usr/share/doc/nut/README.Debian\n"  &&  exit 1
@@ -12,7 +12,7 @@ } check_and_create_user() {-   if [ -z `getent passwd nut` ]; then+   if [ ! "`getent passwd nut`" ]; thenadduser --quiet --system --ingroup nut --home /var/lib/nut --no-create-home nut
 #  else #  printf "error: user \"nut\" already exists... see /usr/share/doc/nut/README.Debian\n"  &&  exit 1ok, I'll apply it for the upcoming 
2.0.4thanks,Arnaud-- Linux / Unix Expert - MGE UPS SYSTEMS - R&D DptNetwork UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://people.debian.org/~aquette/OpenSource Developer - http://arnaud.quette.free.fr/


Bug#378970: /var/lib/dpkg/tmp.ci/preinst: line 15: [: too many arguments

2006-07-19 Thread shaulka
Package: nut
Version: 2.0.3-4
Severity: normal
Tags: patch

With a fresh install I got:

Unpacking nut (from .../archives/nut_2.0.3-4_i386.deb) ...
/var/lib/dpkg/tmp.ci/preinst: line 15: [: too many arguments
Setting up nut (2.0.3-4) ...
Stopping Network UPS Tools:.
Starting Network UPS Tools:.

Apparently the reason is that I have set up a nut user in /etc/passwd 
in advance, and that it had some characters in it which confused the
shell. I sugget the following patch:

--- nut.preinst  2006-03-13 10:14:40.0 +0200
+++ nut.preinst 2006-07-20 07:06:35.0 +0300
@@ -4,7 +4,7 @@
 . /usr/share/debconf/confmodule

 check_and_create_group() {
-   if [ -z `getent group nut` ]; then
+   if [ ! "`getent group nut`" ]; then
addgroup --quiet --system nut
 #  else
 #  printf "error: user \"nut\" already exists... see 
/usr/share/doc/nut/README.Debian\n"  &&  exit 1
@@ -12,7 +12,7 @@
 }

 check_and_create_user() {
-   if [ -z `getent passwd nut` ]; then
+   if [ ! "`getent passwd nut`" ]; then
adduser --quiet --system --ingroup nut --home /var/lib/nut 
--no-create-home nut
 #  else
 #  printf "error: user \"nut\" already exists... see 
/usr/share/doc/nut/README.Debian\n"  &&  exit 1




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]