|
2013-03-21
, 16:39
|
Posts: 43 |
Thanked: 45 times |
Joined on Jun 2010
@ Sweden
|
#362
|
Busybox's shell (ash) sources the script referenced by the ENV variable, if set.
So you could put your aliases under /root/.bashrc, and then edit /usr/sbin/gainroot and change this line:
toCode:HISTFILE=/root/.ash_history /bin/sh
and you're set.Code:HISTFILE=/root/.ash_history ENV=/root/.bashrc /bin/sh
For a login shell ("root" = "sudo gainroot --use-su" == "sudo su -") /root/.profile will be sourced, which in turn will source /root/.bashrc.
|
2013-03-21
, 17:27
|
|
Posts: 4,118 |
Thanked: 8,901 times |
Joined on Aug 2010
@ Ruhrgebiet, Germany
|
#363
|
if [ `id -u` != 0 ]
then
alias iwpower='sudo iwconfig wlan0 txpower '
else
alias iwpower='iwconfig wlan0 txpower '
fi
The Following 3 Users Say Thank You to peterleinchen For This Useful Post: | ||
|
2013-03-21
, 17:37
|
|
Posts: 4,118 |
Thanked: 8,901 times |
Joined on Aug 2010
@ Ruhrgebiet, Germany
|
#364
|
1.21.0power2 * Apply BusyBox 1.21.0 hotfixes
* Divert busybox binary to /opt/busybox-power
|
2013-03-21
, 18:41
|
Posts: 268 |
Thanked: 1,053 times |
Joined on May 2010
@ The Netherlands
|
#365
|
root = sudo gainroot --use-su = *sudo* su -
just doing "su -" won't work because su = busybox, and busybox (1.20.2power4) is not setuid.
Which leads me to the question (I know there's a newer version, I haven't installed it yet): has the question been settled, whether it's better to have a setuid /bin/busybox or two separate busybox'es (one setuid, the other not).
At least su and ping need that.
Tried that and it apparently did make man locate the page, however running "man find" again I instead get
suggesting that I'm missing commands gtbl and nroff. Googling, these appear to be associated with formatting and rendering the manual pages. Looking at the description for the man-db-n900 package it says it uses the groff suite to format and display man pages, so I guess I'm better off just installing that.Code:sh: gtbl: not found sh: nroff: not found
To complete the offtopic discussion about aliases:
I put a script into /etc/profiles.d/ and put there my aliases common for user and root. For aliases that should be different I put them into a
section.
Not sure if this is unix conform, but it works. And I have all my aliases in one place.
BTT
I just read the change log
Does that mean from this verion on the bb power binary is located on /opt ?
What if I run a shell from early bootstage, i.e. from multiboot/backupmenu. Will there be any bb available then?
I assume not as the link to bb power replaced original bb. This would be a no-go for me. I could live with stock bb available, but I guess that is not the case?
The Following 7 Users Say Thank You to iDont For This Useful Post: | ||
|
2013-03-22
, 09:36
|
Posts: 1,808 |
Thanked: 4,272 times |
Joined on Feb 2011
@ Germany
|
#366
|
So at this moment, the situation wrt su and ping (bug #700) is not resolved. I'm willing to give the busybox split another shot if you like. I haven't actively pursuit this issue because, well, nobody brought it up again until you did (and it doesn't scratch my itch, to put it somewhat bluntly).
By the way, another option would be to compile su (~15KiB) and ping (~25KiB) as separate executables from BusyBox' source and include those in busybox-power's packaging. How do you feel about this option?
The Following 4 Users Say Thank You to reinob For This Useful Post: | ||
|
2013-03-22
, 11:17
|
|
Posts: 5,028 |
Thanked: 8,613 times |
Joined on Mar 2011
|
#367
|
The Following User Says Thank You to Estel For This Useful Post: | ||
|
2013-03-22
, 11:38
|
Posts: 1,808 |
Thanked: 4,272 times |
Joined on Feb 2011
@ Germany
|
#368
|
What you need to do to get BusyBox' man working:
1) export MANPATH
2) install groff-base
3) copy your man pages to $MANPATH
The Following 5 Users Say Thank You to reinob For This Useful Post: | ||
|
2013-03-22
, 15:21
|
Posts: 1,808 |
Thanked: 4,272 times |
Joined on Feb 2011
@ Germany
|
#369
|
Well, does it hurt to have ping and su the way it is not, used only from root privilleges?
/Estel
The Following 3 Users Say Thank You to reinob For This Useful Post: | ||
|
2013-03-22
, 19:30
|
|
Posts: 5,028 |
Thanked: 8,613 times |
Joined on Mar 2011
|
#370
|
Well, for ping I could accept having to be root. But the most common use of su is for *getting root*
Yeah, one could do alias su="sudo /bin/su", but it's not really the same. What if I have two users (e.g. "user" and "luser") and I want to switch from one to the other? su is just for that. sudo is only for getting root.
The Following User Says Thank You to Estel For This Useful Post: | ||
just doing "su -" won't work because su = busybox, and busybox (1.20.2power4) is not setuid.
Which leads me to the question (I know there's a newer version, I haven't installed it yet): has the question been settled, whether it's better to have a setuid /bin/busybox or two separate busybox'es (one setuid, the other not).
At least su and ping need that.