diff options
author | James Meyer <james.meyer@operamail.com> | 2012-10-14 19:42:57 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2012-10-14 19:42:57 (GMT) |
commit | e4840158643b9d3dd848fce7587d788870813438 (patch) | |
tree | 8634c05d907f8558bb0b7fc7d50ae0ae9fb4049e /abs/core/LinHES-config/mv_network.py | |
parent | 489742a5f2ec36803e4272d25ba381e21ede5f2d (diff) | |
download | linhes_pkgbuild-e4840158643b9d3dd848fce7587d788870813438.zip linhes_pkgbuild-e4840158643b9d3dd848fce7587d788870813438.tar.gz linhes_pkgbuild-e4840158643b9d3dd848fce7587d788870813438.tar.bz2 |
LinHES-config: added some logic to account for when the hostname changes via the service menu.
- restart func (this will work itself out if left alone)
- restart xymon
- run mythutils to change hostname
- reload systemsettings with new hostname
Diffstat (limited to 'abs/core/LinHES-config/mv_network.py')
-rwxr-xr-x | abs/core/LinHES-config/mv_network.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/abs/core/LinHES-config/mv_network.py b/abs/core/LinHES-config/mv_network.py index d0fa16c..f011970 100755 --- a/abs/core/LinHES-config/mv_network.py +++ b/abs/core/LinHES-config/mv_network.py @@ -503,7 +503,7 @@ def hostname_change_check(systemconfig): logging.debug(" New hostname: %s", newhostname) if oldhostname != newhostname : logging.info(" Changing hostname in database to match new hostname") - cmd ="%s/bin/restore_default_settings.sh -cuhostname -o -h%s" %(mv_root, oldhostname) + cmd ="%s/bin/myth_settings_wrapper.sh -cuhostname -j %s -n %s " %(mv_root, oldhostname, newhostname) mv_common.runcmd(cmd) logging.info(" Changing hostname to %s", newhostname) cmd = "hostname %s" %newhostname @@ -513,6 +513,21 @@ def hostname_change_check(systemconfig): mv_common.stop_service("mythbackend") mv_common.start_service("mythbackend") restartfe = True + mv_common.stop_service("avahi") + mv_common.start_service("avahi") + + + mv_common.stop_service("xymon-client") + mv_common.start_service("xymon-client") + + mv_common.stop_service("funcd") + mv_common.start_service("funcd") + + + + + + else: logging.debug(" old and new hostnames matched, leaving things along") logging.debug(" __End of hostname_change_check") |