diff options
author | xiubuzhe <xiubuzhe@sina.com> | 2023-10-08 20:59:00 +0800 |
---|---|---|
committer | xiubuzhe <xiubuzhe@sina.com> | 2023-10-08 20:59:00 +0800 |
commit | 1dac2263372df2b85db5d029a45721fa158a5c9d (patch) | |
tree | 0365f9c57df04178a726d7584ca6a6b955a7ce6a /lib/sunhpc/modules/kickstart/30-services.py | |
parent | b494be364bb39e1de128ada7dc576a729d99907e (diff) | |
download | sunhpc-1dac2263372df2b85db5d029a45721fa158a5c9d.tar.gz sunhpc-1dac2263372df2b85db5d029a45721fa158a5c9d.tar.bz2 sunhpc-1dac2263372df2b85db5d029a45721fa158a5c9d.zip |
first add files
Diffstat (limited to 'lib/sunhpc/modules/kickstart/30-services.py')
-rw-r--r-- | lib/sunhpc/modules/kickstart/30-services.py | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/lib/sunhpc/modules/kickstart/30-services.py b/lib/sunhpc/modules/kickstart/30-services.py new file mode 100644 index 0000000..7d56ca2 --- /dev/null +++ b/lib/sunhpc/modules/kickstart/30-services.py @@ -0,0 +1,59 @@ +#coding:utf-8 +import time +import sunhpc +class Modules(object): + """ + Configure sunhpc compute node services. + """ + def __init__(self, command): + self.cmd = command + + @property + def __help__(self): + info = """ + #============================================================== + # %s + # + # module_path: %s + # module_name: %s + #============================================================== + """ % (self.__doc__.strip(), self.__module__.strip(), self.__repr__()) + return info + + def run(self, args): + + # + # self.cmd.ks.makefile + # args: + # text, type:list + # name, type:file path + # mode, owner, perms, expr, quot + # + + content = [self.__help__] + + # Autofs + autofs_info = """ + sed -i 's/mount_nfs_default_protocol = 4/mount_nfs_default_protocol = 3/g' /etc/autofs.conf + """ + content.append(autofs_info) + + self.cmd.ks.addPost(content) + def __repr__(self): + return "kickstart-services" + + + + + + + + + + + + + + + + |