Did further testing, and the output has definitely changed to going to 
Standard Error instead of Standard Out.

Running my current image under VirtualBox with busybox 124.2

udhcpc -n -t 8 -T 5 i eth0 -s /udcpc.sh >out1 2>out2

out1 contains following

udhcpc (v1.24.2) started
Sending discover...
Sending select for 192.168.128.101...
Lease of 192.168.128.101 obtained, lease time 43200

out2 contains nothing.

Copied a build of the 1.25.0 busybox and did same command.

./busybox125 udhcpc -n -t 8 -T 5 i eth0 -s /udcpc.sh >out1a 2>out2a

out1a  contains nothing??

out2a contains

udhcpc: started, v1.25.0
udhcpc: sending discover
udhcpc: sending select for 192.168.128.101
udhcpc: lease of 192.168.128.101 obtained, lease time 43200

So, the change is actually causing three issues
Original line in script is like this
  ipaddress=`udhcpc -n -i $device -s./udhcpc.sh | grep Lease | cut -d\  -f3 | 
tr 
-d "\n"`

1. Output needs to be switched from stderr to stdout using 2>&1
2. Since the case of the word I selected to use to select line is changed, 
either case needs to be changed or -i used with grep.
3. With the additional field added to the output, the -f3 has to be changed to 
-f4

  ipaddress=`udhcpc -n -i $device -s./udhcpc.sh 2>&1 | grep Lease | cut -d\  
-f4 | tr -d "\n"`


On 4 Jul 2016 at 16:42, Denys Vlasenko wrote:

From:                   Denys Vlasenko <[email protected]>
Date sent:              Mon, 4 Jul 2016 16:42:15 +0200
Subject:                Re: Question on bb_info_msg, printf, and bb_error_msg?
To:                     "Michael D. Setzer II" <[email protected]>
Copies to:              busybox <[email protected]>

> On Sun, Jun 26, 2016 at 5:06 AM, Michael D. Setzer II
> <[email protected]> wrote:
> > Posted an earlier message about changes in 1.25.0.
> > At the time, I didn't find mention of these in the changes listed, but 
> > didn't
> > know that it was the change from using bb_info_msg to bb_error_msg that
> > was change output to go to stderr instead of stdout. Noticed that other
> > changes have bb_info_msg going to printf? So, what was the problem with
> > bb_info_msg that it needed to be changed?
> 
> bb_info_msg() had only a handful of users, so it looked inconsistent:
> "if most applets can live without it, maybe all of them could?"
> 
> > And why where some changes
> > to printf and other to bb_error_msg?? Also, noted a major changes in the
> > text, where before they started with a capital letter, but now are all lower
> > case?
> 
> Logging messages almost everywhere were emitted via bb_error_msg.
> Thus, bb_info_msg's which were emitting log messages were converted
> to bb_error_msg. Since bb_error_msg prefixes applet name,
> capitalization was changed.
> 
> bb_info_msg's which emitted other messages were converted to printfs,
> IOW: no change in functionality (still goes to stdout, still not prefixed).


+----------------------------------------------------------+
  Michael D. Setzer II -  Computer Science Instructor      
  Guam Community College  Computer Center                  
  mailto:[email protected]                            
  mailto:[email protected]
  Guam - Where America's Day Begins                        
  G4L Disk Imaging Project maintainer 
  http://sourceforge.net/projects/g4l/
+----------------------------------------------------------+

http://setiathome.berkeley.edu (Original)
Number of Seti Units Returned:  19,471
Processing time:  32 years, 290 days, 12 hours, 58 minutes
(Total Hours: 287,489)

BOINC@HOME CREDITS
ABC         16613838.513356   |   EINSTEIN    
103681765.45569545769195.989215
ROSETTA     45769195.989215   |   SETI        86114803.459900

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to