Running a New Process

From: Fabio (fabio_at_anti-spam.inet.alpha.pl)
Date: 12/23/03


Date: Tue, 23 Dec 2003 16:54:26 +0100

Hello,

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 //192.168.0.1/xxx /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

# WARNING:
# 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



Relevant Pages

  • Running a New Process
    ... I want to connect to the MS SQL Server database, get some records, store ... First steps are quite easy but using the VPN connection makes me feel ... How can I start the VPN client from the Perl script? ...
    (comp.lang.perl.misc)
  • Re: Fighting the dialup side effects
    ... traffic routing per se. ... with the fact that a regular PING stops reaching internet hosts after ... previously is for VPN client connections, if this is a VPN connection, the ... At least the built-in VPN client from Microsoft ...
    (microsoft.public.windows.server.dns)
  • Re: Weird Loss of Connectivity Issue -- Help?
    ... Hard reset the cable gateway. ... When the VPN client is installed on my machine I can usually browse normally. ... If I lose my browsing ability, initiating a VPN connection restores it, and keeps it restored for some time AFTER I drop the VPN connection. ... If I uninstall the Cisco VPN client, I lose all browser connectivity. ...
    (comp.security.firewalls)
  • how to upload files thru https
    ... SQL server via a VPN connection with ADO.NET, ... processed data in XML format thru FTP. ... Can I upload data via http/https, ...
    (microsoft.public.vb.general.discussion)
  • Re: Data Transfer Question
    ... anyway even without a VPN you'll need to collect the data and that's still step 1. ... I might consider storing the data in a local SQL Server Compact database and simply sync with a remote host. ... and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook) ... If you were using a VPN connection, it would be a lot easier. ...
    (microsoft.public.dotnet.framework.adonet)