summaryrefslogtreecommitdiffstats
path: root/abs/core-testing
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2009-06-04 13:42:27 (GMT)
committerJames Meyer <james.meyer@operamail.com>2009-06-04 13:42:27 (GMT)
commit7036c362b23d65f562b4ae44c7267fb2e89b2d11 (patch)
treea5f5e60139563a5038822ce9f938a19dd1a087da /abs/core-testing
parent958a4c40386321b8c9008c42afd6d911d9009962 (diff)
downloadlinhes_pkgbuild-7036c362b23d65f562b4ae44c7267fb2e89b2d11.zip
linhes_pkgbuild-7036c362b23d65f562b4ae44c7267fb2e89b2d11.tar.gz
linhes_pkgbuild-7036c362b23d65f562b4ae44c7267fb2e89b2d11.tar.bz2
LinHes-config: Adding ssh user module
Diffstat (limited to 'abs/core-testing')
-rwxr-xr-xabs/core-testing/LinHES-config/systemconfig.py24
1 files changed, 19 insertions, 5 deletions
diff --git a/abs/core-testing/LinHES-config/systemconfig.py b/abs/core-testing/LinHES-config/systemconfig.py
index f8521d4..7e5e3b1 100755
--- a/abs/core-testing/LinHES-config/systemconfig.py
+++ b/abs/core-testing/LinHES-config/systemconfig.py
@@ -82,20 +82,21 @@ def main(argv):
cmdmodule["misc"] = True
cmdmodule["sleep"] = True
cmdmodule["webuser"] = True
+ cmdmodule["ddns"] = True
cmdmodule["screensaver"] = True
cmdmodule["advanced"] = True
cmdmodule["software"] = True
cmdmodule["advancedX"] = True
cmdmodule["smolt"] = True
-
+ cmdmodule["user"] = True
if cmdmodule["hostype"]:
- import hostype
+ import mv_hostype
cmdmodule["advancedX"] = False
setup_x(systemconfig)
cmdmodule["ir"] = True
- hostype.hostypeprint(systemconfig)
+ mv_hostype.hostypeprint(systemconfig)
cmdmodule["smolt"] = True
if cmdmodule["network"]:
@@ -136,6 +137,9 @@ def main(argv):
import mv_webuser
mv_webuser.setup_web_auth(systemconfig["UseMythWEB_auth"])
+ if cmdmodule["ddns"]:
+ print " LOOK FOR DDNS"
+
if cmdmodule["screensaver"]:
import mv_screensaver
mv_screensaver.setup_screensaver(systemconfig, data_config)
@@ -165,7 +169,17 @@ def main(argv):
data_config.MYTHHOME,
data_config.SYSTEMTYPE)
-
+ if cmdmodule["user"]:
+ logging.info("____Start of ssh user____")
+ if systemconfig["rootSSH"] == "1" :
+ logging.info(" Allowing ssh access for root")
+ cmd = '''sed -i "s/^.*PermitRootLogin.*$/PermitRootLogin yes/" /etc/ssh/sshd_config'''
+ mv_common.runcmd(cmd)
+ else:
+ logging.info(" Removing ssh access for root")
+ cmd = '''sed -i "s/^.*PermitRootLogin.*$/PermitRootLogin no/" /etc/ssh/sshd_config'''
+ mv_common.runcmd(cmd)
+ logging.info("__End of ssh user\n")
if __name__ == "__main__":
@@ -173,7 +187,7 @@ if __name__ == "__main__":
data_config = __import__(config_file, globals(), locals(), [])
#Read in systemconfig
global systemconfig
- systemconfig = {}
+ systemconfig = {"hostypec":False}
file_name = "/etc/systemconfig"
try:
config_file = open(file_name)