commit e09c76e2aef15005eb61158bd07799d84646ccac
Author: Elan Ruusamäe <[email protected]>
Date:   Thu Mar 6 19:36:19 2014 +0200

    "id" in pld is in /bin, so use from $PATH it instead

 molly-guard.csh |  5 ++---
 molly-guard.sh  | 11 ++++-------
 2 files changed, 6 insertions(+), 10 deletions(-)
---
diff --git a/molly-guard.csh b/molly-guard.csh
index 6fa33cf..53dda5c 100755
--- a/molly-guard.csh
+++ b/molly-guard.csh
@@ -1,10 +1,9 @@
-
 ##
-## debianize $PATH for use with molly-guard
+## update $PATH for use with molly-guard
 ##
 
 # if we're superuser, reorder $PATH if it's wrong to get molly-guard working
-if ( `/usr/bin/id -u` == 0 ) then
+if ( `id -u` == 0 ) then
        # switch sbin entries
        set path = ( `echo ${path} | sed -re 's#(^|\ )/sbin(\ |.*)/usr/sbin(\ 
|$)#\1/usr/sbin\2/sbin\3#'` )
        # switch bin entries
diff --git a/molly-guard.sh b/molly-guard.sh
index c58fa99..917177d 100755
--- a/molly-guard.sh
+++ b/molly-guard.sh
@@ -1,14 +1,11 @@
-
 ##
-## debianize $PATH for use with molly-guard
+## update $PATH for use with molly-guard
 ##
 
 # if we're superuser, reorder $PATH if it's wrong to get molly-guard working
-if [ `/usr/bin/id -u` -eq 0 ]
-then
+if [ $(id -u) = 0 ]; then
        # switch sbin entries
-       PATH=`echo ${PATH} | sed -re 
's#(^|:)/sbin(:|.*)/usr/sbin(:|$)#\1/usr/sbin\2/sbin\3#'`
+       PATH=$(echo ${PATH} | sed -re 
's#(^|:)/sbin(:|.*)/usr/sbin(:|$)#\1/usr/sbin\2/sbin\3#')
        # switch bin entries
-       PATH=`echo ${PATH} | sed -re 
's#(^|:)/bin(:|.*)/usr/bin(:|$)#\1/usr/bin\2/bin\3#'`
-       export PATH
+       PATH=$(echo ${PATH} | sed -re 
's#(^|:)/bin(:|.*)/usr/bin(:|$)#\1/usr/bin\2/bin\3#')
 fi
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/molly-guard.git/commitdiff/fcdba8ef2253e9c69ecd78d5494bc99457b00fec

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to