~ubuntu-branches/ubuntu/vivid/goget-ubuntu-touch/vivid-proposed

« back to all changes in this revision

Viewing changes to ubuntu-device-flash/core.go

  • Committer: Package Import Robot
  • Author(s): Sergio Schvezov
  • Date: 2015-01-16 13:17:27 UTC
  • mfrom: (1.1.41)
  • Revision ID: package-import@ubuntu.com-20150116131727-xy9sn7yfoy93lsr9
Tags: 0.12-0ubuntu1
* ubuntu-device-flash:
  - replicating system-a into system-b for slow devices.
  - setting the cloud-init password to ubuntu.
  - updating to a new snappy-system.txt.
  - bug fixes to relax requirements for devices.

Show diffs side-by-side

added added

removed removed

Lines of Context:
73
73
`
74
74
 
75
75
const cloudInitUserData = `#cloud-config
76
 
password: passw0rd
 
76
password: ubuntu
77
77
chpasswd: { expire: False }
78
78
ssh_pwauth: True
79
79
`
342
342
                }
343
343
        }
344
344
 
 
345
        // if the device is armhf, we can't to make this copy here since it's faster
 
346
        // than on the device.
 
347
        if coreCmd.Device == "generic_armhf" && coreCmd.hardware.PartitionLayout == "system-AB" {
 
348
                printOut("Replicating system-a into system-b")
 
349
 
 
350
                src := fmt.Sprintf("%s/.", systemPath)
 
351
                dst := fmt.Sprintf("%s/system-b", img.BaseMount())
 
352
 
 
353
                cmd := exec.Command("cp", "-r", "--preserve=all", src, dst)
 
354
                if out, err := cmd.CombinedOutput(); err != nil {
 
355
                        return fmt.Errorf("failed to replicate image contents: %s", out)
 
356
                }
 
357
        }
 
358
 
345
359
        return nil
346
360
}
347
361