Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 31141 - Scripts in /etc/init.d cause strange error in /sbin/runscripts.sh after updating software
Summary: Scripts in /etc/init.d cause strange error in /sbin/runscripts.sh after updat...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-14 11:53 UTC by Randy Kahle
Modified: 2004-10-15 23:51 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Randy Kahle 2003-10-14 11:53:43 UTC
I have updated a machine to the very latest "stable" code. This includes the baselayout changes.

As far as I can tell, I have done everything correctly in the etc-update step.

I now get the following error:

vail:/etc/init.d# ./resin-net.variantia stop 
/sbin/runscript.sh: line 284: unset: `depinfo_#resinDASHnetDOTvariantia#': not a valid identifier
 * Stopping variantia.net web services with Resin...
Stopping Resin                                                                                                                                                                       
[ ok ]
vail:/etc/init.d# 


Reproducible: Always
Steps to Reproduce:
1./etc/init.d/resin-net.variantia start | stop
2.error is reported
3.
Actual Results:  
The service starts and stops as expected, however the error message always appears.

Expected Results:  
The service should start or stop as directed with no error message reported from /sbin/
runscripts.sh

vail:/etc/init.d# emerge info
Portage 2.0.49-r13-2 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1, 2.4.19-gentoo-r10)
============================================================
=====
System uname: 2.4.19-gentoo-r10 i686 Pentium III (Coppermine)
Gentoo Base System version 1.4.3.10p1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium3 -O3 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/
3/share/config /usr/X11R6/lib/X11/xkb /opt/resin/conf"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O2 -mcpu=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="sandbox ccache autoaddcvs"
GENTOO_MIRRORS="http://gentoo.ccccom.com http://adelie.polymtl.ca/ http://
gentoo.noved.org/ ftp://cudlug.cudenver.edu/pub/mirrors/distributions/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 oss apm arts avi crypt cups encode foomaticdb gif gpm imlib jpeg libg++ libwww mad 
mikmod mpeg ncurses nls oggvorbis pdflib png qt quicktime sdl spell svga truetype xml2 xmms 
xv zlib gdbm berkdb slang readline java X tcpd perl python motif opengl gtk -gnome -alsa -kde 
pam ssl -mozilla"
Comment 1 SpanKY gentoo-dev 2003-10-14 12:02:35 UTC
what does `qpkg -I -v /etc/init.d/resin-net.variantia` show ?
what pkg provides that init.d script ?
can you post it here as an attachment ?
Comment 2 Randy Kahle 2003-10-15 07:00:15 UTC
I did not have qpkg on the machine. emerged, then ran `qpkg -l -v /etc/init.d/resin-net.variantia:

vail:/etc/init.d# qpkg -l -v /etc/init.d/resin-net.variantia
vail:/etc/init.d# 

(result is nothing -- this is a custom start-up script)

The script itself:

<<<<<

vail:/etc/init.d# cat resin-net.variantia
#!/sbin/runscript
#
# <<need a header>>
#
# Run script for variantia.net web services
#

depend() {
        need net
        use dns logger mysql postgresql
}

start() {
        ebegin "Starting variantia.net web services with Resin"
        cd /home/web/sites/net.variantia/bin
        su - resin -c "/home/web/sites/net.variantia/bin/resin start"
        eend $?
}

stop () {
        ebegin "Stopping variantia.net web services with Resin"
        cd /home/web/sites/net.variantia/bin
        su - resin -c "/home/web/sites/net.variantia/bin/resin stop"
        sleep 2
        eend $?
}

svc_restart () {
        ebegin "Restarting variantia.net web services"
        cd /home/web/sites/net.variantia.
        su - resin -c "/home/web/sites/net.variantia/bin/resin stop"
        sleep 5
        su - resin -c "/home/web/sites/net.variantia/bin/resin start"
        eend $?
}


>>>>>


The "resin" script:

<<<<<

vail:/etc/init.d# cat /home/web/sites/net.variantia/bin/resin
#!/bin/sh

#
# Controls starting and stopping resin with a virtual domain
#

export SERVER_ROOT="/home/web/sites/net.variantia/"
export RESIN_HOME="/opt/resin/"
export JAVA_HOME="/opt/blackdown-jdk-1.4.1/"

#
# We want to support flipping state if no parameter is set
#

if [ ! -z $1  ]; then
    RESIN_COMMAND=$1
else

    if [ -e $SERVER_ROOT/a.pid ]; then
        RESIN_COMMAND="stop"
    else
        RESIN_COMMAND="start"
    fi
fi

case $RESIN_COMMAND in

  "start") 
    echo "Starting Resin"
    ;;
  
  "stop") 
    echo "Stopping Resin"
    ;;
  
  *)  
    echo "resin [start|stop]"
    exit 1
    ;;
esac


$RESIN_HOME/bin/httpd.sh -server-root $SERVER_ROOT \
                         -conf        $SERVER_ROOT/conf/resin.conf \
                         -pid         $SERVER_ROOT/a.pid   \
                         $RESIN_COMMAND



>>>>>
Comment 3 Martin Schlemmer (RETIRED) gentoo-dev 2003-10-26 13:32:27 UTC
I know where this take place, not sure why though.  Will have a look - possible
changes in CVS might already have fixed this, so try 1.8.6.12 when it hits
portage early next week hopefully.
Comment 4 SpanKY gentoo-dev 2004-10-15 23:51:20 UTC
try 1.9.x or better of baselayout