[Pm-utils] [PATCH] Add Pardus support into helper functios
Stefan Seyfried
seife at suse.de
Sat Jan 13 07:27:15 PST 2007
On Sat, Jan 13, 2007 at 04:29:49PM +0200, S.Çağlar Onur wrote:
> > I might be wrong here, of course, and i am not LSB-enlightened at all.
>
> Nope you are right, i realize that after sending patch also :) although our
> init system is quite different ill add a status option to our service
> command.
Yes. Even if your system is different, it is probably better to make it
behave like the "rest of the world", so users coming from other distributions
will feel more familiar from the start :-)
> > > + if [ "$?" == "0" ]; then
> > > echo "export ${1}_SERVICE_ACTIVATE=yes" >> /var/run/pm-suspend
> > > - "/etc/init.d/$1" stop 2>&1
> > > + if [ -x "/etc/init.d/$1" ]; then
> > > + "/etc/init.d/$1" stop 2>&1
> > > + elif [ -f /etc/pardus-release ]; then
> > > + service "$1" stop 2>&1
> > > + fi
> >
> > IMO we could unconditionally do 'service "$1" stop' here, at least on my
> > system it would work.
> Thanks for your comments, what about using only service command like
> following?
>
> ...
> service "$1" status 2>/dev/null | grep -c -q running
>
> if [ "$?" == "0" ]; then
> echo "export ${1}_SERVICE_ACTIVATE=yes" >> /var/run/pm-suspend
> service "$1" stop 2>&1
> fi
This is what i meant with my comment "IMO we could unconditionally do
'service "$1" stop' here" above :-)
Let's see what Peter thinks about this.
If there are distribution maintainers around here that know that this
won't work for them, please also speak up now.
> cause we don't have any init scripts on somewhere in filesystem
> (/etc/init.d/$1 check always fails for us), we have a daemon called comar
> which is our configuration manager and our pyhtonic init scripts lays on its
> database :)
Hm, i think i have to take a look at this :-)
Have fun,
Stefan
--
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