[OE-core] [PATCH 2/8] initscripts: add setup-commands.sh
Phil Blundell
pb at pbcl.net
Sat Nov 9 23:00:34 UTC 2013
On Sat, 2013-11-09 at 13:28 +0800, Qi.Chen at windriver.com wrote:
> +for dir in /usr/bin /usr/sbin; do
> + if [ ! -e $dir ]; then
> + if [ "$VERBOSE" != "no" ]; then
> + echo "WARN: $dir missing, setting up links to busybox"
> + fi
> + mkdir -p $dir
> + for suffix in ".nosuid" ".suid" ""; do
> + if [ ! -e /etc/busybox.links${suffix} ]; then
> + continue
> + fi
> + usr_commands=`grep "$dir" /etc/busybox.links${suffix}`
> + for command in $usr_commands; do
> + ln -sf /bin/busybox${suffix} $command
> + done
This seems slightly bogus for a number of reasons:
1. initscript doesn't obviously rdepend on busybox so it's not obvious
that the latter will always be available;
2. it should probably be using ${base_bindir} and ${bindir} rather than
hardcoding absolute paths.
3. the whole idea of creating a shadow "/usr/bin" underneath what's
meant to be a mountpoint seems rather dubious to me.
4. this seems like distro policy and not something that really belongs
in oe-core at all. For systems where ${bindir} and ${base_bindir} are
on the same filesystem (or even are the same directory) this script will
just make bootup slower without achieving anything useful.
p.
More information about the Openembedded-core
mailing list