@@ -1301,13 +1301,15 @@ def replace_command(cmd, replacement_list)
13011301 result
13021302 end
13031303
1304- def get_custom_command ( r_directory , windows_path , custom_cmd )
1305- replacement_list = {
1304+ def install_driver_list ( r_directory , windows_path )
1305+ {
13061306 '@driver_dir@' => r_directory ,
13071307 '@inf_path@' => windows_path
13081308 }
1309+ end
13091310
1310- replace_command ( custom_cmd , replacement_list )
1311+ def get_custom_command ( r_directory , windows_path , custom_cmd )
1312+ replace_command ( custom_cmd , install_driver_list ( r_directory , windows_path ) )
13111313 end
13121314
13131315 def install_driver_command ( r_directory , windows_path , install_method , custom_cmd = nil )
@@ -1352,6 +1354,8 @@ def do_install_machine_driver_package(machine,
13521354 windows_path = "#{ r_directory } /#{ inf_file } " . tr ( '/' , '\\' )
13531355 install_certificate ( machine , windows_path , sys_file ) if install_method . eql? ( 'PNP' ) || force_install_cert
13541356 machine_run ( machine , install_driver_command ( r_directory , windows_path , install_method , custom_cmd ) )
1357+
1358+ install_driver_list ( r_directory , windows_path )
13551359 end
13561360
13571361 public
@@ -1383,12 +1387,12 @@ def install_machine_driver_package(machine,
13831387 file = File . join ( l_directory , inf_file )
13841388 raise 'Inf file not valid.' unless File . exist? ( file )
13851389
1386- do_install_machine_driver_package ( machine ,
1387- install_method ,
1388- l_directory ,
1389- inf_file ,
1390- options )
1391- @json ? { 'result' => 'Success' } : true
1390+ driver_info = do_install_machine_driver_package ( machine ,
1391+ install_method ,
1392+ l_directory ,
1393+ inf_file ,
1394+ options )
1395+ @json ? { 'result' => 'Success' , 'content' => driver_info } : driver_info
13921396 end
13931397 end
13941398
0 commit comments