On Mon, 2005-10-31 at 22:59 +0000, Christoph Zwerschke wrote:=20
> > I am running a Debian variant and ran update-rc.d to create the =
proper
> > rcX.d entries for my run levels. These are symbolic links to the
> > symbolic link in /etc/init.d. The problem is that now the startup =
script
> > reports /etc/init.d as my $WORK_DIR
>=20
> Good you found that problem, Seth.
>=20
> You're right, the link should be followed recursively (or at least 2=20
> steps should be resolved). The non-generic scrips use "readlink -f" =
for=20
> this purpose which does just that.
>=20
> However, since readlink is not available everywhere as a command, I =
have=20
> used the Python readlink() function instead for the generic script=20
> (since we may safely assume Python is installed when starting Webware...=
=20
> ;-)) and somehow believed it would work recursively.
>=20
> As an ad hox fix I suggest replacing
>=20
> PY_CMD=3D"import os;print os.readlink('$0')"
>=20
> with something like this:
>=20
> PY_CMD=3D"import os;p=3D'$0'
> while os.path.islink(p):
> p=3Dos.readlink(p)
> print p"
>=20
> I have not tested this, but if it works and nobody has a better idea, =
I=20
> will check that in for version 0.9.
Works perfectly for me :-) Thanks for your speedy response.
> Also, you said that you're using a Debian variant (Ubuntu?).
You deduced well.
> Does the Debian start script not work for you? Where's the difference?
I hadn't tried it yet with this project. I was just starting with what I
thought was the lowest common denominator and was then going to improve
on it from there. I have since tried the Debian script and it worked
just fine out of the box.
-Seth
--=20
Seth Remington <sremington@...>
|