Capture return code after you try and get from mirror1.
what RC="$?" exactly do?
and will the data of RC drop ?
example:
i have 10 miror checker in the scriot,
i have to define RC for all of them or change it to RC3 RC4 ?
i want to know the dead time of this variable only
Quote:
Originally Posted by sea
Why not simply re-run wget with mirror2 url, but only if mirror(1) fails.
Saves you another 'if' block.
hth
there are several reason when an error occurred during wget:
sometimes timeout error happened
sometimes file doesnt exist,
sometimes file exist But the server does not have permission to download
in these cases, is this methid work fine? coz all of these situation has their own error number,
RC=$? sets the variable RC, which is a synonym for Return Code, to exactly this, others use 'RET', 'ret', 'return_code' or something alike. $? contains the return code of the previously executed command.
SriniShoo:
run wget
set RC to $?
Compare RC with 0 (success)
If anything else but 0, call wget for mirror2
sea:
run wget
return code is anything but 0, call wget for mirror2
So, yes, either solution will jump in upon any fail.
Of course, you could to handle the error code, in the like of (i didnt check return codes for wget):
hth
Last edited by sea; 05-23-2014 at 03:03 PM..
Reason: added code
OK, I upgraded to the latest version of Solaris 10. Perhaps 'upgrade' isn't the right term because I reinstalled the root/boot drive with Solaris 10. Prior to this I had 4 physical drives. The first two had "/" and "/usr", the other two had a /var/audit and /home. I initially booted from cdrom and... (7 Replies)
I’m setting up a boot disk mirror on Solaris 10 x86. I’m used to doing it on SPARC, where you can copy the partition table using fmthard. My x86 boot disk has 2 primary partitions, a Solaris one and a diagnostic one. Is there a way to copy those 2 primary partitions to the second disk without... (6 Replies)
Hi ,
I am new to SVM .when i try to learn RAID 1 , first they are creating two RAID 0 strips through
metainit d51 1 1 c0t0d0s2
metainit d52 1 1 c1t0d0s2
In the next step
metainit d50 -m d51
d50: Mirror is setup
next step is
metaattach d50 d52
d50 : submirror d52 is... (7 Replies)
I've looked a little but haven't found a solid answer, assuming there is one.
What's better, hardware mirroring or ZFS mirroring? Common practice for us was to use the raid controllers on the Sun x86 servers. Now we've been using ZFS mirroring since U6. Any performance difference? Any other... (3 Replies)
I have two 72GB disks that are mirrored and mounted (/backup). I have a 18GB drive in an array I just attached to the server, which is running Solaris 9.
I need to create a new logical volume partition and make the existing mirror device (/dev/md/dsk/d34) and the array's 18GB drive a member of... (3 Replies)
I am mirroring a single partition drive with raidctl. The source partition was mounted when I created the mirror with raidctl -c c1t1d0 c1t3d0. The source disk was defined with s2 and s6 only.
I didn't think to umount it first.
Is there a problem with that? (2 Replies)