The Following User Says Thank You to anthonie For This Useful Post: | ||
|
2013-03-19
, 01:03
|
Posts: 43 |
Thanked: 45 times |
Joined on Jun 2010
@ Sweden
|
#352
|
|
2013-03-19
, 09:58
|
|
Posts: 5,028 |
Thanked: 8,613 times |
Joined on Mar 2011
|
#353
|
|
2013-03-19
, 11:12
|
Posts: 1,048 |
Thanked: 1,127 times |
Joined on Jan 2010
@ Amsterdam
|
#354
|
cat /usr/sbin/gainroot
cat /usr/bin/root
The Following 2 Users Say Thank You to anthonie For This Useful Post: | ||
|
2013-03-19
, 14:43
|
Posts: 43 |
Thanked: 45 times |
Joined on Jun 2010
@ Sweden
|
#355
|
@sowwhatyoureap
I'd need to look into that man-problem you're having there as I don't have it on my N900 at the moment. I'll see if I can do that later today.
|
2013-03-19
, 15:41
|
Posts: 1,048 |
Thanked: 1,127 times |
Joined on Jan 2010
@ Amsterdam
|
#356
|
Although the question remains -- if the user is changed to root via sudo gainroot, why doesn't commands (such as alias) in /etc/profile get executed? From what I've read, /etc/profile is suppose to be global, so why does the "sudo gainroot" ignore that?
# sudo apt-get update
cat /etc/sudoers.d/01sudo
|
2013-03-19
, 20:18
|
Posts: 268 |
Thanked: 1,053 times |
Joined on May 2010
@ The Netherlands
|
#357
|
First, thanks iDont for the awesome job updating and improving the BusyBox package. I literally just today found out that this existed. Was thinking about switching to Bash a while earlier since I needed some utils from there, but seeing as they are available in this package it's all good.
I noticed that the command man is included in the package, and tried it out but there doesn't seem to be any man pages -- man -a returns nothing and /usr/share/man is empty (apart from README). Is it intentional and if so where can I find man pages for download? How much space would all man pages (for default commands and this package) require approximately?
Had a look at the guide you provided but for some reason man just don't want to cooperate... I've set the MANPATH=/usr/share/man/man1:/usr/share/man (and used export) and placed the unpacked (was .gz in EasyDebian) man page for "find" -- "find.1" -- in the man1 dir but no go. "man find" still complains about "no entry" and "man -a" returns zero entries.
Although the question remains -- if the user is changed to root via sudo gainroot, why doesn't commands (such as alias) in /etc/profile get executed? From what I've read, /etc/profile is suppose to be global, so why does the "sudo gainroot" ignore that?
The Following 6 Users Say Thank You to iDont For This Useful Post: | ||
|
2013-03-19
, 20:28
|
Posts: 268 |
Thanked: 1,053 times |
Joined on May 2010
@ The Netherlands
|
#358
|
iDont, Imve just noticed new update to busybox-power. I hope, that you won't forget about thumb users Thanks a lot for keeping it updated!
/Estel
|
2013-03-20
, 01:10
|
Posts: 43 |
Thanked: 45 times |
Joined on Jun 2010
@ Sweden
|
#359
|
I am not sure if I understood your question correctly and perhaps you could be more explicit about the format of the alias and/or the error message you get, but allow me speculate a bit.
alias ll='ls -lp' alias l='ls -lAp'
You got me thinking, by the way. I could probably make busybox-power provide man-db-n900 and set it up so it will read man pages from /opt/man by default (and include BusyBox' man page by default in /opt/man/). This way, you won't have to install man-db-n900, as busybox-power provides everything you need. I smell a new feature for an upcoming busybox-power release .
Try setting "MANPATH=/usr/share/man". And don't extract the .gz archive, just place it in /usr/share/man/*/ as-is, e.g. /usr/share/man/man1/find.1.gz.
That should work.
sh: gtbl: not found sh: nroff: not found
Basically, the login shell is responsible for some several things, e.g. parsing /etc/profile and setting up your environment. When sudo is ran without -i (simulate initial login), the command you're trying to run as root won't get passed to root's default login shell, hence /etc/profile won't get parsed.
|
2013-03-20
, 09:35
|
Posts: 1,808 |
Thanked: 4,272 times |
Joined on Feb 2011
@ Germany
|
#360
|
So if I've understood correctly: in the case of "sudo gainroot", since it doesn't enter a login shell, it should instead source "~/.bashrc" if it exists. This applies to bash shell, but what happens in the BusyBox case as it uses ash instead? Where should I put my custom commands to be sourced at startup, i.e. which file does it source for non-login shells? Briefly tried modifying /root/.bashrc and copied it to /home/user and but no go -- probably not so surprising as it's not running bash.
HISTFILE=/root/.ash_history /bin/sh
HISTFILE=/root/.ash_history ENV=/root/.bashrc /bin/sh
The Following 6 Users Say Thank You to reinob For This Useful Post: | ||
http://www.schweikhardt.net/man_page_howto.html
This link will provide you with more information than you need but have a look anyway
download free linux books
online linux guides
download n900: service manual level 1-4