Home | History | Annotate | Download | only in samples
      1 rh= hosts.create_host("192.168.1.1")
      2 
      3 print rh.run("uname -a").stdout
      4 
      5 kernel= deb_kernel.DEBKernel()
      6 kernel.get("/home/foo/linux-2.6.22_2.6.22_amd64.deb")
      7 
      8 print kernel.get_version()
      9 print kernel.get_image_name()
     10 print kernel.get_initrd_name()
     11 
     12 print "XXXX extracting kernel"
     13 dir= kernel.extract(rh)
     14 print rh.run('ls "%s"' % (sh_escape(dir),))
     15 
     16 
     17 print "XXXX installing kernel"
     18 kernel.install(rh)
     19 
     20 rh.reboot()
     21 rh.wait_up()
     22 
     23 print rh.run("uname -a").stdout
     24