Add /usr/sbin and /sbin to user PATH.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Tue, 04 Sep 2012 13:42:33 +0300
changeset 541 550f4a008534
parent 540 790b9f7a52ed
child 542 5674fac0249d
Add /usr/sbin and /sbin to user PATH.
.bashenv
--- a/.bashenv	Sat Sep 01 10:32:47 2012 +0300
+++ b/.bashenv	Tue Sep 04 13:42:33 2012 +0300
@@ -24,8 +24,11 @@
 if [[ ! $PATH =~ $HOME/usr/bin ]]; then
   export PATH=$PATH:~/usr/bin
 fi
-if [[ ! $PATH =~ /usr/sbin ]]; then
-  export PATH=$PATH:/usr/sbin
+if [[ ! :$PATH =~ :/usr/sbin ]]; then
+  export PATH=/usr/sbin:$PATH
+fi
+if [[ ! :$PATH =~ :/sbin ]]; then
+  export PATH=/sbin:$PATH
 fi
 
 if [[ ! $LD_LIBRARY_PATH =~ $HOME/usr/lib ]]; then