[Merge] lp:~sergiusens/goget-ubuntu-touch/default_password into lp:goget-ubuntu-touch

Ricardo Salveti rsalveti at rsalveti.net
Mon Sep 1 20:42:43 UTC 2014


Review: Needs Fixing



Diff comments:

> === modified file 'ubuntu-device-flash/args.go'
> --- ubuntu-device-flash/args.go	2014-08-05 20:07:43 +0000
> +++ ubuntu-device-flash/args.go	2014-08-29 20:38:10 +0000
> @@ -39,6 +39,7 @@
>  	TLSSkipVerify bool   `long:"tls-skip-verify" description:"Skip TLS certificate validation"`
>  	DeveloperMode bool   `long:"developer-mode" description:"Enables developer mode after the factory reset"`
>  	RunScript     string `long:"run-script" description:"Run a script given by path to finish the flashing process, instead of rebooting to recovery (mostly used during development to work around quirky or incomplete recovery images)"`
> +	Password      string `long:"password" description:"This sets up the default password for the phablet user. This option is meant for CI and not general use"`

Please also add that this needs to be used with --wipe.

>  }
>  
>  var args arguments
> 
> === modified file 'ubuntu-device-flash/main.go'
> --- ubuntu-device-flash/main.go	2014-08-07 03:56:42 +0000
> +++ ubuntu-device-flash/main.go	2014-08-29 20:38:10 +0000
> @@ -61,6 +61,10 @@
>  		}
>  	}
>  
> +	if args.Password != "" && !args.Wipe && !args.DeveloperMode {
> +		log.Fatal("Default password setup requires developer mode and a clean install")

Please also add that this needs to be used with --wipe.

> +	}
> +
>  	tarballPath := args.DeviceTarball
>  	if tarballPath != "" {
>  		if p, err := filepath.Abs(tarballPath); err != nil {
> @@ -216,6 +220,10 @@
>  	if args.DeveloperMode {
>  		enableList = append(enableList, "developer_mode")
>  	}
> +	if args.Password != "" {
> +		enableList = append(enableList, "default_password "+args.Password)
> +	}
> +
>  	ubuntuCommands, err := ubuntuimage.GetUbuntuCommands(image.Files, cacheDir, args.Wipe, enableList)
>  	if err != nil {
>  		log.Fatal("Cannot create commands file")
> 
> === modified file 'ubuntuimage/images.go'
> --- ubuntuimage/images.go	2014-05-30 12:18:34 +0000
> +++ ubuntuimage/images.go	2014-08-29 20:38:10 +0000
> @@ -80,13 +80,14 @@
>  			writer.WriteString(
>  				fmt.Sprintf("update %s %s\n", filepath.Base(file.Path), filepath.Base(file.Signature)))
>  		}
> -		writer.WriteString("unmount system\n")
>  	}
>  
>  	//we cannot enable "things" outside of userdata
>  	for i := range enable {
>  		writer.WriteString(fmt.Sprintf("enable %s\n", enable[i]))
>  	}
> +
> +	writer.WriteString("unmount system\n")
>  	return tmpFile.Name(), err
>  }
>  
> 


-- 
https://code.launchpad.net/~sergiusens/goget-ubuntu-touch/default_password/+merge/232766
Your team Ubuntu Phablet Team is subscribed to branch lp:goget-ubuntu-touch.



More information about the Ubuntu-reviews mailing list