Hi;

13 Oca 2007 Cts 17:27 tarihinde şunları yazmıştınız:
> 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 :-)

Committed to our repo :)

> 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.

So for review here is the updated patch;

Cheers
-- 
S.Çağlar Onur <[EMAIL PROTECTED]>
http://cekirdek.pardus.org.tr/~caglar/

Linux is like living in a teepee. No Windows, no Gates and an Apache in house!
Index: pm/functions
===================================================================
RCS file: /cvs/pm-utils/pm-utils/pm/functions,v
retrieving revision 1.32
diff -u -r1.32 functions
--- pm/functions	30 Nov 2006 20:07:04 -0000	1.32
+++ pm/functions	13 Jan 2007 15:59:38 -0000
@@ -1,6 +1,8 @@
 #!/bin/bash
 
 export PATH=/sbin:/usr/sbin:/bin:/usr/bin
+# To get rid of localized outputs
+export LC_ALL=C
 
 # Default values go here.  It is important to _not_ initialize some
 # variables here.  They are:
@@ -213,17 +215,17 @@
 stopservice()
 {
 	service "$1" status 2>/dev/null | grep -c -q running
-	if [ "$?" == "0" -a -x "/etc/init.d/$1" ]; then
+
+	if [ "$?" == "0" ]; then
 		echo "export ${1}_SERVICE_ACTIVATE=yes" >> /var/run/pm-suspend
-		"/etc/init.d/$1" stop 2>&1
+		service "$1" stop 2>&1
 	fi
 }
 
 restartservice()
 {
-	if [ "x$(eval echo \$${1}_SERVICE_ACTIVATE)" == "xyes" \
-			-a -x "/etc/init.d/$1" ]; then
-		"/etc/init.d/$1" start 2>&1
+	if [ "x$(eval echo \$${1}_SERVICE_ACTIVATE)" == "xyes" ]; then
+		service "$1" start 2>&1
 	fi
 }
 

Attachment: pgp8m48FHiSVF.pgp
Description: PGP signature

_______________________________________________
Pm-utils mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pm-utils

Reply via email to