SPAM: Re: [Pm-utils] various errors in pm/functions
Stefan Seyfried
seife at suse.de
Tue Oct 10 09:43:34 PDT 2006
On Tue, Oct 10, 2006 at 12:07:27PM -0400, Peter Jones wrote:
> > > -. /etc/rc.d/init.d/functions
> > > +[ -e /etc/rc.d/init.d/functions ] && . /etc/rc.d/init.d/functions
> >
> > Looks very sane.
>
> I don't think we're currently using anything from there at all; at one
> point we were getting "success" and "failure" from that, but now we're
> output-free, so we don't use them any more. I'll take it out and test
> to be sure.
I'd say it this way: i do not have it, and i did not notice anything missing
;-)
> > > Index: pm/functions
> > > ===================================================================
> > > RCS file: /cvs/pm-utils/pm-utils/pm/functions,v
> > > retrieving revision 1.20
> > > diff -u -p -r1.20 functions
> > > --- pm/functions 28 Sep 2006 21:25:36 -0000 1.20
> > > +++ pm/functions 5 Oct 2006 15:39:47 -0000
> > > @@ -33,10 +33,10 @@ source_configs
> > >
> > > take_suspend_lock()
> > > {
> > > - VT=$(/usr/bin/fgconsole)
> > > + VT=$(PATH=/bin:/usr/bin fgconsole)
> > > chvt 63
> > > if [ -f /.suspended ]; then
> > > - pid=$(cat /.suspended)
> > > + read pid < /.suspended
> > > if [ -d /proc/$pid ]; then
> > > return 1
> > > fi
> You know, I don't like either approach much. We ought to just be
> setting a sane PATH at the top of the script, and trusting the distro
> not to have more than one program named "fgconsole" sitting in a common
> place.
That's fine with me (i'd probably go for PATH="/sbin:/bin:/usr/sbin:/usr/bin")
I thought it was hardcoded for speed.
The abuse of the sweet little kitten is still valid, though :-)
--
Stefan Seyfried
QA / R&D Team Mobile Devices | "Any ideas, John?"
SUSE LINUX Products GmbH, Nürnberg | "Well, surrounding them's out."
More information about the Pm-utils
mailing list