Le 29/01/2016 17:32, Isaac Dunham a écrit :
for opt in $#; do
case "$opt" in
(*=*) eval "$opt"
;;
esac
done
exec busybox init $@
Isaac,
I understand what that the loop sets environment variables that
init will inherit, but what's the purpose of the $@ at the end. It's now
useless and init is going to wipe it out anyway. Did I miss something?
Le 29/01/2016 17:50, Nicolas CARRIER a écrit :
Is it even possible ? Won't it suffer from the lack of proc / sys and
dev ? Environment variables setup by init ?
What's more, there is a risk to spawn multiple processes (eval ?)
before init is launched and the previous questions do apply.
The first command in your script may be 'busybox mount -t proc proc
/proc' . I don't think you need /sys and /dev. Mounting /sys is as easy
as 'busybox mount -t sysfs sys /sys'.
The processes created in the mean time have no consequence: you
terminate your script with 'exec init'; this does not cause any fork. It
is the same process which continues with the new init, and still pid1.
Didier
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox