Sponsored Content
Full Discussion: How to create mirror?
Top Forums Shell Programming and Scripting How to create mirror? Post 302903023 by nimafire on Friday 23rd of May 2014 01:47:05 PM
Old 05-23-2014
Quote:
Originally Posted by SriniShoo
Capture return code after you try and get from mirror1.
Code:
if [ $answer == 1 ]; then
    wget $MIRROR
RC="$?"
if [[ "$RC" -ne 0 ]]; then
wget $MIRROR2
fi
    echo "$BACK2MENU" ; read
fi

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.
Code:
if [ $answer = 1 ]; then
    wget $MIRROR || wget $MIRROR2
    echo "$BACK2MENU" ; read
fi

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,
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

create raidctl mirror with mounted source parition

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)
Discussion started by: csgonan
2 Replies

2. Solaris

Create a logical volume from a mirror and single disk?

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)
Discussion started by: dotcom75
3 Replies

3. Solaris

ZFS Mirror versus Hardware Mirror

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)
Discussion started by: Lespaul20
3 Replies

4. Solaris

What is mirror and sub mirror in RAID -1 SVM

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)
Discussion started by: vr_mari
7 Replies

5. Solaris

How to create mirror disk in solaris machine?

hi, I'm newbie in Solaris 10. can someone explain me the steps of how to create mirror disk in Solaris machine. thanks in advance (5 Replies)
Discussion started by: Wong_Cilacap
5 Replies

6. Solaris

Create a boot disk mirror on Solaris 10 x86

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)
Discussion started by: TKD
6 Replies

7. Solaris

How to reattach a mirror?

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)
Discussion started by: brownwrap
7 Replies

8. Solaris

Second Mirror is not booting !

zpool status -v below my mirrors in Solaris 10 config: NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 c3t0d0s0 ONLINE 0 0 0 ... (2 Replies)
Discussion started by: top.level
2 Replies

9. HP-UX

What is the difference between DRD and Root Mirror Disk using LVM mirror ?

what is the difference between DRD and Root Mirror Disk using LVM mirror ? (3 Replies)
Discussion started by: maxim42
3 Replies
PULL-DEBIAN-SOURCE(1)					      General Commands Manual					     PULL-DEBIAN-SOURCE(1)

NAME
pull-debian-source - download and extract a source package from Debian SYNOPSIS
pull-debian-source [options] <source package> [release|version] DESCRIPTION
pull-debian-source downloads and extracts the specified version of source package, or the latest version in the specified Debian release. pull-debian-source will try the preferred mirror, default mirror, security mirror, and fall back to Launchpad or snapshot.debian.org, in search of the requested version. OPTIONS
source package The source package to download from Debian. release The release to download the source package from. Defaults to unstable. version The specific version of the package to download. -d, --download-only Do not extract the source package. -m DEBIAN_MIRROR, --mirror=DEBIAN_MIRROR Use the specified mirror. Should be in the form http://ftp.debian.org/debian. If the package isn't found on this mirror, pull-debian-source will fall back to the default mirror. -s DEBSEC_MIRROR, --security-mirror=DEBSEC_MIRROR Use the specified mirror. Should be in the form http://security.debian.org. If the package isn't found on this mirror, pull-debian-source will fall back to the default mirror. --no-conf Do not read any configuration files, or configuration from environment variables. -h, --help Display the usage instructions and exit. ENVIRONMENT
All of the CONFIGURATION VARIABLES below are also supported as environment variables. Variables in the environment take precedence to those in configuration files. CONFIGURATION VARIABLES
The following variables can be set in the environment or in ubuntu-dev-tools(5) configuration files. In each case, the script-specific variable takes precedence over the package-wide variable. PULL_DEBIAN_SOURCE_DEBIAN_MIRROR, UBUNTUTOOLS_DEBIAN_MIRROR The default value for --mirror. PULL_DEBIAN_SOURCE_DEBSEC_MIRROR, UBUNTUTOOLS_DEBSEC_MIRROR The default value for --security-mirror. SEE ALSO
dget(1), pull-debian-debdiff(1), pull-lp-source(1), ubuntu-dev-tools(5) ubuntu-dev-tools 22 January 2011 PULL-DEBIAN-SOURCE(1)
All times are GMT -4. The time now is 11:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy