Please forgive my ignorance; I've got an AIX/Solaris/Linux background, 
with very little *BSD experience  in my career somehow. So I come here 
with full respect for *BSD, but acknowledging my lack of experience.

I'm quite sure that this is a stupid question....

The reason I ask, is that I'm going to have to do something along these 
lines, this weekend, on hardware I have never seen, and of which I do 
not have any spec other than that it's an IBM NetFinity 5000. I'm 
therefore a bit nervous about turning up with a NetBSD-based CD, only to 
find that the NIC isn't supported, or something. So I've been looking at 
what the script does to give me some chance of a Knoppix-or-similar 
solution doing the same good job if it turns out that there's some weird 
NIC installed, or something.

So I've had a look at the script, to see what I'd need to do to get the 
same thing under Linux, just in case I need to quickly switch OSes 
because of some random hardware config.

The uploadpart script calls dd like this:

# dd if=/dev/r${diskpart} ibs=1m | progress sh ftpput $tmpfile ${gzip_opt}

or to summarise for the sake of word-wrap and simplicity:

# dd if=/dev/foo | progress sh ftpput

whereby ftpput chucks stdin as a file to an FTP server (quite cleverly, 
if I may say so.)

Here comes the "this is stupid, I'm going to regret this..." bit:

What does "progress" do? I can't find a source for it in the src 
tarball. I can see that it's going to take stdin and chuck it out to, 
presumably, ftpput.

So far as I can tell, removing the "progress sh" seems to work fine 
under GNU/Linux. Naturally, I get no status on the progress, which I 
guess is what the progress script provides? Frustratingly, I can't get 
hold of sufficient space to grab an existing partition and dump it 
somewhere to test :-/

So can I conclude that the action of "progress sh ftpput $tmpfile 
${gzip_out}" is to exec ftpput via sh, with ftpput getting the arguments 
"$tmpfile" and "${gzip_out}", whilst (presumably) giving some kind of 
progress report "1Mb... 2Mb... 3Mb ... etc" to (presumably) stderr, 
piping the stdin into the child (ftpput)?

I'm sure it's very simple code, but I'm tripping over myself, not having 
written any C for years :(

Does anybody have the source for "progress"?

Cheers,

Steve.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
g4u-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/g4u-help

Reply via email to