~ubuntu-branches/ubuntu/precise/openvpn/precise-updates

« back to all changes in this revision

Viewing changes to win/config_tap.py

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-10-05 06:21:14 UTC
  • mfrom: (1.1.16 upstream) (10.2.8 sid)
  • Revision ID: james.westby@ubuntu.com-20101005062114-18lyqud9e3p4g735
Tags: 2.1.3-1ubuntu1
* Merge from debian unstable.  Remaining changes:
  + debian/openvpn.init.d:
    - Do not use start-stop-daemon and </dev/null to avoid blocking boot.
    - Show per-VPN result messages.
    - Add "--script-security 2" by default for backwards compatablitiy
  + debian/control: Add lsb-base >= 3.2-14 to allow status_of_proc()

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import os
 
2
from wb import preprocess, home_fn, autogen, dict_def
 
3
 
 
4
def main(config):
 
5
    preprocess(config,
 
6
               in_fn=home_fn('tap-win32/SOURCES.in'),
 
7
               out_fn=home_fn('tap-win32/SOURCES'),
 
8
               quote_begin='@@',
 
9
               quote_end='@@',
 
10
               head_comment='# %s\n\n' % autogen)
 
11
 
 
12
    preprocess(config,
 
13
               in_fn=home_fn('tap-win32/i386/OemWin2k.inf.in'),
 
14
               out_fn=home_fn('tap-win32/i386/OemWin2k.inf'),
 
15
               quote_begin='@@',
 
16
               quote_end='@@',
 
17
               if_prefix='!',
 
18
               head_comment='; %s\n\n' % autogen)
 
19
 
 
20
    try:
 
21
        os.mkdir(home_fn('tap-win32/amd64'))
 
22
    except:
 
23
        pass
 
24
    preprocess(dict_def(config, [('AMD64', '1')]),
 
25
               in_fn=home_fn('tap-win32/i386/OemWin2k.inf.in'),
 
26
               out_fn=home_fn('tap-win32/amd64/OemWin2k.inf'),
 
27
               quote_begin='@@',
 
28
               quote_end='@@',
 
29
               if_prefix='!',
 
30
               head_comment='; %s\n\n' % autogen)
 
31
 
 
32
# if we are run directly, and not loaded as a module
 
33
if __name__ == "__main__":
 
34
    from wb import config
 
35
    main(config)