mirror of
				https://github.com/j-a-n/raspberrymatic-addon-rmupdate.git
				synced 2023-10-10 11:37:40 +00:00 
			
		
		
		
	Implement command "firmware clone <target-device>"
This commit is contained in:
		| @@ -30,6 +30,7 @@ proc usage {} { | ||||
| 	puts stderr "  firmware install_latest       : install latest available firmware version" | ||||
| 	puts stderr "  firmware install <version>    : install firmware VERSION" | ||||
| 	puts stderr "  addons list                   : list installed addons and versions" | ||||
| 	puts stderr "  system clone <target-device>  : clone system to TARGET-DEVICE" | ||||
| } | ||||
|  | ||||
| proc main {} { | ||||
| @@ -73,6 +74,14 @@ proc main {} { | ||||
| 			usage | ||||
| 			exit 1 | ||||
| 		} | ||||
| 	} elseif {$mod == "system"} { | ||||
| 		if {$cmd == "clone"} { | ||||
| 			set target_device [lindex $argv 2] | ||||
| 			rmupdate::clone_system $target_device 1 | ||||
| 			puts "System cloned to ${target_device}, shutting down" | ||||
| 			exec /sbin/poweroff | ||||
| 		} | ||||
| 		 | ||||
| 	} else { | ||||
| 		usage | ||||
| 		exit 1 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user