X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sliver_vs.py;h=991443328a5522eab2af63504d25da68c9be2223;hb=9eaca91072c5e96ab49c527e9a1945f129256e2f;hp=0624d067f66971fc8bf462db40a506c24b094cab;hpb=6f09e291bfd0621c9daddafe3f5f456c21ded509;p=nodemanager.git diff --git a/sliver_vs.py b/sliver_vs.py index 0624d06..9914433 100644 --- a/sliver_vs.py +++ b/sliver_vs.py @@ -151,8 +151,8 @@ class Sliver_VS(accounts.Account, vserver.VServer): rc3_link="/vservers/%s/etc/rc.d/rc3.d/S99vinit"%self.name rc3_target="../init.d/vinit" # install in sliver - body=file(vinit_source).read() - if tools.replace_file_with_string(vinit_script,body,chmod=0755): + code=file(vinit_source).read() + if tools.replace_file_with_string(vinit_script,code,chmod=0755): logger.log("vsliver_vs: %s: installed generic vinit rc script"%self.name) # create symlink for runlevel 3 if not os.path.islink(rc3_link): @@ -170,10 +170,10 @@ class Sliver_VS(accounts.Account, vserver.VServer): # this one checks for the existence of the slice initscript # install or remove the slice inistscript, as instructed by the initscript tag def refresh_slice_vinit(self): - body=self.initscript + code=self.initscript sliver_initscript="/vservers/%s/etc/rc.d/init.d/vinit.slice"%self.name - if tools.replace_file_with_string(sliver_initscript,body,remove_if_empty=True,chmod=0755): - if body: + if tools.replace_file_with_string(sliver_initscript,code,remove_if_empty=True,chmod=0755): + if code: logger.log("vsliver_vs: %s: Installed new initscript in %s"%(self.name,sliver_initscript)) if self.is_running(): # Only need to rerun the initscript if the vserver is