469,949 Members | 2,203 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,949 developers. It's quick & easy.

Running a New Process


there's something I'd like to understand...

I want to connect to the MS SQL Server database, get some records, store
them into the text file, send the file through VPN connection and then
send the email message about the task success or failure.

First steps are quite easy but using the VPN connection makes me feel
powerless... How can I start the VPN client from the Perl script?

My script looks like that:

# some lines of code

`sh /etc/init.d/vpnclient_init start` || die "vpn init: $!\n";
system("vpnclient connect default user xxx pwd xxx");
system("smbmount // /mnt/xxx -o username=xxx,password=xxx");

When I run the script it gets the data from SQL Server, creates the text
file and prints out the following text:

# Cisco Systems VPN Client Version 4.0.3 (B)
# Copyright (C) 1998-2003 Cisco Systems, Inc. All Rights Reserved.
# Client Type(s): Linux
# Running on: Linux 2.4.21-144-default #1 Fri Nov 14 00:01:36 UTC 2003 #
# i686

# Using the "pwd" option may allow other users
# on this computer to see your password.

# Initializing the VPN connection.
# Contacting the gateway at XXX.XXX.XXX.XXX
# Authenticating user.
# Negotiating security policies.
# Securing communication channel.
# Your VPN connection is secure.

After printing this text my VPN connection is active and it works fine.
But the following Perl instructions aren't executed. I can use the VPN
connection from another console window but I don't want it to work that
way. All I want is executing the whole Perl script including the
instructions following the VPN connection initialization.

Thanks for any advice.

...:: fabio

Jul 19 '05 #1
0 1890

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Michael Schmitt | last post: by
3 posts views Thread by Billg_sd | last post: by
4 posts views Thread by sneffe | last post: by
4 posts views Thread by commander_coder | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.