Revision 72f0f7fd lib/backend.py

b/lib/backend.py
1022 1022

  
1023 1023
  comprcmd = "gzip"
1024 1024

  
1025
  destcmd = utils.BuildShellCmd("mkdir -p %s; cat > %s/%s", 
1025
  destcmd = utils.BuildShellCmd("mkdir -p %s && cat > %s/%s",
1026 1026
                                destdir, destdir, destfile)
1027 1027
  remotecmd = ssh.BuildSSHCmd(dest_node, 'root', destcmd)
1028
  
1029
  
1028

  
1029

  
1030 1030

  
1031 1031
  # all commands have been checked, so we're safe to combine them
1032
  command = '|'.join([expcmd, comprcmd, ' '.join(remotecmd)])
1032
  command = '|'.join([expcmd, comprcmd, utils.ShellQuoteArgs(remotecmd)])
1033 1033

  
1034 1034
  result = utils.RunCmd(command)
1035 1035

  
......
1178 1178
                               real_os_dev.dev_path, real_swap_dev.dev_path,
1179 1179
                               logfile)
1180 1180

  
1181
  command = '|'.join([' '.join(remotecmd), comprcmd, impcmd])
1181
  command = '|'.join([utils.ShellQuoteArgs(remotecmd), comprcmd, impcmd])
1182 1182

  
1183 1183
  result = utils.RunCmd(command)
1184 1184

  

Also available in: Unified diff