Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 16 Apr 2014, 04:33
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
busybox extras
Post new topic   Reply to topic View previous topic :: View next topic
Page 3 of 5 [71 Posts]   Goto page: Previous 1, 2, 3, 4, 5 Next
Author Message
Ibidem

Joined: 25 May 2010
Posts: 428
Location: State of Jefferson

PostPosted: Sat 08 Jun 2013, 01:42    Post subject:  

scsijon wrote:
thank you ibidem,

I was was leading to the idea that maybe we should add toybox to our 'standard puppy' like aborigonal and others have done to extend some commands without having to use the 'full' command due to lack of functionality with the current busybox's version of a command. It may even allow us to remove some of the full commands we use now.

Alternately, the busybox group maybe need to revisit it's command set and extend a number of them with what users actually now need to have.

My apologies technosaurus for taking your ropic off-topic.

regards to all

What are the BB-NOTUSED applets? Currently on Debian, and I also use a pure busybox system (ie busybox, no gnu coreutils, no fileutils, no utils-linux, no extra text editor, no gnu sed, no gawk, ...), so I can't check atm.
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3860
Location: Kiel,Germany

PostPosted: Sat 08 Jun 2013, 11:01    Post subject:  

bash-3.00#
Code:
for i in /bin /sbin /usr/bin /usr/sbin ; do find $i -type l -iname "*notused"; done

/bin/cp-BB-NOTUSED
/bin/rm-BB-NOTUSED
/bin/sh-BB-NOTUSED
/bin/uname-BB-NOTUSED
/bin/cat-BB-NOTUSED
/bin/mount-BB-NOTUSED
/bin/chmod-BB-NOTUSED
/bin/ps-BB-NOTUSED
/bin/ln-BB-NOTUSED
/bin/head-BB-NOTUSED
/bin/ls-BB-NOTUSED
/bin/df-BB-NOTUSED
/bin/stat-BB-NOTUSED
/bin/dd-BB-NOTUSED
/bin/umount-BB-NOTUSED
/bin/touch-BB-NOTUSED
/bin/sleep-BB-NOTUSED
/bin/mv-BB-NOTUSED
/bin/rmdir-BB-NOTUSED
/bin/xargs-BB-NOTUSED
/sbin/insmod-BB-NOTUSED
/sbin/reboot-BB-NOTUSED
/sbin/mkswap-BB-NOTUSED
/sbin/man-BB-NOTUSED
/sbin/hwclock-BB-NOTUSED
/sbin/lsmod-BB-NOTUSED
/sbin/modprobe-BB-NOTUSED
/sbin/rmmod-BB-NOTUSED
/sbin/fdisk-BB-NOTUSED
/sbin/poweroff-BB-NOTUSED
/usr/bin/find-BB-NOTUSED
/usr/bin/cut-BB-NOTUSED
/usr/bin/uniq-BB-NOTUSED
/usr/bin/sort-BB-NOTUSED
/usr/bin/od-BB-NOTUSED
/usr/bin/head-BB-NOTUSED
/usr/bin/du-BB-NOTUSED
/usr/bin/xargs-BB-NOTUSED
/usr/bin/tac-BB-NOTUSED
/usr/bin/cmp-BB-NOTUSED
/usr/sbin/setfont-BB-NOTUSED
bash-3.00#
Back to top
View user's profile Send private message Visit poster's website 
Karl Godt


Joined: 20 Jun 2010
Posts: 3860
Location: Kiel,Germany

PostPosted: Sat 08 Jun 2013, 11:04    Post subject:  

Am a fan of busybox modprobe , its missing the -D --show-depends option i think . I hate modprobe[-FULL] !

Some are scripts to adjust vars ie reboot, poweroff, df , calling busybox applets in them .

_________________
«Give me GUI or Death» -- I give you [[Xx]term[inal]] [[Cc]on[s][ole]] .
Macpup user since 2010 on full installations.
People who want problems with Puppy boot frugal Razz
Back to top
View user's profile Send private message Visit poster's website 
Ibidem

