#2914 Issue closed: Raspberry Pi: serial-functions.sh BugError when no /dev/ttyS[0-9]* exists

Labels: fixed / solved / done, minor bug, special hardware or VM

arkansas-coder opened issue at 2023-01-18 19:01:

This my first time using ReaR and have run into the error below. It may be an error or, more likely, something that I am doing wrong.

Relax-and-Recover (ReaR) Issue Template

Fill in the following items before submitting a new issue
(quick response is not guaranteed with free support):

  • ReaR version ("/usr/sbin/rear -V"):
    2.7 / Git

  • OS version ("cat /etc/os-release" or "lsb_release -a" or "cat /etc/rear/os.conf"):
    Debian 11

  • ReaR configuration files ("cat /etc/rear/site.conf" and/or "cat /etc/rear/local.conf"):
    OUTPUT=PXE
    OUTPUT_URL=nfs://192.168.0.116/volume1/local-network/system/rear

  • Hardware vendor/product (PC or PowerNV BareMetal or ARM) or VM (KVM guest or PowerVM LPAR):
    Raspberry Pi 4B

  • System architecture (x86 compatible or PPC64/PPC64LE or what exact ARM device):
    arm64`

  • Firmware (BIOS or UEFI or Open Firmware) and bootloader (GRUB or ELILO or Petitboot):
    Raspberry OS

  • Storage (local disk or SSD) and/or SAN (FC or iSCSI or FCoE) and/or multipath (DM or NVMe):
    local disk, backup is nfs

  • Storage layout ("lsblk -ipo NAME,KNAME,PKNAME,TRAN,TYPE,FSTYPE,LABEL,SIZE,MOUNTPOINT"):

  • Description of the issue (ideally so that others can reproduce it):
    BUG in serial-functions.sh line 26: '''get_serial_device_speed() called for '''rear''' which is no character device'''

  • Workaround, if any:

  • Attachments, as applicable ("rear -D mkrescue/mkbackup/recover" debug log files):

To paste verbatim text like command output or file content,
include it between a leading and a closing line of three backticks like

```
2023-01-18 12:05:10.072886929 Relax-and-Recover 2.7 / Git
2023-01-18 12:05:10.083191318 Running rear mkrescue (PID 220126 date 2023-01-18 12:05:09)
2023-01-18 12:05:10.095612262 Command line options: ./rear -D -v mkrescue
2023-01-18 12:05:10.108560392 Using log file: /home/ron/rear/var/log/rear/rear-system.log
2023-01-18 12:05:10.121126114 Using build area: /var/tmp/rear.IlZKXKqbMjtxMa6
2023-01-18 12:05:10.133985429 Current set of flags is 'hB'
2023-01-18 12:05:10.149428096 The debugscripts flags are 'x'
2023-01-18 12:05:10.162411781 Combining configuration files
2023-01-18 12:05:10.173701281 Including /home/ron/rear/etc/rear/os.conf
2023-01-18 12:05:10.184211873 Entering debugscript mode via 'set -x'.
+ source /home/ron/rear/etc/rear/os.conf
++ OS_VENDOR=Debian
++ OS_VERSION=11
+ source_return_code=0
+ test 0 -eq 0
+ cd /home/ron/rear/usr/sbin
+ test 1
+ Debug 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test 1
+ Log 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test -w /home/ron/rear/var/log/rear/rear-system.log
+ echo '2023-01-18 12:05:10.207448373 Leaving debugscript mode (back to previous bash flags and options settings).'
2023-01-18 12:05:10.207448373 Leaving debugscript mode (back to previous bash flags and options settings).
2023-01-18 12:05:10.232398633 Including conf/GNU/Linux.conf
2023-01-18 12:05:10.243862892 Entering debugscript mode via 'set -x'.
+ source /home/ron/rear/usr/share/rear/conf/GNU/Linux.conf
++ REQUIRED_PROGS+=(chroot ip less parted readlink yes)
++ PROGS+=(partprobe fdisk cfdisk sfdisk)
++ PROGS+=(rpc.statd rpcbind mknod blkid vol_id udev_volume_id portmap rpcinfo tac reboot halt shutdown killall5 killall tee ifconfig nslookup route ifenslave ifrename nameif klogd syslog-ng syslogd rsyslogd date rmdir init telinit ethtool expand insmod modprobe lsmod true false mingetty agetty getty rmmod hostname uname sleep logger pstree ln dirname basename tty ping netstat free traceroute xxd vi pico nano rmmod df dmesg du gzip netcat curl top iptraf joe getent id ldd strace rsync tail head find md5sum mkfs mkfs.ext2 mkfs.ext3 mkfs.ext4 mkfs.ext4dev mkfs.jfs mkfs.xfs mkfs.reiserfs mkfs.vfat mkfs.btrfs mkreiserfs fsck fsck.ext2 fsck.ext3 fsck.ext4 fsck.ext4dev fsck.xfs fsck.reiserfs reiserfsck fsck.btrfs findmnt btrfsck tune2fs tune4fs xfs_admin xfs_db xfs_repair xfs_info xfs_growfs btrfs jfs_tune reiserfstune egrep fgrep chmod chown stat mkswap swapon swapoff mknod touch scsi_id lsscsi logd initctl lspci usleep mktemp /bin/true strace which mkfifo seq openvt poweroff chacl getfacl setfacl attr getfattr setfattr mpath_wait xargs sg_inq env w dosfslabel sysctl blockdev lsblk clear dmsetup dmeventd)
++ LIBS+=(/lib*/libnss_dns* /lib*/libnss_files* /lib/*/libnss_dns* /lib/*/libnss_files* /lib*/libgcc_s* /lib*/libresolv* /usr/lib*/rsyslog/*so /lib*/rsyslog/*so /usr/lib*/syslog-ng/*so /lib*/libnsspem.so* /usr/lib*/libnsspem.so* /lib*/libfreebl*.so* /usr/lib*/libfreebl*.so* /lib*/libnss3.so* /usr/lib*/libnss3.so* /lib*/libnssutil3.so* /usr/lib*/libnssutil3.so* /lib*/libsoftokn3.so* /usr/lib*/libsoftokn3.so* /lib*/libsqlite3.so* /usr/lib*/libsqlite3.so* /lib*/libfreeblpriv3.so* /usr/lib*/libfreeblpriv3.so* /lib*/libssl.so* /usr/lib*/libssl.so* /lib*/libnssdbm3.so* /usr/lib*/libnssdbm3.so*)
++ COPY_AS_IS+=(/dev /etc/inputr[c] /etc/protocols /etc/services /etc/rpc /etc/termcap /etc/terminfo /lib*/terminfo /usr/share/terminfo /etc/netconfig /etc/mke2fs.conf /etc/*-release /etc/localtime /etc/magic /usr/share/misc/magic /etc/dracut.conf /etc/dracut.conf.d /usr/lib/dracut /sbin/modprobe.ksplice-orig /etc/sysctl.conf /etc/sysctl.d /etc/e2fsck.conf)
++ COPY_AS_IS+=(/usr/libexec/vi)
++ COPY_AS_IS+=('/etc/ssl/certs/*' '/etc/pki/*' '/usr/lib/ssl/*' '/usr/share/ca-certificates/*' '/etc/ca-certificates/*')
++ COPY_AS_IS_EXCLUDE+=(dev/shm/\*)
++ COPY_AS_IS_EXCLUDE+=('/etc/pki/tls/private' '/etc/pki/CA/private' '/etc/pki/nssdb/key*.db' '/usr/lib/ssl/private')
++ KERNEL_CMDLINE+=' selinux=0'
++ CLONE_USERS+=(daemon rpc usbmuxd usbmux vcsa nobody dbus)
++ CLONE_GROUPS+=(tty usbmuxd usbmux fuse kvm oinstall dbus)
++ type -p lspci
++ lspci
++ grep --quiet ' VGA .*AMD'
+ source_return_code=0
+ test 0 -eq 0
+ cd /home/ron/rear/usr/sbin
+ test 1
+ Debug 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test 1
+ Log 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test -w /home/ron/rear/var/log/rear/rear-system.log
+ echo '2023-01-18 12:05:10.323705466 Leaving debugscript mode (back to previous bash flags and options settings).'
2023-01-18 12:05:10.323705466 Leaving debugscript mode (back to previous bash flags and options settings).
2023-01-18 12:05:10.341907466 Including /home/ron/rear/etc/rear/site.conf
2023-01-18 12:05:10.352567003 Entering debugscript mode via 'set -x'.
+ source /home/ron/rear/etc/rear/site.conf
++ OUTPUT=PXE
++ OUTPUT_URL=nfs://192.168.0.116/volume1/local-network/system/rear
+ source_return_code=0
+ test 0 -eq 0
+ cd /home/ron/rear/usr/sbin
+ test 1
+ Debug 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test 1
+ Log 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test -w /home/ron/rear/var/log/rear/rear-system.log
+ echo '2023-01-18 12:05:10.376934169 Leaving debugscript mode (back to previous bash flags and options settings).'
2023-01-18 12:05:10.376934169 Leaving debugscript mode (back to previous bash flags and options settings).
2023-01-18 12:05:10.394404540 Including /home/ron/rear/etc/rear/local.conf
2023-01-18 12:05:10.405047577 Entering debugscript mode via 'set -x'.
+ source /home/ron/rear/etc/rear/local.conf
+ source_return_code=0
+ test 0 -eq 0
+ cd /home/ron/rear/usr/sbin
+ test 1
+ Debug 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test 1
+ Log 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test -w /home/ron/rear/var/log/rear/rear-system.log
+ echo '2023-01-18 12:05:10.430001966 Leaving debugscript mode (back to previous bash flags and options settings).'
2023-01-18 12:05:10.430001966 Leaving debugscript mode (back to previous bash flags and options settings).
2023-01-18 12:05:10.445662262 ======================
2023-01-18 12:05:10.456231225 Running 'init' stage
2023-01-18 12:05:10.467105910 ======================
2023-01-18 12:05:10.499690558 Including init/default/005_verify_os_conf.sh
2023-01-18 12:05:10.510131336 Entering debugscript mode via 'set -x'.
+ source /home/ron/rear/usr/share/rear/init/default/005_verify_os_conf.sh
++ test -f /home/ron/rear/etc/rear/os.conf
++ return
+ source_return_code=0
+ test 0 -eq 0
+ cd /home/ron/rear/usr/sbin
+ test 1
+ Debug 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test 1
+ Log 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test -w /home/ron/rear/var/log/rear/rear-system.log
+ echo '2023-01-18 12:05:10.543117021 Leaving debugscript mode (back to previous bash flags and options settings).'
2023-01-18 12:05:10.543117021 Leaving debugscript mode (back to previous bash flags and options settings).
2023-01-18 12:05:10.566092799 Including init/default/010_EFISTUB_check.sh
2023-01-18 12:05:10.577903632 Entering debugscript mode via 'set -x'.
+ source /home/ron/rear/usr/share/rear/init/default/010_EFISTUB_check.sh
++ is_false no
++ case "$1" in
++ return 0
+ source_return_code=0
+ test 0 -eq 0
+ cd /home/ron/rear/usr/sbin
+ test 1
+ Debug 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test 1
+ Log 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test -w /home/ron/rear/var/log/rear/rear-system.log
+ echo '2023-01-18 12:05:10.604467114 Leaving debugscript mode (back to previous bash flags and options settings).'
2023-01-18 12:05:10.604467114 Leaving debugscript mode (back to previous bash flags and options settings).
2023-01-18 12:05:10.625783373 Including init/default/010_set_drlm_env.sh
2023-01-18 12:05:10.636650095 Entering debugscript mode via 'set -x'.
+ source /home/ron/rear/usr/share/rear/init/default/010_set_drlm_env.sh
++ is_true n
++ case "$1" in
++ return 1
++ return 0
+ source_return_code=0
+ test 0 -eq 0
+ cd /home/ron/rear/usr/sbin
+ test 1
+ Debug 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test 1
+ Log 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test -w /home/ron/rear/var/log/rear/rear-system.log
+ echo '2023-01-18 12:05:10.661543077 Leaving debugscript mode (back to previous bash flags and options settings).'
2023-01-18 12:05:10.661543077 Leaving debugscript mode (back to previous bash flags and options settings).
2023-01-18 12:05:10.683057743 Including init/default/030_update_recovery_system.sh
2023-01-18 12:05:10.694197466 Entering debugscript mode via 'set -x'.
+ source /home/ron/rear/usr/share/rear/init/default/030_update_recovery_system.sh
++ test ''
++ return 0
+ source_return_code=0
+ test 0 -eq 0
+ cd /home/ron/rear/usr/sbin
+ test 1
+ Debug 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test 1
+ Log 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test -w /home/ron/rear/var/log/rear/rear-system.log
+ echo '2023-01-18 12:05:10.719260391 Leaving debugscript mode (back to previous bash flags and options settings).'
2023-01-18 12:05:10.719260391 Leaving debugscript mode (back to previous bash flags and options settings).
2023-01-18 12:05:10.740754669 Including init/default/050_check_rear_recover_mode.sh
2023-01-18 12:05:10.751740632 Entering debugscript mode via 'set -x'.
+ source /home/ron/rear/usr/share/rear/init/default/050_check_rear_recover_mode.sh
++ test -f /etc/rear-release
++ case "$WORKFLOW" in
++ LogPrint 'Running workflow mkrescue on the normal/original system'
++ Log 'Running workflow mkrescue on the normal/original system'
++ test -w /home/ron/rear/var/log/rear/rear-system.log
++ echo '2023-01-18 12:05:10.776874762 Running workflow mkrescue on the normal/original system'
2023-01-18 12:05:10.776874762 Running workflow mkrescue on the normal/original system
++ Print 'Running workflow mkrescue on the normal/original system'
+ source_return_code=0
+ test 0 -eq 0
+ cd /home/ron/rear/usr/sbin
+ test 1
+ Debug 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test 1
+ Log 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test -w /home/ron/rear/var/log/rear/rear-system.log
+ echo '2023-01-18 12:05:10.788476817 Leaving debugscript mode (back to previous bash flags and options settings).'
2023-01-18 12:05:10.788476817 Leaving debugscript mode (back to previous bash flags and options settings).
2023-01-18 12:05:10.816535669 Including init/default/950_check_missing_programs.sh
2023-01-18 12:05:10.829685354 Entering debugscript mode via 'set -x'.
+ source /home/ron/rear/usr/share/rear/init/default/950_check_missing_programs.sh
++ local prog
++ missing_progs=()
++ local missing_progs
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary /home/ron/rear/usr/sbin/rear
++ for bin in "$@"
++ type /home/ron/rear/usr/sbin/rear
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary awk
++ for bin in "$@"
++ type awk
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary bash
++ for bin in "$@"
++ type bash
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary bc
++ for bin in "$@"
++ type bc
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary cat
++ for bin in "$@"
++ type cat
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary cmp
++ for bin in "$@"
++ type cmp
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary cp
++ for bin in "$@"
++ type cp
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary cpio
++ for bin in "$@"
++ type cpio
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary cut
++ for bin in "$@"
++ type cut
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary dd
++ for bin in "$@"
++ type dd
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary diff
++ for bin in "$@"
++ type diff
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary df
++ for bin in "$@"
++ type df
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary dumpkeys
++ for bin in "$@"
++ type dumpkeys
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary echo
++ for bin in "$@"
++ type echo
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary expr
++ for bin in "$@"
++ type expr
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary file
++ for bin in "$@"
++ type file
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary getopt
++ for bin in "$@"
++ type getopt
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary grep
++ for bin in "$@"
++ type grep
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary join
++ for bin in "$@"
++ type join
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary kbd_mode
++ for bin in "$@"
++ type kbd_mode
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary loadkeys
++ for bin in "$@"
++ type loadkeys
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary ls
++ for bin in "$@"
++ type ls
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary mkdir
++ for bin in "$@"
++ type mkdir
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary mount
++ for bin in "$@"
++ type mount
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary mountpoint
++ for bin in "$@"
++ type mountpoint
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary mv
++ for bin in "$@"
++ type mv
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary pidof
++ for bin in "$@"
++ type pidof
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary ps
++ for bin in "$@"
++ type ps
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary pwd
++ for bin in "$@"
++ type pwd
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary rm
++ for bin in "$@"
++ type rm
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary sed
++ for bin in "$@"
++ type sed
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary seq
++ for bin in "$@"
++ type seq
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary sort
++ for bin in "$@"
++ type sort
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary strings
++ for bin in "$@"
++ type strings
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary sync
++ for bin in "$@"
++ type sync
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary tar
++ for bin in "$@"
++ type tar
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary test
++ for bin in "$@"
++ type test
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary tr
++ for bin in "$@"
++ type tr
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary umount
++ for bin in "$@"
++ type umount
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary uniq
++ for bin in "$@"
++ type uniq
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary wc
++ for bin in "$@"
++ type wc
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary chroot
++ for bin in "$@"
++ type chroot
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary ip
++ for bin in "$@"
++ type ip
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary less
++ for bin in "$@"
++ type less
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary parted
++ for bin in "$@"
++ type parted
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary readlink
++ for bin in "$@"
++ type readlink
++ return 0
++ for prog in "${REQUIRED_PROGS[@]}"
++ has_binary yes
++ for bin in "$@"
++ type yes
++ return 0
++ contains_visible_char ''
+++ tr -d -c '[:graph:]'
++ test ''
++ return 0
+ source_return_code=0
+ test 0 -eq 0
+ cd /home/ron/rear/usr/sbin
+ test 1
+ Debug 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test 1
+ Log 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test -w /home/ron/rear/var/log/rear/rear-system.log
+ echo '2023-01-18 12:05:10.882530225 Leaving debugscript mode (back to previous bash flags and options settings).'
2023-01-18 12:05:10.882530225 Leaving debugscript mode (back to previous bash flags and options settings).
2023-01-18 12:05:10.896575077 Finished running 'init' stage in 0 seconds
2023-01-18 12:05:10.919395391 Running mkrescue workflow
2023-01-18 12:05:10.930835984 ======================
2023-01-18 12:05:10.941927280 Running 'prep' stage
2023-01-18 12:05:10.953005873 ======================
2023-01-18 12:05:10.987284632 Including prep/default/005_remove_workflow_conf.sh
2023-01-18 12:05:10.999858039 Entering debugscript mode via 'set -x'.
+ source /home/ron/rear/usr/share/rear/prep/default/005_remove_workflow_conf.sh
++ mkdir -p -v /var/tmp/rear.IlZKXKqbMjtxMa6/rootfs/etc/rear
mkdir: created directory '/var/tmp/rear.IlZKXKqbMjtxMa6/rootfs/etc'
mkdir: created directory '/var/tmp/rear.IlZKXKqbMjtxMa6/rootfs/etc/rear'
++ rm -f -v /var/tmp/rear.IlZKXKqbMjtxMa6/rootfs/etc/rear/rescue.conf
+ source_return_code=0
+ test 0 -eq 0
+ cd /home/ron/rear/usr/sbin
+ test 1
+ Debug 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test 1
+ Log 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test -w /home/ron/rear/var/log/rear/rear-system.log
+ echo '2023-01-18 12:05:11.040750669 Leaving debugscript mode (back to previous bash flags and options settings).'
2023-01-18 12:05:11.040750669 Leaving debugscript mode (back to previous bash flags and options settings).
2023-01-18 12:05:11.063455465 Including prep/default/020_translate_url.sh
2023-01-18 12:05:11.075277780 Entering debugscript mode via 'set -x'.
+ source /home/ron/rear/usr/share/rear/prep/default/020_translate_url.sh
++ [[ -n '' ]]
++ [[ -n '' ]]
++ [[ -n '' ]]
++ [[ -n '' ]]
++ [[ -n '' ]]
++ test ''
++ [[ -n '' ]]
++ [[ -n '' ]]
++ [[ -n '' ]]
++ [[ -n '' ]]
++ [[ -z '' ]]
++ [[ -z nfs://192.168.0.116/volume1/local-network/system/rear ]]
++ [[ -z nfs://192.168.0.116/volume1/local-network/system/rear ]]
++ [[ -z '' ]]
++ [[ -z nfs://192.168.0.116/volume1/local-network/system/rear ]]
++ [[ -z '' ]]
++ [[ -z nfs://192.168.0.116/volume1/local-network/system/rear ]]
+ source_return_code=0
+ test 0 -eq 0
+ cd /home/ron/rear/usr/sbin
+ test 1
+ Debug 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test 1
+ Log 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test -w /home/ron/rear/var/log/rear/rear-system.log
+ echo '2023-01-18 12:05:11.101929539 Leaving debugscript mode (back to previous bash flags and options settings).'
2023-01-18 12:05:11.101929539 Leaving debugscript mode (back to previous bash flags and options settings).
2023-01-18 12:05:11.123401558 Including prep/default/030_translate_tape.sh
2023-01-18 12:05:11.134492150 Entering debugscript mode via 'set -x'.
+ source /home/ron/rear/usr/share/rear/prep/default/030_translate_tape.sh
++ [[ -n '' ]]
++ [[ -z '' ]]
++ [[ -n '' ]]
++ [[ -z nfs://192.168.0.116/volume1/local-network/system/rear ]]
++ [[ -n '' ]]
+ source_return_code=0
+ test 0 -eq 0
+ cd /home/ron/rear/usr/sbin
+ test 1
+ Debug 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test 1
+ Log 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test -w /home/ron/rear/var/log/rear/rear-system.log
+ echo '2023-01-18 12:05:11.159134354 Leaving debugscript mode (back to previous bash flags and options settings).'
2023-01-18 12:05:11.159134354 Leaving debugscript mode (back to previous bash flags and options settings).
2023-01-18 12:05:11.180713799 Including prep/default/035_valid_backup_methods.sh
2023-01-18 12:05:11.191757021 Entering debugscript mode via 'set -x'.
+ source /home/ron/rear/usr/share/rear/prep/default/035_valid_backup_methods.sh
++ test -d /home/ron/rear/usr/share/rear/restore/REQUESTRESTORE
+ source_return_code=0
+ test 0 -eq 0
+ cd /home/ron/rear/usr/sbin
+ test 1
+ Debug 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test 1
+ Log 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test -w /home/ron/rear/var/log/rear/rear-system.log
+ echo '2023-01-18 12:05:11.217427854 Leaving debugscript mode (back to previous bash flags and options settings).'
2023-01-18 12:05:11.217427854 Leaving debugscript mode (back to previous bash flags and options settings).
2023-01-18 12:05:11.239027132 Including prep/default/036_valid_output_methods.sh
2023-01-18 12:05:11.250051558 Entering debugscript mode via 'set -x'.
+ source /home/ron/rear/usr/share/rear/prep/default/036_valid_output_methods.sh
++ test -d /home/ron/rear/usr/share/rear/output/PXE
+ source_return_code=0
+ test 0 -eq 0
+ cd /home/ron/rear/usr/sbin
+ test 1
+ Debug 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test 1
+ Log 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test -w /home/ron/rear/var/log/rear/rear-system.log
+ echo '2023-01-18 12:05:11.275275743 Leaving debugscript mode (back to previous bash flags and options settings).'
2023-01-18 12:05:11.275275743 Leaving debugscript mode (back to previous bash flags and options settings).
2023-01-18 12:05:11.296854576 Including prep/default/040_check_backup_and_output_scheme.sh
2023-01-18 12:05:11.308061280 Entering debugscript mode via 'set -x'.
+ source /home/ron/rear/usr/share/rear/prep/default/040_check_backup_and_output_scheme.sh
++ test ''
++ test NETFS = REQUESTRESTORE
++ test nfs://192.168.0.116/volume1/local-network/system/rear
+++ url_scheme nfs://192.168.0.116/volume1/local-network/system/rear
+++ local url=nfs://192.168.0.116/volume1/local-network/system/rear
+++ local scheme=nfs
+++ echo nfs
+++ grep -q :
+++ echo nfs
++ local output_scheme=nfs
++ case $output_scheme in
+ source_return_code=0
+ test 0 -eq 0
+ cd /home/ron/rear/usr/sbin
+ test 1
+ Debug 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test 1
+ Log 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test -w /home/ron/rear/var/log/rear/rear-system.log
+ echo '2023-01-18 12:05:11.342598817 Leaving debugscript mode (back to previous bash flags and options settings).'
2023-01-18 12:05:11.342598817 Leaving debugscript mode (back to previous bash flags and options settings).
2023-01-18 12:05:11.364411891 Including prep/default/050_check_keep_old_output_copy_var.sh
2023-01-18 12:05:11.375509891 Entering debugscript mode via 'set -x'.
+ source /home/ron/rear/usr/share/rear/prep/default/050_check_keep_old_output_copy_var.sh
++ [[ ! -z '' ]]
++ [[ -z '' ]]
++ [[ ! -z '' ]]
+ source_return_code=1
+ test 0 -eq 1
+ Debug 'Source function: '\''source /home/ron/rear/usr/share/rear/prep/default/050_check_keep_old_output_copy_var.sh'\'' returns 1'
+ test 1
+ Log 'Source function: '\''source /home/ron/rear/usr/share/rear/prep/default/050_check_keep_old_output_copy_var.sh'\'' returns 1'
+ test -w /home/ron/rear/var/log/rear/rear-system.log
+ echo '2023-01-18 12:05:11.401650132 Source function: '\''source /home/ron/rear/usr/share/rear/prep/default/050_check_keep_old_output_copy_var.sh'\'' returns 1'
2023-01-18 12:05:11.401650132 Source function: 'source /home/ron/rear/usr/share/rear/prep/default/050_check_keep_old_output_copy_var.sh' returns 1
+ cd /home/ron/rear/usr/sbin
+ test 1
+ Debug 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test 1
+ Log 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test -w /home/ron/rear/var/log/rear/rear-system.log
+ echo '2023-01-18 12:05:11.413324484 Leaving debugscript mode (back to previous bash flags and options settings).'
2023-01-18 12:05:11.413324484 Leaving debugscript mode (back to previous bash flags and options settings).
2023-01-18 12:05:11.435232613 Including prep/Linux-arm/060_check_config.sh
2023-01-18 12:05:11.446968910 Entering debugscript mode via 'set -x'.
+ source /home/ron/rear/usr/share/rear/prep/Linux-arm/060_check_config.sh
++ '[' PXE '!=' PXE ']'
+ source_return_code=0
+ test 0 -eq 0
+ cd /home/ron/rear/usr/sbin
+ test 1
+ Debug 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test 1
+ Log 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test -w /home/ron/rear/var/log/rear/rear-system.log
+ echo '2023-01-18 12:05:11.472873335 Leaving debugscript mode (back to previous bash flags and options settings).'
2023-01-18 12:05:11.472873335 Leaving debugscript mode (back to previous bash flags and options settings).
2023-01-18 12:05:11.495297947 Including prep/default/100_init_workflow_conf.sh
2023-01-18 12:05:11.506339169 Entering debugscript mode via 'set -x'.
+ source /home/ron/rear/usr/share/rear/prep/default/100_init_workflow_conf.sh
++ cat -
+ source_return_code=0
+ test 0 -eq 0
+ cd /home/ron/rear/usr/sbin
+ test 1
+ Debug 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test 1
+ Log 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test -w /home/ron/rear/var/log/rear/rear-system.log
+ echo '2023-01-18 12:05:11.535339280 Leaving debugscript mode (back to previous bash flags and options settings).'
2023-01-18 12:05:11.535339280 Leaving debugscript mode (back to previous bash flags and options settings).
2023-01-18 12:05:11.556996817 Including prep/GNU/Linux/200_include_getty.sh
2023-01-18 12:05:11.567902224 Entering debugscript mode via 'set -x'.
+ source /home/ron/rear/usr/share/rear/prep/GNU/Linux/200_include_getty.sh
++ pgrep -nx mingetty
++ pgrep -nx agetty
++ pgrep -nx getty
+ source_return_code=1
+ test 0 -eq 1
+ Debug 'Source function: '\''source /home/ron/rear/usr/share/rear/prep/GNU/Linux/200_include_getty.sh'\'' returns 1'
+ test 1
+ Log 'Source function: '\''source /home/ron/rear/usr/share/rear/prep/GNU/Linux/200_include_getty.sh'\'' returns 1'
+ test -w /home/ron/rear/var/log/rear/rear-system.log
+ echo '2023-01-18 12:05:11.701623539 Source function: '\''source /home/ron/rear/usr/share/rear/prep/GNU/Linux/200_include_getty.sh'\'' returns 1'
2023-01-18 12:05:11.701623539 Source function: 'source /home/ron/rear/usr/share/rear/prep/GNU/Linux/200_include_getty.sh' returns 1
+ cd /home/ron/rear/usr/sbin
+ test 1
+ Debug 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test 1
+ Log 'Leaving debugscript mode (back to previous bash flags and options settings).'
+ test -w /home/ron/rear/var/log/rear/rear-system.log
+ echo '2023-01-18 12:05:11.713275613 Leaving debugscript mode (back to previous bash flags and options settings).'
2023-01-18 12:05:11.713275613 Leaving debugscript mode (back to previous bash flags and options settings).
2023-01-18 12:05:11.734924076 Including prep/GNU/Linux/200_include_serial_console.sh
2023-01-18 12:05:11.746094909 Entering debugscript mode via 'set -x'.
+ source /home/ron/rear/usr/share/rear/prep/GNU/Linux/200_include_serial_console.sh
++ [[ -z '' ]]
++ local devnode speed=
+++ get_serial_console_devices
+++ test ''
+++ sort
+++ ls
++ for devnode in $( get_serial_console_devices )
+++ get_serial_device_speed rear
+++ local devnode=rear
+++ test -c rear
+++ BugError 'get_serial_device_speed() called for '\''rear'\'' which is no character device'
+++ Error '
====================
BUG in /home/ron/rear/usr/share/rear/lib/serial-functions.sh line 26:
'\''get_serial_device_speed() called for '\''rear'\'' which is no character device'\''
--------------------
Please report it at https://github.com/rear/rear/issues
and include all related parts from /home/ron/rear/var/log/rear/rear-system.log
preferably the whole debug information via '\''rear -D mkrescue'\''
===================='
+++ test -s /home/ron/rear/var/log/rear/rear-system.log
+++ PrintError 'ERROR: 
====================
BUG in /home/ron/rear/usr/share/rear/lib/serial-functions.sh line 26:
'\''get_serial_device_speed() called for '\''rear'\'' which is no character device'\''
--------------------
Please report it at https://github.com/rear/rear/issues
and include all related parts from /home/ron/rear/var/log/rear/rear-system.log
preferably the whole debug information via '\''rear -D mkrescue'\''
===================='
+++ test -s /home/ron/rear/var/log/rear/rear-system.log
+++ test '  2023-01-18 12:05:11.746094909 Entering debugscript mode via '\''set -x'\''.'
+++ PrintError 'Some latest log messages since the last called script 200_include_serial_console.sh:'
+++ PrintError '  2023-01-18 12:05:11.746094909 Entering debugscript mode via '\''set -x'\''.'
+++ test -f /dev/null
+++ test 1
+++ test 1
+++ Log 'ERROR: 
====================
BUG in /home/ron/rear/usr/share/rear/lib/serial-functions.sh line 26:
'\''get_serial_device_speed() called for '\''rear'\'' which is no character device'\''
--------------------
Please report it at https://github.com/rear/rear/issues
and include all related parts from /home/ron/rear/var/log/rear/rear-system.log
preferably the whole debug information via '\''rear -D mkrescue'\''
===================='
+++ test -w /home/ron/rear/var/log/rear/rear-system.log
+++ echo '2023-01-18 12:05:11.814033743 ERROR: 
                              ====================
                              BUG in /home/ron/rear/usr/share/rear/lib/serial-functions.sh line 26:
                              '\''get_serial_device_speed() called for '\''rear'\'' which is no character device'\''
                              --------------------
                              Please report it at https://github.com/rear/rear/issues
                              and include all related parts from /home/ron/rear/var/log/rear/rear-system.log
                              preferably the whole debug information via '\''rear -D mkrescue'\''
                              ===================='
2023-01-18 12:05:11.814033743 ERROR: 
                              ====================
                              BUG in /home/ron/rear/usr/share/rear/lib/serial-functions.sh line 26:
                              'get_serial_device_speed() called for 'rear' which is no character device'
                              --------------------
                              Please report it at https://github.com/rear/rear/issues
                              and include all related parts from /home/ron/rear/var/log/rear/rear-system.log
                              preferably the whole debug information via 'rear -D mkrescue'
                              ====================
+++ LogToSyslog 'ERROR: 
====================
BUG in /home/ron/rear/usr/share/rear/lib/serial-functions.sh line 26:
'\''get_serial_device_speed() called for '\''rear'\'' which is no character device'\''
--------------------
Please report it at https://github.com/rear/rear/issues
and include all related parts from /home/ron/rear/var/log/rear/rear-system.log
preferably the whole debug information via '\''rear -D mkrescue'\''
===================='
+++ logger -t rear -i 'ERROR: 
====================
BUG in /home/ron/rear/usr/share/rear/lib/serial-functions.sh line 26:
'\''get_serial_device_speed() called for '\''rear'\'' which is no character device'\''
--------------------
Please report it at https://github.com/rear/rear/issues
and include all related parts from /home/ron/rear/var/log/rear/rear-system.log
preferably the whole debug information via '\''rear -D mkrescue'\''
===================='
+++ echo '===== Stack trace ====='
===== Stack trace =====
+++ local c=0
+++ caller 0
+++ :
+++ caller 1
+++ :
+++ caller 2
+++ :
+++ caller 3
+++ :
+++ caller 4
+++ :
+++ awk ' { l[NR]=$3":"$1" "$2 }
                   END { for (i=NR; i>0;) print "Trace "NR-i": "l[i--] }
                 '
+++ caller 5
+++ :
+++ caller 6
+++ :
+++ caller 7
Trace 0: ./rear:696 main
Trace 1: /home/ron/rear/usr/share/rear/lib/mkrescue-workflow.sh:12 WORKFLOW_mkrescue
Trace 2: /home/ron/rear/usr/share/rear/lib/framework-functions.sh:129 SourceStage
Trace 3: /home/ron/rear/usr/share/rear/lib/framework-functions.sh:59 Source
Trace 4: /home/ron/rear/usr/share/rear/prep/GNU/Linux/200_include_serial_console.sh:7 source
Trace 5: /home/ron/rear/usr/share/rear/lib/serial-functions.sh:26 get_serial_device_speed
Trace 6: /home/ron/rear/usr/share/rear/lib/_input-output-functions.sh:791 BugError
+++ echo '=== End stack trace ==='
=== End stack trace ===
+++ kill -USR1 220126
+++ EXIT_FAIL_MESSAGE=0
+++ echo 'Aborting due to an error, check /home/ron/rear/var/log/rear/rear-system.log for details'
+++ kill 220126
+++ LogPrint 'Error exit of rear mkrescue (PID 220126) and its descendant processes'
+++ Log 'Error exit of rear mkrescue (PID 220126) and its descendant processes'
+++ test -w /home/ron/rear/var/log/rear/rear-system.log
+++ echo '2023-01-18 12:05:11.849536872 Error exit of rear mkrescue (PID 220126) and its descendant processes'
2023-01-18 12:05:11.849536872 Error exit of rear mkrescue (PID 220126) and its descendant processes
+++ Print 'Error exit of rear mkrescue (PID 220126) and its descendant processes'
+++ log_descendants_pids
++++ pstree -Aplau 220126
+++ Log 'rear,220126 ./rear -D -v mkrescue
  `-rear,220678 ./rear -D -v mkrescue
      `-rear,220700 ./rear -D -v mkrescue
          `-pstree,220701 -Aplau 220126'
+++ test -w /home/ron/rear/var/log/rear/rear-system.log
+++ echo '2023-01-18 12:05:11.989447706 rear,220126 ./rear -D -v mkrescue
                                `-rear,220678 ./rear -D -v mkrescue
                                    `-rear,220700 ./rear -D -v mkrescue
                                        `-pstree,220701 -Aplau 220126'
2023-01-18 12:05:11.989447706 rear,220126 ./rear -D -v mkrescue
                                `-rear,220678 ./rear -D -v mkrescue
                                    `-rear,220700 ./rear -D -v mkrescue
                                        `-pstree,220701 -Aplau 220126
+++ terminate_descendants_from_children_to_grandchildren
+++ local remaining_columns
+++ test 91
+++ remaining_columns=91
+++ remaining_columns=51
+++ test 51 -ge 40
+++ local current_pid=
+++ local descendant_pid=
+++ local not_yet_terminated_pids=
++++ descendants_pids 220126
++++ local parent_pid=220126
++++ kill -0 220126
++++ local child_pid=
+++++ ps --ppid 220126 -o pid=
++++ for child_pid in $( ps --ppid $parent_pid -o pid= )
++++ kill -0 220678
++++ descendants_pids 220678
++++ local parent_pid=220678
++++ kill -0 220678
++++ local child_pid=
+++++ ps --ppid 220678 -o pid=
++++ for child_pid in $( ps --ppid $parent_pid -o pid= )
++++ kill -0 220705
++++ descendants_pids 220705
++++ local parent_pid=220705
++++ kill -0 220705
++++ local child_pid=
+++++ ps --ppid 220705 -o pid=
++++ for child_pid in $( ps --ppid $parent_pid -o pid= )
++++ kill -0 220708
++++ kill -0 220705
++++ echo 220705
++++ kill -0 220678
++++ echo 220678
++++ kill -0 220126
++++ echo 220126
+++ local 'descendant_pids_from_children_to_parent=220705
220678
220126'
+++ local descendant_pids_from_parent_to_children=
+++ for descendant_pid in $descendant_pids_from_children_to_parent
+++ descendant_pids_from_parent_to_children='220705 '
+++ for descendant_pid in $descendant_pids_from_children_to_parent
+++ descendant_pids_from_parent_to_children='220678 220705 '
+++ for descendant_pid in $descendant_pids_from_children_to_parent
+++ descendant_pids_from_parent_to_children='220126 220678 220705 '
+++ test 220678
+++ current_pid=220678
+++ for descendant_pid in $descendant_pids_from_parent_to_children
+++ test 220126 -eq 220126
+++ continue
+++ for descendant_pid in $descendant_pids_from_parent_to_children
+++ test 220126 -eq 220678
+++ test 220678 -eq 220678
+++ continue
+++ for descendant_pid in $descendant_pids_from_parent_to_children
+++ test 220126 -eq 220705
+++ test 220678 -eq 220705
+++ kill -0 220705
/home/ron/rear/usr/share/rear/lib/_input-output-functions.sh: line 234: kill: (220705) - No such process
+++ continue
+++ sleep 1
+++ for descendant_pid in $descendant_pids_from_parent_to_children
+++ test 220126 -eq 220126
+++ continue
+++ for descendant_pid in $descendant_pids_from_parent_to_children
+++ test 220126 -eq 220678
+++ test 220678 -eq 220678
+++ continue
+++ for descendant_pid in $descendant_pids_from_parent_to_children
+++ test 220126 -eq 220705
+++ test 220678 -eq 220705
+++ kill -0 220705
/home/ron/rear/usr/share/rear/lib/_input-output-functions.sh: line 251: kill: (220705) - No such process
+++ test ''
+++ return 0
+++ test 1 -gt 0
+++ LogPrint 'Exiting subshell 1 (where the actual error happened)'
+++ Log 'Exiting subshell 1 (where the actual error happened)'
+++ test -w /home/ron/rear/var/log/rear/rear-system.log
+++ echo '2023-01-18 12:05:13.093259853 Exiting subshell 1 (where the actual error happened)'
2023-01-18 12:05:13.093259853 Exiting subshell 1 (where the actual error happened)
+++ Print 'Exiting subshell 1 (where the actual error happened)'
+++ test 0 -gt 1
+++ exit 1
+++ DoExitTasks
+++ LogPrint 'Exiting rear mkrescue (PID 220126) and its descendant processes ...'
+++ Log 'Exiting rear mkrescue (PID 220126) and its descendant processes ...'
+++ test -w /home/ron/rear/var/log/rear/rear-system.log
+++ echo '2023-01-18 12:05:13.106503779 Exiting rear mkrescue (PID 220126) and its descendant processes ...'
2023-01-18 12:05:13.106503779 Exiting rear mkrescue (PID 220126) and its descendant processes ...
+++ Print 'Exiting rear mkrescue (PID 220126) and its descendant processes ...'
+++ sleep 3
+++ log_descendants_pids
++++ pstree -Aplau 220126
+++ Log 'rear,220126 ./rear -D -v mkrescue
  `-rear,220720 ./rear -D -v mkrescue
      `-pstree,220721 -Aplau 220126'
+++ test -w /home/ron/rear/var/log/rear/rear-system.log
+++ echo '2023-01-18 12:05:16.299799333 rear,220126 ./rear -D -v mkrescue
                                `-rear,220720 ./rear -D -v mkrescue
                                    `-pstree,220721 -Aplau 220126'
2023-01-18 12:05:16.299799333 rear,220126 ./rear -D -v mkrescue
                                `-rear,220720 ./rear -D -v mkrescue
                                    `-pstree,220721 -Aplau 220126
+++ terminate_descendants_from_grandchildren_to_children
+++ local remaining_columns
+++ test 91
+++ remaining_columns=91
+++ remaining_columns=51
+++ test 51 -ge 40
+++ local descendant_pid=
+++ local not_yet_terminated_pids=
++++ descendants_pids 220126
++++ local parent_pid=220126
++++ kill -0 220126
++++ local child_pid=
+++++ ps --ppid 220126 -o pid=
++++ for child_pid in $( ps --ppid $parent_pid -o pid= )
++++ kill -0 220726
++++ descendants_pids 220726
++++ local parent_pid=220726
++++ kill -0 220726
++++ local child_pid=
+++++ ps --ppid 220726 -o pid=
++++ for child_pid in $( ps --ppid $parent_pid -o pid= )
++++ kill -0 220729
++++ kill -0 220726
++++ echo 220726
++++ kill -0 220126
++++ echo 220126
+++ for descendant_pid in $( descendants_pids $MASTER_PID )
+++ test 220126 -eq 220726
+++ kill -0 220726
/home/ron/rear/usr/share/rear/lib/_input-output-functions.sh: line 151: kill: (220726) - No such process
+++ continue
+++ for descendant_pid in $( descendants_pids $MASTER_PID )
+++ test 220126 -eq 220126
+++ continue
+++ test ''
+++ return 0
+++ LogPrint 'Running exit tasks'
+++ Log 'Running exit tasks'
+++ test -w /home/ron/rear/var/log/rear/rear-system.log
+++ echo '2023-01-18 12:05:16.373183758 Running exit tasks'
2023-01-18 12:05:16.373183758 Running exit tasks
+++ Print 'Running exit tasks'
+++ local exit_task=
+++ for exit_task in "${EXIT_TASKS[@]}"
+++ Debug 'Exit task '\''cleanup_build_area_and_end_program'\'''
+++ test 1
+++ Log 'Exit task '\''cleanup_build_area_and_end_program'\'''
+++ test -w /home/ron/rear/var/log/rear/rear-system.log
+++ echo '2023-01-18 12:05:16.384641036 Exit task '\''cleanup_build_area_and_end_program'\'''
2023-01-18 12:05:16.384641036 Exit task 'cleanup_build_area_and_end_program'
+++ eval cleanup_build_area_and_end_program
++++ cleanup_build_area_and_end_program
++++ local mounted_in_BUILD_DIR
+++++ date +%s
++++ Log 'Finished rear mkrescue in 7 seconds'
++++ test -w /home/ron/rear/var/log/rear/rear-system.log
++++ echo '2023-01-18 12:05:16.401740962 Finished rear mkrescue in 7 seconds'
2023-01-18 12:05:16.401740962 Finished rear mkrescue in 7 seconds
++++ has_binary is_true
++++ for bin in "$@"
++++ type is_true
++++ return 0
++++ is_true 1
++++ case "$1" in
++++ return 0
+++++ grep /var/tmp/rear.IlZKXKqbMjtxMa6
+++++ mount
+++++ sed -e 's/^/  /'
++++ mounted_in_BUILD_DIR=
++++ test ''
++++ LogPrint 'To remove the build area you may use (with caution): rm -Rf --one-file-system /var/tmp/rear.IlZKXKqbMjtxMa6'
++++ Log 'To remove the build area you may use (with caution): rm -Rf --one-file-system /var/tmp/rear.IlZKXKqbMjtxMa6'
++++ test -w /home/ron/rear/var/log/rear/rear-system.log
++++ echo '2023-01-18 12:05:16.430517592 To remove the build area you may use (with caution): rm -Rf --one-file-system /var/tmp/rear.IlZKXKqbMjtxMa6'
2023-01-18 12:05:16.430517592 To remove the build area you may use (with caution): rm -Rf --one-file-system /var/tmp/rear.IlZKXKqbMjtxMa6
++++ Print 'To remove the build area you may use (with caution): rm -Rf --one-file-system /var/tmp/rear.IlZKXKqbMjtxMa6'
++++ Log 'End of program '\''rear'\'' reached'
++++ test -w /home/ron/rear/var/log/rear/rear-system.log
++++ echo '2023-01-18 12:05:16.446071962 End of program '\''rear'\'' reached'
2023-01-18 12:05:16.446071962 End of program 'rear' reached
+++ for exit_task in "${EXIT_TASKS[@]}"
+++ Debug 'Exit task '\''(( EXIT_FAIL_MESSAGE )) && echo '\''rear mkrescue failed, check /home/ron/rear/var/log/rear/rear-system.log for details'\'' 1>&8'\'''
+++ test 1
+++ Log 'Exit task '\''(( EXIT_FAIL_MESSAGE )) && echo '\''rear mkrescue failed, check /home/ron/rear/var/log/rear/rear-system.log for details'\'' 1>&8'\'''
+++ test -w /home/ron/rear/var/log/rear/rear-system.log
+++ echo '2023-01-18 12:05:16.464350573 Exit task '\''(( EXIT_FAIL_MESSAGE )) && echo '\''rear mkrescue failed, check /home/ron/rear/var/log/rear/rear-system.log for details'\'' 1>&8'\'''
2023-01-18 12:05:16.464350573 Exit task '(( EXIT_FAIL_MESSAGE )) && echo 'rear mkrescue failed, check /home/ron/rear/var/log/rear/rear-system.log for details' 1>&8'
+++ eval '(( EXIT_FAIL_MESSAGE )) && echo '\''rear mkrescue failed, check /home/ron/rear/var/log/rear/rear-system.log for details'\'' 1>&8'
++++ ((  EXIT_FAIL_MESSAGE  ))
+++ for exit_task in "${EXIT_TASKS[@]}"
+++ Debug 'Exit task '\''exec 8>&-'\'''
+++ test 1
+++ Log 'Exit task '\''exec 8>&-'\'''
+++ test -w /home/ron/rear/var/log/rear/rear-system.log
+++ echo '2023-01-18 12:05:16.478872629 Exit task '\''exec 8>&-'\'''
2023-01-18 12:05:16.478872629 Exit task 'exec 8>&-'
+++ eval 'exec 8>&-'
++++ exec
+++ for exit_task in "${EXIT_TASKS[@]}"
+++ Debug 'Exit task '\''exec 7>&-'\'''
+++ test 1
+++ Log 'Exit task '\''exec 7>&-'\'''
+++ test -w /home/ron/rear/var/log/rear/rear-system.log
+++ echo '2023-01-18 12:05:16.493658221 Exit task '\''exec 7>&-'\'''
2023-01-18 12:05:16.493658221 Exit task 'exec 7>&-'
+++ eval 'exec 7>&-'
++++ exec
+++ for exit_task in "${EXIT_TASKS[@]}"
+++ Debug 'Exit task '\''exec 6<&-'\'''
+++ test 1
+++ Log 'Exit task '\''exec 6<&-'\'''
+++ test -w /home/ron/rear/var/log/rear/rear-system.log
+++ echo '2023-01-18 12:05:16.506258703 Exit task '\''exec 6<&-'\'''
2023-01-18 12:05:16.506258703 Exit task 'exec 6<&-'
+++ eval 'exec 6<&-'
++++ exec
+++ for exit_task in "${EXIT_TASKS[@]}"
+++ Debug 'Exit task '\'''\'''
+++ test 1
+++ Log 'Exit task '\'''\'''
+++ test -w /home/ron/rear/var/log/rear/rear-system.log
+++ echo '2023-01-18 12:05:16.518762981 Exit task '\'''\'''
2023-01-18 12:05:16.518762981 Exit task ''
+++ eval ''
```

jsmeix commented at 2023-01-19 09:14:

This is the relevant excerpt of the log:

+ source /home/ron/rear/usr/share/rear/prep/GNU/Linux/200_include_serial_console.sh
++ [[ -z '' ]]
++ local devnode speed=
+++ get_serial_console_devices
+++ test ''
+++ sort
+++ ls
++ for devnode in $( get_serial_console_devices )
+++ get_serial_device_speed rear
+++ local devnode=rear
+++ test -c rear
+++ BugError 'get_serial_device_speed() called for '\''rear'\'' which is no character device'

The crucial line therein is the plain

+++ ls

which comes from this code in lib/serial-functions.sh

function get_serial_console_devices () {
    test "$SERIAL_CONSOLE_DEVICES" && echo $SERIAL_CONSOLE_DEVICES || ls /dev/ttyS[0-9]* /dev/hvsi[0-9]* | sort

online at
https://github.com/rear/rear/blob/rear-2.7/usr/share/rear/lib/serial-functions.sh#L4

Because there is a global shopt -s nullglob extglob
setting in usr/sbin/rear it means in this case that
when there is none of /dev/ttyS[0-9]* or /dev/hvsi[0-9]*
it becomes a plain ls command which lists what there is
in the current working directory which is 'rear' in this case
cf. "Beware of the emptiness" in
https://github.com/rear/rear/wiki/Coding-Style

It was (up to this issue) an unexpected exceptional case
that there is no /dev/ttyS[0-9]* device node on a system.
I will improve the get_serial_console_devices() function
to work fail-safe when there are no such device nodes.

@arkansas-coder
the right workaround with current ReaR code
is to explicitly specify in etc/rear/local.conf

SERIAL_CONSOLE_DEVICES=''

and/or

USE_SERIAL_CONSOLE='no'

to tell ReaR that there are no serial console device nodes
and/or to tell ReaR that no serial console should be used.

See the section
"# Serial console support for the ReaR rescue/recovery system"
in usr/share/rear/conf/default.conf
online at
https://github.com/rear/rear/blob/rear-2.7/usr/share/rear/conf/default.conf#L3094

arkansas-coder commented at 2023-01-19 20:00:

Thanks for the quick response and solution.
I'm unable to follow the details of the bug, but I get the general idea.
Thanks again

jsmeix commented at 2023-01-20 08:34:

I still need to fix this issue
by improving the get_serial_console_devices() function
to work fail-safe if no serial device nodes exist.

gdha commented at 2023-01-20 08:47:

@arkansas-coder With all due respect how will you boot from the DR image on a Pi4? As far as I know there is node code for that part.

jsmeix commented at 2023-01-31 12:15:

With https://github.com/rear/rear/pull/2915 merged
this BugError should be avoided


[Export of Github issue for rear/rear.]