@@ -291,6 +291,7 @@ function sdm_burndevfile() {
291291 declare -x SDMNSPAWN=" Burn0"
292292 declare -a burnmsg
293293 fpartcopy=0
294+ write_burnmsg " * Start Burn"
294295 burnstart=" $( getcdate) "
295296 newdiskid=" $( printf " %08x" " $(( (RANDOM* RANDOM* RANDOM* RANDOM+ RANDOM)& 0xFFFFFFFF )) " ) "
296297 if [ $burn -eq 1 ]
@@ -300,8 +301,6 @@ function sdm_burndevfile() {
300301 #
301302 [ " $burndev " == " " ] && errexit " ? No storage device specified"
302303 [ ! -b $burndev ] && errexit " ? '$burndev ' is not a block device"
303- dtype=$( lsblk -n -o type $burndev 2> /dev/null | head -n 1)
304- [[ " $dtype " == " " ]] || [[ " $dtype " != " disk" ]] && errexit " ? '$burndev ' is not a block device"
305304 perr=0
306305 for p in 1 2 3 4 5 6 7 8
307306 do
@@ -311,7 +310,6 @@ function sdm_burndevfile() {
311310 [ $perr -eq 1 ] && errexit " ? Use 'sudo umount' to unmount each mounted partition, then redo the burn command"
312311 notmounted $burndev || errexit " ? Device '$burndev ' is mounted" # one last check
313312 ! sfdisk -l $burndev > /dev/null 2>&1 && errexit " ? Cannot access '$burndev '; is there a disk in the drive?"
314- write_burnmsg " * Start Burn"
315313 bsize=$( stat --printf %s $dimg )
316314 write_burnmsg " > Burn '$dimg ' $( getgbstr $bsize ) to '$burndev '..."
317315 diskbytes=$( getdiskbytes $burndev )
382380 #
383381 [ " $burnfilefile " == " " ] && errexit " ? No Output IMG file specified"
384382 [ -f $burnfilefile ] && errexit " ? Output IMG file '$burnfilefile ' exists"
385- write_burnmsg " * Start Burn"
386383 bsize=$( stat --printf %s $dimg )
387384 write_burnmsg " * Burn '$dimg ' $( getgbstr $bsize ) to IMG '$burnfilefile '..."
388385 burnmsg+=(" $( thisdate) > Burn IMG command line: $cmdline " )
430427 # and to $SDMPT/etc/sdm/history in the mounted image or image file
431428 #
432429 xsettings=" autologin b0script b1script bootscripts burnplugins domain expandroot exports fchroot hname fredact fnoexpandroot myuser noreboot"
433- xsettings=" $xsettings nowaittimesync plugindebug plugins reboot rebootwait regensshkeys"
430+ xsettings=" $xsettings nowaittimesync plugindebug plugins reboot rebootwait regensshkeys xspdev "
434431 # Save settings made with the --burn command
435432 # Define variable b<varname> for each <varname>
436433 for e in $xsettings
456453 regensshkeys=$(( bregensshkeys| regensshkeys))
457454 nowaittimesync=$(( bnowaittimesync| nowaittimesync))
458455 plugindebug=$(( bplugindebug| plugindebug))
456+ xspdev=$bxspdev # Pass on host setting
459457 [ " $hname " == " " ] && write_burnmsg " % hostname not specified with --host; will not be written"
460458 # --bupdate must specified on the burn command line
461459 initvirt logtoboth # Must be done after fchroot is set
0 commit comments