Joined: 25 May 2010
Posts: 428
Location: State of Jefferson

PostPosted: Sat 08 Jun 2013, 11:39    Post subject:  

Karl Godt wrote:
Am a fan of busybox modprobe , its missing the -D --show-depends option i think . I hate modprobe[-FULL] !

Some are scripts to adjust vars ie reboot, poweroff, df , calling busybox applets in them .

(bb=busybox)
bb modprobe (without "simplified modutils") has -D since at least 1.20.2.
...Does Barry disable "simplified modutils" ?

sh I can see the reason for.
man is replaced with a script + browser (not my own preference, but...)
lsmod I see no logic to: neither bb nor standard has any options.
similar with sleep;
for rmdir bb lacks "--verbose".
for head bb lacks long options and metric units.
...
Back to top
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 4978
Location: Arizona, U.S.A.

PostPosted: Sat 08 Jun 2013, 16:12    Post subject:  

As I understand it... Puppy`s BusyBox isn`t compiled for Puppy.
So Barry disables the BusyBox links and uses the exec. files instead.

BusyBox could be built with the full exec. files instead of the trimmed down ones.
And probably many other apps. could be included; file browser, media player, etc.
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4133

PostPosted: Sun 09 Jun 2013, 01:32    Post subject:  

The biggest difference is to configure with :
Prefer applets
Standalone shell
Run nofork applets directly

There are several options to prefer speed over size, desktop options etc...

Its also useful to change some applets to nofork ... mknod as nofork can cut boot time in half.

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 3779
Location: Gatineau (Qc), Canada

PostPosted: Sat 15 Jun 2013, 22:44    Post subject:  

Hi.

Me grouching again.

Another thing: the busybox cal function always begins the week on Mondays.
I believe half the world finds it less confusing when their week begins on a Sunday.

Maybe the code for busybox cal is a few lines of code shorter that way, but what's
the motive behind ignoring the Christian tradition of beginning the week on a Sunday?
Annoying people?

No one with even a small exposure to social sciences -- better still: nobody tactful --
would have done that.

Developers : please re-instate the full cal in the next Puppy or in your next derivative.

My 2 cents. BFN.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
amigo

Joined: 02 Apr 2007
Posts: 2165

PostPosted: Sun 16 Jun 2013, 01:59    Post subject:  

Here in Germany, the first day of the week -by law- is Monday. This was probably done to clear up a glaring inconsistency in modern Christianity -namely, if one is supposed to observe the 'Sabbath', why is Sunday the Holy Day? Having Monday as the first day of the week makes Sunday the last day of the week.
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3860
Location: Kiel,Germany

PostPosted: Sun 16 Jun 2013, 02:14    Post subject:  

Code:
bash-3.00# cal
     June 2013
Su Mo Tu We Th Fr Sa
                   1
 2  3  4  5  6  7  8
 9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30
