[laptop-mode] [PATCH] POSIX complaint head
Alon Bar-Lev
alon.barlev at gmail.com
Mon Jul 14 06:42:28 CEST 2008
POSIX complaint head.
---
--- a/usr/sbin/lm-profiler 2008-06-22 17:33:50.000000000 +0300
+++ b/usr/sbin/lm-profiler 2008-07-05 01:32:22.000000000 +0300
@@ -168,9 +168,9 @@ findinit(){
INITDIR=/etc/rc.d/init.d
fi
if [ "$INITDIR" != "" ] ; then
- INIT=`ls $INITDIR/ |grep ^$1$ |head -1`
+ INIT=`ls $INITDIR/ |grep ^$1$ |head -n 1`
if [ -z "$INIT" ]; then
- INIT=`grep $1 $INITDIR/* |sed s/:.*// |head -1`
+ INIT=`grep $1 $INITDIR/* |sed s/:.*// |head -n 1`
else
INIT="$INITDIR/$INIT"
fi
More information about the laptop-mode
mailing list