Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ [1] 2 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: man ls- Not Busybox?< Next Oldest | Next Newest >
chaostic Offline





Group: Members
Posts: 328
Joined: Mar. 2005
Posted: May 17 2008,09:47 QUOTE

DSL 3.4.11, gnu-utils.dsl loaded.

When you do "man ls", it returns:
 This is not a BusyBox application.
then it opens up the online netrik man page.

I thought it was an issue with the dsl man script, but it turns out that it is a symlink issue that confuses the man script. /bin/ls is symlinked to "busybox" while every other busybox app is symlinked to "/bin/busybox". The man script expects it to be /bin/busybox (or atleast, the second entry in a array to be busybox).

So, fix the symlink, or change the man script to check if it's a symlink to just "busybox" instead of only "/\/busybox/". I don't know enough perl (natch: or any :P) to offer my own fix.

But, since we are talking about the man script, how hard would it be to add two new flags to it? -o and -b.

-o would force it to check for the app online, even if its in bb, while -b would force to check the bb man page for it.

I'm thinking all it needs is:

Code Sample

# Force online
if ( $app  =~ /^-o$|^--online$/ ) {
    print "Forcing online man check...\n";
    sleep 2;
    $app =  $ARGV[1];
    $grab = $MANUAL . $app . '&section=all';
    system("netrik \"$grab\" 2>/dev/null");
    exit;
}

# Force BB
if ( $app  =~ /^-b$|^--busybox$/ ) {
    print "Forcing BusyBox man check...\n";
    sleep 2;
    $app =  $ARGV[1];
    $grab = 'http://www.busybox.net/downloads/BusyBox.html#item_' . $app;
    system("netrik \"$grab\" 2>/dev/null");
    exit;
}


This would be added after the check for -h/--help and before the actual busybox check.

Oh, and last small man related question, shouldn't there be a backdated copy of the busybox online man page that matches the options available for the v1.2.2 busybox that dsl uses, instead of the 1.10 that is current? Sure the changes arn't that big, but for consistency (and nitpickings :P) sake...


edit: A quick nano on a copy of the man script confirms that the -o and -b code works as expected.

Also, I found a nice Freebsd online man page that can be used by this script (I use OSX which uses freebsd tools that I need to check for), but I'll keep that to myself unless someone wants it (Cause why would dsl need to be able to get freebsd man pages? :P)

edit 2: I also finally got around to figuring out how to change the website used by the man script to the nicer linux.die.net man pages (It redirects http://linux.die.net/man/$app to http://linux.die.net/man/$n/$app depending on which man section the app belongs to, which prevented me from using it before.) Pm if you want it, or ask and I'll add the change (or change if using a flag).
Back to top
Profile PM 
humpty Offline





Group: Members
Posts: 655
Joined: Sep. 2005
Posted: May 18 2008,12:20 QUOTE

i think gnu-utils's 'ls' is not actually part of busybox.
therefore wouldn't it be right to report that it is not ?
Back to top
Profile PM 
^thehatsrule^ Offline





Group: Members
Posts: 3275
Joined: July 2006
Posted: May 18 2008,20:28 QUOTE

Quote
/bin/ls is symlinked to "busybox" while every other busybox app is symlinked to "/bin/busybox".
Back to top
Profile PM 
roberts Offline





Group: Members
Posts: 4983
Joined: Oct. 2003
Posted: May 18 2008,21:25 QUOTE

The symlink will be changed to accomodate the man script.
So man.he.net is no longer working and we now wish to change again, this time, to linux.die.net/man/1/ ?
Back to top
Profile PM WEB 
chaostic Offline





Group: Members
Posts: 328
Joined: Mar. 2005
Posted: May 19 2008,04:34 QUOTE

Quote (roberts @ May 18 2008,17:25)
The symlink will be changed to accomodate the man script.
So man.he.net is no longer working and we now wish to change again, this time, to linux.die.net/man/1/ ?

No, man.he.net is still working. It is just "not as pretty" as linux.die.net, (imho!). I threw that in my message just incase someone would prefer that instead (Hence the PM part).

If it were changed though, it would be:
"netrik "http://linux.die.net/man/$app" 2>/dev/null"
The linux.die.net server automatically finds which man section it belongs in, silently redirecting you to "http://linux.die.net/man/?/$app".
You can double check by going to
"http://linux.die.net/man/ls" and "http://linux.die.net/man/socket"
which redirect to /1/ls and /3/socket, respectfully.

--
Re: Humpty, gnu-utils.dsl only updates some (most) of the base commands, not all (in this case, ls). The core-utils.uci replaces all of them.


edit:
If you wanted to use linux.die.net instead, the full changes would be:

Code Sample

my $MANUAL='http://linux.die.net/man/';

---snip---

else {
   print "This is not a BusyBox application.\n";
   sleep 1;
   $grab = $MANUAL . $app;
#print $grab . "\n"; exit;

}
if ($app=~/^\w+$/) {
       system("netrik \"$grab\" 2>/dev/null");
}
else {
print $usage;
exit;
}
---eof---
Back to top
Profile PM 
7 replies since May 17 2008,09:47 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ [1] 2 >/
reply to topic new topic new poll
Quick Reply: man ls- Not Busybox?

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code