Port BB ext script to Hobbit
Hey guys,
Just wondering what is required to port a BB ext script from somewhere like Deadcat over to the hobbitclient ? I've had a poke and it looks as it the hobbit client sets all of the old $BB variables so the script should be fine but Im still having troubles cos I a script newb :)
This raid monitor script is the only one I managed to get working on one of the boxes here so I'd prefer to stick with it. As far as I know the script should be fine although the line where it execs bbedf.sh obviously wont work so I'm assuming this is why the hobbitlaunch.cfg sets the ENVFILE ?
Script is attached, if anyone could have a look and let me know whats up it would be GREATLY appreciated
Cheers
Allan
On Mon, Jun 05, 2006 at 11:01:49AM +1000, ZanDAhaR wrote:
This raid monitor script is the only one I managed to get working on one of the boxes here so I'd prefer to stick with it. As far as I know the script should be fine although the line where it execs bbedf.sh obviously wont work so I'm assuming this is why the hobbitlaunch.cfg sets the ENVFILE ?
Correct. You could delete the BB setup lines if you like, but since they are inside an 'if test "$BB..." = ""' section, it doesn't matter.
I'm actually using this script on the Hobbit demo site :-) The only things I've changed are really bugs in the script:
TEST="raid" RAID_DEVICES=
df -k | grep ^/dev/md | wc -l
Didn't work for me. I've changed that one to
RAID_DEVICES=grep "^md[0-9]*.*:" /proc/mdstat|wc -l
i=0 while [ "$i" -le "$RAID_DEVICES" ] do
This shows up three times in the script. It runs through the loop one time too many, so I changed those three occurrences to use "-lt" instead of "-le":
i=0 while [ "$i" -lt "$RAID_DEVICES" ] do
Regards, Henrik
Henrik Stoerner wrote:
On Mon, Jun 05, 2006 at 11:01:49AM +1000, ZanDAhaR wrote:
This raid monitor script is the only one I managed to get working on one of the boxes here so I'd prefer to stick with it. As far as I know the script should be fine although the line where it execs bbedf.sh obviously wont work so I'm assuming this is why the hobbitlaunch.cfg sets the ENVFILE ?
Correct. You could delete the BB setup lines if you like, but since they are inside an 'if test "$BB..." = ""' section, it doesn't matter.
I'm actually using this script on the Hobbit demo site :-) The only things I've changed are really bugs in the script:
TEST="raid" RAID_DEVICES=
df -k | grep ^/dev/md | wc -lDidn't work for me. I've changed that one to RAID_DEVICES=
grep "^md[0-9]*.*:" /proc/mdstat|wc -li=0 while [ "$i" -le "$RAID_DEVICES" ] do
This shows up three times in the script. It runs through the loop one time too many, so I changed those three occurrences to use "-lt" instead of "-le":
i=0 while [ "$i" -lt "$RAID_DEVICES" ] do
Regards, Henrik
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
Ok well ill be buggered if I know whats going on, I tried those changes and I got a wc: broken pipe. So I put back the original file and it actually works now which is completely wacked.
I'll have more of a play now that its actually working :)
Cheers Henrik
Allan
The bb-raid-1_2b.sh works out of the box with hobbit, along with the bb-cpu2-3_9.sh script
From: ZanDAhaR <allan at zandahar.net> Reply-To: <hobbit at hswn.dk> Date: Mon, 05 Jun 2006 16:24:09 +1000 To: <hobbit at hswn.dk> Subject: Re: [hobbit] Port BB ext script to Hobbit
Henrik Stoerner wrote:
On Mon, Jun 05, 2006 at 11:01:49AM +1000, ZanDAhaR wrote:
This raid monitor script is the only one I managed to get working on one of the boxes here so I'd prefer to stick with it. As far as I know the script should be fine although the line where it execs bbedf.sh obviously wont work so I'm assuming this is why the hobbitlaunch.cfg sets the ENVFILE ?
Correct. You could delete the BB setup lines if you like, but since they are inside an 'if test "$BB..." = ""' section, it doesn't matter.
I'm actually using this script on the Hobbit demo site :-) The only things I've changed are really bugs in the script:
TEST="raid" RAID_DEVICES=
df -k | grep ^/dev/md | wc -lDidn't work for me. I've changed that one to RAID_DEVICES=
grep "^md[0-9]*.*:" /proc/mdstat|wc -li=0 while [ "$i" -le "$RAID_DEVICES" ] do
This shows up three times in the script. It runs through the loop one time too many, so I changed those three occurrences to use "-lt" instead of "-le":
i=0 while [ "$i" -lt "$RAID_DEVICES" ] do
Regards, Henrik
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
Ok well ill be buggered if I know whats going on, I tried those changes and I got a wc: broken pipe. So I put back the original file and it actually works now which is completely wacked.
I'll have more of a play now that its actually working :)
Cheers Henrik
Allan
participants (3)
-
allan@zandahar.net
-
henrik@hswn.dk
-
rdeal@tigr.ORG