View Single Post
Old 09-03-2012, 01:59 PM   #69
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299993
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
heh. brilliant. sorted it. TBC

Okay, seemingly the OOTB config does not have a ENV value defined

Ash honours this. and a strace confirms that it now reads /home/root/.bashrc

Setting ENV in a .bashrc has it's drawbacks as it will be processed twice.

So - more sensibly - we should probably just set the ENV value at boot to another filename and populate that with the current current .bashrc noise.

Anyways - that is by the by and will be decided in the wash.

Here are some tests.

[root@kindle root]# echo $ENV
(nothing)
[root@kindle root]# su
[root@kindle root]# grep -v
Quote:
BusyBox v1.7.2 (2011-09-08 21:57:14 PDT) multi-call binary
[root@kindle root]# exit


[root@kindle root]# echo $ENV
/home/root/.bashrc
[root@kindle root]# su
[root@kindle root]# grep -v
Quote:
BusyBox v1.20.2 (2012-09-03 02:06:04 BST) multi-call binary.
[root@kindle root]# exit


The ENV value is NOT honored though when calling a single command as is shown here:

[root@kindle root]# echo $ENV
(nothing)
[root@kindle root]# su -c 'grep -v'
Quote:
BusyBox v1.7.2 (2011-09-08 21:57:14 PDT) multi-call binary
[root@kindle root]# echo $ENV
/home/root/.bashrc
[root@kindle root]# su -c 'grep -v'
Quote:
BusyBox v1.7.2 (2011-09-08 21:57:14 PDT) multi-call binary
which is worth noting now, for the future.

however explicitly informing it to use -l does work

[root@kindle root]# su -c 'su -v' -l
su: invalid option -- v
Quote:
BusyBox v1.20.2 (2012-09-03 02:06:04 BST) multi-call binary.
So, this in mind - I'll go hunting down some use cases.
But ostensibly setting the ENV value should do the trick, wherever it one day ends up being done.

Last edited by twobob; 09-03-2012 at 02:23 PM.
twobob is offline   Reply With Quote