[Pkg-sysvinit-devel] Bug#553325: Uses different PATH order to /etc/profile.
Trent W. Buck
trentbuck at gmail.com
Fri Oct 30 08:32:13 UTC 2009
Package: initscripts
Version: 2.87dsf-6
Severity: minor
File: /etc/init.d/bootmisc.sh
I wanted to avoid installing unnecessary packages on a tiny system, so
I created symlinks for busybox's utilities in /bin:
# for i in $(busybox | sed '1,/:$/d;y/,/ /')
> do ln -s busybox /bin/$i
> done 2>/dev/null
I thought this was perfectly safe, because /etc/profile places /bin
last in the path -- so if a "real" utility was installed, it would
automatically take precedence over the busybox symlink. For example,
# type -a arping
arping is /usr/sbin/arping
arping is /bin/arping
# which arping
/usr/sbin/arping
In /etc/profile:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
PATH="/usr/local/bin:/usr/bin:/bin:/usr/games"
In /etc/init.d/bootmisc.sh:
PATH=/sbin:/usr/sbin:/bin:/usr/bin
The result is that bootmisc.sh prefers my busybox symlinks to GNU
coreutils, leading to
Cleaning up temporary files...find: unrecognized: -uid
BusyBox v1.14.2 (Debian 1:1.14.2-2) multi-call binary
Usage: find [PATH...] [EXPRESSION]
[...]
Making these busybox symlinks is unusual, so if there is a good reason
for bootmisc.sh to disagree with /etc/profile on the search order
(#354163?), I will understand a WONTFIX. But if it's just an
accident, it'd be convenient for me if they were made the same.
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.30-2-686 (SMP w/1 CPU core)
Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages initscripts depends on:
ii coreutils 7.4-2 The GNU core utilities
ii debianutils 3.2.1 Miscellaneous utilities specific t
ii libc6 2.9-25 GNU C Library: Shared libraries
ii lsb-base 4.0-0ubuntu3 Linux Standard Base 4.0 init scrip
ii mount 2.16.1-4 Tools for mounting and manipulatin
ii sysv-rc 2.87dsf-6 System-V-like runlevel change mech
ii sysvinit-utils 2.87dsf-6 System-V-like utilities
Versions of packages initscripts recommends:
ii e2fsprogs 1.41.9-1 ext2/ext3/ext4 file system utiliti
ii psmisc 22.8-1 utilities that use the proc file s
initscripts suggests no packages.
-- no debconf information
More information about the Pkg-sysvinit-devel
mailing list