bash-3.00# which cal
/bin/cal
bash-3.00# file /bin/cal
/bin/cal: symbolic link to `busybox'
bash-3.00# busybox |head -n2
BusyBox v1.19.4 (2012-04-19 16:14:01 GMT+1) multi-call binary.
Copyright (C) 1998-2011 Erik Andersen, Rob Landley, Denys Vlasenko
bash-3.00#

My BB cal currently defaults to Sunday as first day of the week .
Back to top
View user's profile Send private message Visit poster's website 
L18L

Joined: 19 Jun 2010
Posts: 2473
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: Sun 16 Jun 2013, 05:31    Post subject: Begin of Week
Subject description: Tradition or ISO
 

Code:
# cal
     Juni 2013
So Mo Di Mi Do Fr Sa 

Users: Use osmo if you like to see your weekend include Sunday Laughing
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3860
Location: Kiel,Germany

PostPosted: Sun 16 Jun 2013, 08:49    Post subject:  

It's actually haymonth here . With 12 days-week . 1 day for the god of work . 11 days free . Very Happy
Back to top
View user's profile Send private message Visit poster's website 
musher0


Joined: 04 Jan 2009
Posts: 3779
Location: Gatineau (Qc), Canada

PostPosted: Sun 16 Jun 2013, 15:29    Post subject:  

Embarassed (see picture)
Maybe it depends on the locale parameters that you use?
Still, the real cal offers more choices...
I'll_have_to_eat_my_socks.jpg
 Description   
 Filesize   61.05 KB
 Viewed   233 Time(s)

I'll_have_to_eat_my_socks.jpg


_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
MinHundHettePerro


Joined: 05 Feb 2009
Posts: 844
Location: SE

PostPosted: Sun 16 Jun 2013, 16:53    Post subject:  

Hello Smile!

Speaking of cal, I'm completely lost when I see one of those calendars beginning the week with Sunday. Therefore, I usually patch busybox cal to display Monday as the first day of the week (sorry, no choice of Sun or Mon - not a C-programmer Embarassed ), like:
Code:
diff -ruNt busybox-1.19.4_orig/coreutils/cal.c busybox-1.19.4/coreutils/cal.c
--- busybox-1.19.4_orig/coreutils/cal.c   2012-02-04 20:24:55.000000000 +0100
+++ busybox-1.19.4/coreutils/cal.c   2012-02-11 01:51:33.000000000 +0100
@@ -139,7 +139,7 @@
                 month_names[i] = xstrdup(buf);
 
                 if (i < 7) {
-                        zero_tm.tm_wday = i;
+                        zero_tm.tm_wday = i + 1; /* MHHP: + 1, for Monday as first day of the week */
                         /* abbreviated weekday name according to locale */
                         strftime(buf, sizeof(buf), "%a", &zero_tm);
 #if ENABLE_UNICODE_SUPPORT
@@ -264,7 +264,7 @@
          * 3 Sep. 1752 through 13 Sep. 1752.  Returns Thursday for all
          * missing days.
          */
-        temp = (long)(year - 1) * 365 + leap_years_since_year_1(year - 1) + day;
+        temp = (long)(year - 1) * 365 + leap_years_since_year_1(year - 1) + day - 1; /* MHHP: - 1, for Monday as first day of the week */
         if (temp < FIRST_MISSING_DAY) {
                 dw = ((temp - 1 + SATURDAY) % 7);
         } else {

Fwiw Smile/
MHHP

_________________
Celeron 2.8 GHz, 1 GB, i82845, many ptns, modes 12, 13
Dual Xeon 3.2 GHz, 1 GB, nvidia quadro nvs 285

Slackos & 214X, ... and Q6xx
Nämen, vaf.... ln -s /dev/null MHHP
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3860
Location: Kiel,Germany

PostPosted: Sun 16 Jun 2013, 20:11    Post subject:  

I don't use cal , used it in /sbin/init to compute variables for scheduled file system check .

Really horror to use cal in scripts with that "Ooh the poor not paying anything user needs a pretty output" .

one month one line --option

like -m for machine readable

2013 06:June 01:watday 02:disday 03:dongsday ...

would be really helpful

_________________
«Give me GUI or Death» -- I give you [[Xx]term[inal]] [[Cc]on[s][ole]] .
Macpup user since 2010 on full installations.
People who want problems with Puppy boot frugal Razz
Back to top
View user's profile Send private message Visit poster's website 
L18L

Joined: 19 Jun 2010
Posts: 2473
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: Mon 17 Jun 2013, 07:10    Post subject: cal
Subject description: for Karl
 

Karl Godt wrote:
2013 06:June 01:watday 02:disday 03:dongsday ...

would be really helpful
Code:
f=/tmp/bla;echo;date "+%Y %m:%B">$f;m=`cat $f`;y=${m:0:4};m=${m:5:2};for i in `seq 31`;do date -d $y-$m-$i "+%d:%A">>$f 2>/dev/null;done;grep -v '-' $f|tr '\n' ' ';echo
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 3 of 5 [71 Posts]   Goto page: Previous 1, 2, 3, 4, 5 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0749s ][ Queries: 13 (0.0048s) ][ GZIP on ]