blob: 50a6c1a267001ac8b960417415699f219a540929 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# -*- coding: utf-8 -*-
import logging, mv_common
import os, re
config_file = "mv_config"
def windowmanager(systemconfig):
logging.info("____Start of windowmanager setup____")
try:
windowmanager = systemconfig.get("windowmanager")
except:
windowmanager = "default"
return
if windowmanager == "" or windowmanager == None:
windowmanager = "default"
try:
style = systemconfig.get("EnhancedWMStyle")
except:
style = ""
if style == "1" and windowmanager != "default" :
style = "enhanced"
else:
style = ""
if windowmanager != "fluxbox":
mv_common.pacinstall("e16_theme_settings")
mv_common.pacinstall("wmaker_settings")
else:
mv_common.pacinstall("alt_wm")
cmd = '''/usr/LH/bin/set_windowmanager.sh %s %s ''' %(windowmanager,style)
print cmd
mv_common.runcmd(cmd)
logging.info("__End of windowmanager \n")
def supplemental(systemconfig,this_is_install = False):
logging.info("____Start of supplemental config ____")
try:
supplemental=systemconfig.get("supplemental")
except:
supplemental = "0"
if supplemental == "1":
logging.info(" Installing supplemental system\n")
if this_is_install == True:
if os.path.exists('/home/xymon/server'):
cmd='''pacman --noconfirm --dbonly -Sdd --force xymonserver'''
mv_common.runcmd(cmd)
cmd='''/usr/LH/bin/install_supplemental_service.sh'''
mv_common.runcmd(cmd)
logging.info("__End of supplemental\n")
|