some oddities with fsck and boot -s

YONETANI Tomokazu qhwt+dfly at les.ath.cx
Sat Dec 3 16:07:57 PST 2005


On Sat, Dec 03, 2005 at 10:24:03AM -0800, Matthew Dillon wrote:
> 
> :On Fri, Dec 02, 2005 at 09:15:12AM -0800, Matthew Dillon wrote:
> :> :another thing is sh's default PATH (just /bin and /usr/bin) after
> :> :booting to single user mode via boot -s; can we add /sbin and /usr/sbin?
> :> 
> :>     I'll fix the /bin/sh path problem right now.  That's always bothered 
> :>     me.
> :
> :I saw this every time going into single user mode via `shutdown now'.
> :IIRC, this started only recently, because I've never had to adjust $PATH
> :to use, for example, fsck.  What happened to the default $PATH for single
> :user mode?
> 
>     That's probably a different path.  If it still occurs now then its a
>     path inherited from the init process rather then the default path when
>     no PATH environment exists.  The boot -s issue was simply /bin/sh being
>     run without a PATH environment at all and getting an internal default.

Oops, sorry, I realized that I recently commented out `PATH=' line in
~root/.profile to try to use the default path configured by login.conf,
and that was why the $PATH in single user mode suddenly became just
/bin:/usr/bin .  With `PATH=' uncommented, I have /sbin, /usr/sbin and
so on even if I haven't updated /bin/sh yet.
That ~root/.profile was inherited from the days when this machine was
running FreeBSD, which installed dot-files from /usr/share/skel (or maybe
installed by mergemaster before we switched to `make upgrade').





More information about the Bugs mailing list