08-24-2011
SOLVED! (sort of)
The problem was that the script started a vpn-connection and once this is established, I cannot mount the share any more. Therefore, whenever I tried the same command outside the script, it worked, whereas within the script it failed as it was executed after establishing the vpn-connection.
By moving the critical line above the line where the vpn connection was established, the share mounted correctly. Need to trouble-shoot somewhere else now. Thanks a lot for your help!
This User Gave Thanks to slouse For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
For my bash script, terminal with bash is generate an OK output and program works right.
already,
terminal with ash have "line 48: syntax error: Bad substitution" output and program don't work.
:confused: (0 Replies)
Discussion started by: s. murat
0 Replies
2. UNIX for Dummies Questions & Answers
In all of my brief and superficial experience with Unix or Linux, the one curious and consistent thing has been that 'cd ./' (back up one directory level) has done absolutely nothing in any of them. Now I understand that, at least for bash, 'cd ./' appears to have been substituted by 'cd ..'
Am... (1 Reply)
Discussion started by: SilversleevesX
1 Replies
3. UNIX for Dummies Questions & Answers
The script:
#!/bin/bash
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
w=$(ls *.jpg | wc -l)
x=1
z=0
for file in $(ls *.jpg); do
echo "Evaluating #$x of $w, $file..."
sleep 0.2s
MANY=$(exiv2 -g Exif.Image.Software $file)
if ]
then
exiv2 -M"del Exif.Image.Software" modify $file
echo... (8 Replies)
Discussion started by: SilversleevesX
8 Replies
4. Shell Programming and Scripting
Input file:
2 aux003.net3.com error12
6 awn0117.net1.com error13
84 aux008 error14
29 aux001.ha.ux.isd.com error12
209 aux002.vm.ux.isd.com error34
21 alx0027.vm.net2.com error12
227 dux001.net5.com error123
22 us008.dot.net2.com error121
13 us009.net2.com error129Expected Output:
2... (4 Replies)
Discussion started by: sQew
4 Replies
5. Shell Programming and Scripting
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Discussion started by: shis100
7 Replies
6. Shell Programming and Scripting
Hello everyone,
I am having problems figuring this out.
This script below is supposed to create a list of file names with their "md5sum", in a file "lib-list.txt"
When I run it "sh component-list.sh " I get this:component-list.sh: 4: component-list.sh: function: not found
component-list.sh:... (4 Replies)
Discussion started by: joemb
4 Replies
7. UNIX for Dummies Questions & Answers
Hi All,
I'm completely new to bash scripting and still learning my way through albeit vey slowly.
I need to know where to insert my server names', my ip address numbers through out the script alas to no avail.
I'm also searching on how to save .sh (bash shell) script properly.... (25 Replies)
Discussion started by: profileuser
25 Replies
8. Shell Programming and Scripting
Hello, :)
I've an issue with the creation of a directory, All work without it :mad: So, below, my scripts with the debug output :
#!/bin/bash
# PATHS
HOME_BACKUP="/home/backup"
HOME_SCRIPT="/home/scripts/test/backup_server"
TARGET="/var/www"
# DATE
DATE_Ymd=$(date +%Y-%m-%d)
#... (1 Reply)
Discussion started by: Arnaudh78
1 Replies
9. Shell Programming and Scripting
I've found this script part on the stackoverflow:
if ; then
sudo bash "$0" "$@";
exit "$?";
fi
I realized that sudo bash "$0" "$@"; is the only needed for me.
But the strange thing happens when I move this line outside the IF statement:
sudo bash "$0" "$@"; stops the... (9 Replies)
Discussion started by: boqsc
9 Replies
10. Shell Programming and Scripting
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
LEARN ABOUT CENTOS
ip-netns
IP-NETNS(8) Linux IP-NETNS(8)
NAME
ip-netns - process network namespace management
SYNOPSIS
ip [ OPTIONS ] netns { COMMAND | help }
ip netns { list }
ip netns { add | delete } NETNSNAME
ip netns identify PID
ip netns pids NETNSNAME
ip netns exec NETNSNAME command ...
ip netns monitor
DESCRIPTION
A network namespace is logically another copy of the network stack, with its own routes, firewall rules, and network devices.
By convention a named network namespace is an object at /var/run/netns/NAME that can be opened. The file descriptor resulting from opening
/var/run/netns/NAME refers to the specified network namespace. Holding that file descriptor open keeps the network namespace alive. The
file descriptor can be used with the setns(2) system call to change the network namespace associated with a task.
For applications that are aware of network namespaces, the convention is to look for global network configuration files first in
/etc/netns/NAME/ then in /etc/. For example, if you want a different version of /etc/resolv.conf for a network namespace used to isolate
your vpn you would name it /etc/netns/myvpn/resolv.conf.
ip netns exec automates handling of this configuration, file convention for network namespace unaware applications, by creating a mount
namespace and bind mounting all of the per network namespace configure files into their traditional location in /etc.
ip netns list - show all of the named network namespaces
This command displays all of the network namespaces in /var/run/netns
ip netns add NAME - create a new named network namespace
If NAME is available in /var/run/netns/ this command creates a new network namespace and assigns NAME.
ip netns delete NAME - delete the name of a network namespace
If NAME is present in /var/run/netns it is umounted and the mount point is removed. If this is the last user of the network names-
pace the network namespace will be freed, otherwise the network namespace persists until it has no more users. ip netns delete may
fail if the mount point is in use in another mount namespace.
ip netns identify PID - Report network namespaces names for process
This command walks through /var/run/netns and finds all the network namespace names for network namespace of the specified process.
ip netns pids NAME - Report processes in the named network namespace
This command walks through proc and finds all of the process who have the named network namespace as their primary network names-
pace.
ip netns exec NAME cmd ... - Run cmd in the named network namespace
This command allows applications that are network namespace unaware to be run in something other than the default network namespace
with all of the configuration for the specified network namespace appearing in the customary global locations. A network namespace
and bind mounts are used to move files from their network namespace specific location to their default locations without affecting
other processes.
ip netns monitor - Report as network namespace names are added and deleted
This command watches network namespace name addition and deletion events and prints a line for each event it sees.
EXAMPLES
ip netns list
Shows the list of current named network namespaces
ip netns add vpn
Creates a network namespace and names it vpn
ip netns exec vpn ip link set lo up
Bring up the loopback interface in the vpn network namespace.
SEE ALSO
ip(8)
AUTHOR
Original Manpage by Eric W. Biederman
iproute2 16 Jan 2013 IP-NETNS(8)