package darkstat 3.0.714+dfsg-1 failed to install/upgrade: Unterprozess installiertes post-installation-Skript gab den Fehlerwert 1 zurück

Bug #1215330 reported by Marco Förtsch
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
darkstat (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

?

ProblemType: Package
DistroRelease: Ubuntu 12.04
Package: darkstat 3.0.714+dfsg-1
ProcVersionSignature: Ubuntu 3.2.0-52.78-generic 3.2.48
Uname: Linux 3.2.0-52-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.0.1-0ubuntu17.4
AptOrdering:
 darkstat: Install
 bridge-utils: Configure
 man-db: Configure
 darkstat: Configure
Architecture: amd64
Date: Wed Aug 21 06:18:14 2013
DuplicateSignature: package:darkstat:3.0.714+dfsg-1:Unterprozess installiertes post-installation-Skript gab den Fehlerwert 1 zurück
ErrorMessage: Unterprozess installiertes post-installation-Skript gab den Fehlerwert 1 zurück
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
MarkForUpload: True
SourcePackage: darkstat
Title: package darkstat 3.0.714+dfsg-1 failed to install/upgrade: Unterprozess installiertes post-installation-Skript gab den Fehlerwert 1 zurück
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Marco Förtsch (linksfall666) wrote :
tags: removed: need-duplicate-check
Revision history for this message
houstonbofh (leesharp) wrote :

It is somewhat ahrd to tell from the report, but this does NOT seem to be a dupe of https://bugs.launchpad.net/ubuntu/precise/+source/darkstat/+bug/902153 ubuntu 11.10 darkstat can`t start.

It dose seem to be a report of what I am experiencing.

After configuring /etc/darkstat/init.cfg darkstat still fails to start, and gives no error or reason why. No logs are generated. However, running purely from the command line works.

It appears that several variables defined /etc/darkstat/init.cfg are overridden after importing by /etc/init.d/darkstat causing it to fail. After commenting out those lines, everything works as expected. This is a quick and dirty fix, not a patch! :)

<partial list of /etc/init.d/darkstat>

PATH=/bin:/usr/bin:/sbin:/usr/sbin
DAEMON="/usr/sbin/darkstat"
NAME="darkstat"
DESC="darkstat network daemon"
INIT="/etc/darkstat/init.cfg"
HOMEDIR="/var/lib/darkstat"
PIDFILE="/var/run/$NAME.pid"
#DIR="/var/lib/darkstat"

test -f $DAEMON || exit 0

test -f $INIT || exit 0

#INTERFACE="-i br0"
#PORT="-p 665"
#BINDIP="-b 192.168.5.35"
#LOCAL=""
#DNS=""
#DAYLOG=""
DB="--import darkstat.db --export darkstat.db"
#FILTER=""

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in darkstat (Ubuntu):
status: New → Confirmed
Revision history for this message
houstonbofh (leesharp) wrote :

Note: That data in the varibles in the file above was from testing... I told you it was dirty. :)

Revision history for this message
Emil Mikulic (darkmoon) wrote :

> After configuring /etc/darkstat/init.cfg darkstat still fails to start, and gives no error or reason why. No logs are generated

Could you please reproduce this with --syslog added to the cmdline flags and work out why it's failing to start?

Revision history for this message
houstonbofh (leesharp) wrote :

No need... It is failing to start because the -i -p and -b attributes defined in init.cfg are being overwritten with "" values in the startup script. To discover this, first I placed the values I needed in the startup script, and things worked. Then I commented those lines out, and the values were pulled from the init.cfg.

Note that the partial file I posted was step three...

#INTERFACE="-i br0"
#PORT="-p 665"
#BINDIP="-b 192.168.5.35"
#LOCAL=""
#DNS=""
#DAYLOG=""

The package file is...

INTERFACE=""
PORT=""
BINDIP=""
LOCAL=""
DNS=""
DAYLOG=""

And my intermediate testing file was...

INTERFACE="-i br0"
PORT="-p 665"
BINDIP="-b 192.168.5.35"
LOCAL=""
DNS=""
DAYLOG=""

I used 665 in the startup file and 666 in the init.cfg just so a "ps -ef" would show where the paramiters were comming from.

Revision history for this message
Emil Mikulic (darkmoon) wrote :

> It is failing to start because the -i -p and -b attributes defined in init.cfg are being overwritten with "" values in the startup script

I'm sorry, I missed this in my first reading.

However, it also doesn't make sense. I just downloaded and unpacked the package I think you're using:

wget http://mirror.internode.on.net/pub/ubuntu/ubuntu/pool/universe/d/darkstat/darkstat_3.0.714+dfsg-1_amd64.deb
ar x darkstat_3.0.714+dfsg-1_amd64.deb
tar zxf data.tar.gz

And ./etc/init.d/darkstat sets a bunch of variables to "", then it does ". $INIT"

Why isn't $INIT overriding the empty strings set in ./etc/init.d/darkstat?

> It appears that several variables defined /etc/darkstat/init.cfg are overridden after importing by /etc/init.d/darkstat

I can't see where this is happening. Could you please upload these two files, verbatim, from your system? Maybe attach them to the bug?

Revision history for this message
houstonbofh (leesharp) wrote :

Here is the /etc/init.d/darkstat file. Like an idiot, I did not keep a backup of the untouched file. :)

And yes, to me it looks like it should not do what it is doing.

Revision history for this message
houstonbofh (leesharp) wrote :

Here is my /etc/darkstat/init.cfg as well.

Revision history for this message
Emil Mikulic (darkmoon) wrote :

I can't reproduce the problem with your darkstat + init.cfg files.
I also reverted the darkstat file to the one from the package, and I still can't reproduce.

Is /bin/sh a symlink to dash?
Please post the output of: ls -l /bin/sh

And also:
/bin/sh -x /etc/init.d/darkstat start

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.