Nico Golde <[EMAIL PROTECTED]> writes: > Hi, > * Goswin von Brederlow <[EMAIL PROTECTED]> [2005-09-29 16:43]: >> Nico Golde <[EMAIL PROTECTED]> writes: >> > Hi, >> > * Goswin von Brederlow <[EMAIL PROTECTED]> [2005-09-29 16:13]: >> >> Nico Golde <[EMAIL PROTECTED]> writes: >> >> >> >> > tags 330522 + pending >> >> > Hi Lars, >> >> > * Lars Wirzenius <[EMAIL PROTECTED]> [2005-09-29 11:13]: >> >> >> Package: fetchmail >> >> >> Version: 6.2.5-18 >> >> >> >> >> >> The fetchmail postinst script contains the following: >> >> >> >> >> >> adduser --system --ingroup nogroup --home /var/run/fetchmail \ >> >> >> --shell /bin/sh --disabled-password fetchmail >/dev/null 2>&1 >> >> >> || >> >> >> true >> >> >> >> >> >> >> >> >> If the adduser command fails, this manages to hide the fact from the >> >> >> sysadmin. This is not good. >> >> > >> >> > Thanks fixed in svn. >> >> > Regards Nico >> >> >> >> I hope you tested this. The adduser command gives some warnings when >> >> the homedir or user already exists and I think returns an error in >> >> some cases where it shouldn't. The command is for updating the user >> >> info (from older fetchmails) as well as creating the user if it >> >> doesn't exist and both cases should do so quietly. >> > >> > [EMAIL PROTECTED]:/home/nion$ adduser --system --ingroup nogroup --home >> > /var/run/fetchmail \ >> > --shell /bin/sh --disabled-password fetchmail >> > adduser: Warnung: Das von Ihnen angebene Homeverzeichnis existiert bereits. >> > The user `fetchmail' already exists as a system user. Exiting... >> > [EMAIL PROTECTED]:/home/nion$ echo $? >> > 0 >> >> Yes. But now you have 2 extra lines output that should not be there. > > yes but the user should be informed that something failed. i > think that was liw's intention. > regards nico
But it isn't failing there. It is just a useless call to adduser in that particular case. You have to make it not say anything on a normal (recent fetchmail to current fetchmail) upgrade. Something like: if getent passwd fetchmail | grep -q ":/var/run/fetchmail:/bin/sh$"; then : else adduser --system --ingroup nogroup --home /var/run/fetchmail \ --shell /bin/sh --disabled-password fetchmail fi MfG Goswin -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]