Gentoo Archives: gentoo-dev

From: Christopher Sawtell <csawtell@××××××××××××.nz>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] /{"",usr/}bin path changed. What is the right solution for scripts?
Date: Sun, 01 Apr 2007 07:03:19
Message-Id: 200704011857.57148.csawtell@paradise.net.nz
In Reply to: [gentoo-dev] /{"",usr/}bin path changed. What is the right solution for scripts? by Peter Volkov
1 On Sunday 01 April 2007, Peter Volkov wrote:
2 > Hello.
3 >
4 > Path of some utilities in coreutils-6.7-r1 changed from /usr/bin to /bin
5 > and vice versa. This cause some scripts became broken as they relied on
6 > the full path to executable. The question is: does there exist best
7 > practice on how to avoid this problem in future?
8 Traditionally, all programs needed to boot the machine into single-user mode,
9 together with an editor, were placed in /bin or /sbin. This allowed an
10 administrator to do simple tasks such as simple editing of files in /etc,
11 checking and repairing filesystems, etc.. without having any other partitions
12 being mounted.
13
14 Now-a-days it's probably all a bit moot because we have have bootable CDs and
15 not as important as it used to be, but I am profoundly irritated when I find
16 that when I boot to single user mode on Gentoo/Linux that I have to unmount
17 my non-/ partitions to file check them, and then - even more irritating -
18 have to remember to remount them in order to get a clean reboot, even worse
19 is that vi is unavailable when you are repair mode because it is in /usr/bin.
20 Thus one has to make do with ed. :-(
21
22
23 > Should we set some
24 > default PATH in scripts or should we call "command -p program"? Or as
25 > this is mainly problem for scripts that work in cron we should suggest
26 > users to set PATH in crontab? Or may be we should fix coreutils to
27 > create all possible symlinks?
28
29 --
30 CS
31 --
32 gentoo-dev@g.o mailing list