Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Running a New Process

Thread Tools

Running a New Process

Posts: n/a

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

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Spawn a process, then exit, whilst leaving process running? Victor Hooi Python 1 02-10-2013 03:50 AM
Process.destroy() -- process carries on running? John English Java 0 11-07-2005 05:38 PM
Show up process indicator while process is running then do page redirection Jona ASP .Net 2 09-01-2005 04:03 AM
how to start a new process while the other ist running on Erik Geiger Python 9 12-22-2004 09:25 PM
A process serving application pool 'DefaultAppPool' exceeded time limits during start up. The process id was '216'. jack ASP .Net 0 08-01-2004 09:49 PM