11-13-2013
Mount fails (because remote machine is off) bash script stops
Hi,
I'm trying to automate a couple of mounts. (I would do this in fstab, but the auto feature causes the virtual machine I'm running in to freeze when it boots up) If the machine I'm trying to connect to is OFF, I get the host unreachable error and then the bash script stops. The problem is that there were other mounts in the script that could execute because the script stopped early when a machine couldn't mount.
Is there a way for the bash script not to stop if it can't mount/connect to a machine?
Thanks,
-J
CentOS release 6.4 (Final)
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch
rinting-4.0-amd64
rinting-4.0-noarch
CentOS release 6.4 (Final)
CentOS release 6.4 (Final)
Last edited by jdilts; 11-13-2013 at 03:45 PM..
Reason: software version
8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi unix guru's
i am new to unix shell programming.
i found a trouble in executing a script(bali.ksh) which is available on serverA with username xyza, this script contains sqlplus command to retrive the data from the database available on other serverC.
Now i need to run the above script... (4 Replies)
Discussion started by: balireddy_77
4 Replies
2. UNIX for Advanced & Expert Users
if i have a script in my system which i need to run on remote system using ssh, how shall i do it?
One easy way to to first scp it to remote machine and then run it on remote machine using ssh.
Is there any one step way to do it. Preferably one in which i should give password only once (3 Replies)
Discussion started by: vickylife
3 Replies
3. Shell Programming and Scripting
hi,
i have a script that runs on bash and would like to run it on a machine that has csh and bash. the default setting on that machine is csh. i dont want to change my code to run it with a csh shell. is there any way i can run the script (written in bash) on this machine? in other words is there... (3 Replies)
Discussion started by: npatwardhan
3 Replies
4. UNIX for Advanced & Expert Users
Hi All,
This was an interview question
" There is a clean-up shell-script in one UNIX machine and it is connected to 100 other UNIX machines.
Howe can we run the script on all the 100 machines without ftping/copying the script to target machines ?
I was unable to answer, please answer if... (5 Replies)
Discussion started by: coolbhai
5 Replies
5. OS X (Apple)
I have the need to Mount one of my volumes (All machines are mac) onto all of the machines in the lab from time to time. At the moment I'm using SSH to tunnel into each machine and then send a command to the remote machine to mount my volume using AFP.
This seems convoluted to me. Is there a... (3 Replies)
Discussion started by: TheDrizzle
3 Replies
6. Shell Programming and Scripting
Hello,
I'm new to this forum and like to first of all say hello to everyone.
I've got a really annoying problem at the moment.
I'm trying to rsync some files (about 200MB with one file of 120MB) from a Raspberry PI with raspbian to a debian server via rsync.
This procedure is stored in a... (3 Replies)
Discussion started by: wex_storm
3 Replies
7. Shell Programming and Scripting
The following bash script fails with error message: "./phpquery_KNBB_html_reader.sh: line 65: syntax error near unexpected token `done'" when do ./<scriptname> in the shell. However when I copy-paste the entire contents of the file directly into a shell environment it runs ok returning the intended... (2 Replies)
Discussion started by: BurritoSolution
2 Replies
8. Shell Programming and Scripting
Dear members, The following expect script connects to remote node and check for the file "authorized_keys" in directory /root/.ssh in remote node. However the result is always found even if the file exist or doesn't exist.
expect {
"$fname" {
send_user "found\n"
}
Any idea what is... (4 Replies)
Discussion started by: Sudhakar333
4 Replies
LEARN ABOUT CENTOS
lsb_release
FSG(1) FSG FSG(1)
NAME
FSG - manual page for FSG lsb_release v2.0
SYNOPSIS
lsb_release [OPTION]...
DESCRIPTION
FSG lsb_release v2.0 prints certain LSB (Linux Standard Base) and Distribution information.
With no OPTION specified defaults to -v.
OPTIONS
-v, --version
Display the version of the LSB specification against which the distribution is compliant.
-i, --id
Display the string id of the distributor.
-d, --description
Display the single line text description of the distribution.
-r, --release
Display the release number of the distribution.
-c, --codename
Display the codename according to the distribution release.
-a, --all
Display all of the above information.
-s, --short
Use short output format for information requested by other options (or version if none).
-h, --help
Display this message.
FILES
If the installation is LSB compliant, the "/etc/lsb-release" file should contain the LSB_VERSION field. The value of the field should be a
colon separated list of supported module versions indicating the LSB specification modules to which the installation is compliant. If the
installation is not compliant, the above field should not be present.
Optional fields are DISTRIB_ID, DISTRIB_RELEASE, DISTRIB_CODENAME, DISTRIB_DESCRIPTION and can be used to override information which is
parsed from the "/etc/distrib-release" file.
If the "/etc/lsb-release.d" directory exists, it is searched for filenames which are taken as additional module-version strings to add to
LSB_VERSION.
The "/etc/distrib-release" file contains a description line which is parsed to get information (especially on currently non-LSB compliant
systems).
The required line style is:
"Distributor release x.x (Codename)"
Where Distributor can be a couple of words, but then concatenated (i.e. Linux Foo BarLinux Linux -> FooBarLinux),
x.x starts with a digit followed by any non-blank characters, Codename will also be concatenated (blanks cleanup only).
release may not be used as a keyword in DISTRIB_DESCRIPTION if you don't want to override "/etc/distrib-release" data.
Notice: To support the Debian distributions' lack of information (see "/etc/debian_version" file) some have been directly added into the
lsb_release script.
EXAMPLES
If the "/etc/lsb-release" file contains:
LSB_VERSION="core-2.0-ia64:core-2.0-noarch"
DISTRIB_DESCRIPTION="I enjoy using my distrib"
and the "/etc/lsb-release.d" directory contains:
graphics-2.0-ia64 graphics-2.0-noarch
and the "/etc/foobar-release" file contains:
My Linux Distrib release 1.0RC4 (TryIt)
Then the results of various options will be:
$ ./lsb_release --all
LSB Version: core-2.0-ia64:core-2.0-noarch:graphics-2.0-ia64:graphics-2.0-noarch
Distributor ID: MyDistrib
Description: I enjoy using my distrib
Release: 1.0RC4
Codename: TryIt
$ ./lsb_release -a -s
1.0 MyDistrib "I enjoy using my distrib" 1.0RC4 TryIt
If the "/etc/lsb-release" file is absent (indicating this is not an LSB compliant distribution), the result will be:
$ ./lsb_release -a
LSB Version: n/a
Distributor ID: MyDistrib
Description: My Linux Distrib release 1.0RC4 (TryIt)
Release: 1.0RC4
Codename: TryIt
REPORTING BUGS
Report bugs at http://bugs.linuxbase.org. Please include a complete, self contained example that will allow the bug to be reproduced, and
say which version of lsb_release you are using.
COPYRIGHT
Copyright (C) 2000, 2002, 2004 Free Standards Group, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU-
LAR PURPOSE.
Originally written by Dominique MASSONIE.
FSG lsb_release v2.0 June 2014 FSG(1)