source: n4d-network/trunk/fuentes/install/usr/share/n4d-network/list_internal_interfaces @ 144

Last change on this file since 144 was 144, checked in by hectorgh, 5 years ago

adding project files

  • Property svn:executable set to *
File size: 587 bytes
Line 
1#!/usr/bin/env python
2import os.path
3import json
4path_var = "/var/lib/n4d/variables-dir/INTERNAL_INTERFACE"
5if os.path.exists( path_var ):
6        fd = open(path_var,'r')
7        var = json.load(fd)
8        try:
9                result = var['INTERNAL_INTERFACE']['value'].encode('UTF-8')
10                if (type(result) == type('')):
11                        print result
12                elif (type(result) == type([])):
13                        print " ".join(result)
14                else:
15                        print ""
16        except:
17                print ""
18else:
19        print ""
Note: See TracBrowser for help on using the repository browser.