Change the initial path from /bin:/usr/bin to /bin:/usr/bin:/sbin:/usr/sbin
authorMatthew Dillon <dillon@dragonflybsd.org>
Fri, 2 Dec 2005 17:16:10 +0000 (17:16 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Fri, 2 Dec 2005 17:16:10 +0000 (17:16 +0000)
when no PATH environment variable is present.  This only really effects
boot -s, and not having [/usr]/sbin has always been an annoyance.

Requested-by: many
bin/sh/var.c

index 2ab3184..8fa8a11 100644 (file)
@@ -35,7 +35,7 @@
  *
  * @(#)var.c   8.3 (Berkeley) 5/4/95
  * $FreeBSD: src/bin/sh/var.c,v 1.15.2.2 2002/08/27 01:36:28 tjr Exp $
- * $DragonFly: src/bin/sh/var.c,v 1.8 2005/04/19 05:18:19 cpressey Exp $
+ * $DragonFly: src/bin/sh/var.c,v 1.9 2005/12/02 17:16:10 dillon Exp $
  */
 
 #include <unistd.h>
@@ -101,7 +101,7 @@ STATIC const struct varinit varinit[] = {
          NULL },
        { &vmpath,      VSTRFIXED|VTEXTFIXED|VUNSET,    "MAILPATH=",
          NULL },
-       { &vpath,       VSTRFIXED|VTEXTFIXED,           "PATH=/bin:/usr/bin",
+       { &vpath,       VSTRFIXED|VTEXTFIXED,           "PATH=/bin:/usr/bin:/sbin:/usr/sbin",
          changepath },
        { &vppid,       VSTRFIXED|VTEXTFIXED|VUNSET,    "PPID=",
          NULL },