Debian Codegraph @

debian/extra/popp

raw
1 #!/usr/bin/perl -w
2 #
3 # popp connects to your provider and returns. You are able to
4 # see pppd proceed dialing. Once the connection is
5 # established pppd returns.
6 #
7 # Exit Status: taken from pppd
8 #
9 # Example: popp && mailsync
10 #
11 # This will dial your default provider, you will see pppd
12 # progress and as soon as the connection's established, your
13 # mail will get synchronized
14 #
15 # Version: 0.1 28-Dec-2001 "Tomas Pospisek" <[email protected]>
16
17 use strict;
18
19 my $ret;
20
21 my $pid = fork();
22
23 unless ($pid) {
24 # child
25 exec "plog -f";
26 } else {
27 # parent
28 my $provider = "provider" unless @ARGV;
29 $ret = system "pon $provider @ARGV updetach";
30 kill "SIGTERM", $pid;
31 };
32
33 exit $ret / 256; # perlbizzare