HomeDefectsLIN9-8513
Fixed

LIN9-8513 : inetutils: rcp directory copy is not working

Created: May 16, 2019    Updated: Aug 21, 2019
Resolved Date: Jun 16, 2019
Found In Version: 9.0.0.19
Fix Version: 9.0.0.22
Severity: Severe
Applicable for: Wind River Linux 9
Component/s: Userspace

Description

The rcp command in WRL9 can't copy directory.

Steps to Reproduce

project configuration:

wrlinux-9/setup.sh --dl-layers --distros wrlinux-ovp --machines intel-x86-64 --templates feature/initramfs,feature/kdump,feature/kexec,feature/kernel-ovp-kvm,feature/sysklogd,feature/dpdk,feature/package-management --layers wr-kernel wr-ovp

 

Start VM using a Freebsd qcow2 image, which can be download from:

[https://download.freebsd.org/ftp/releases/VM-IMAGES/11.2-RELEASE/amd64/Latest/]

 

Use the attached xml, change the qcow2 image path as your test environment.

#virsh create  x86-64-kvm-guest-local-qcow2.xml

 

To access the guest, you can use vncviewer on another host.

The command "virsh vncdisplay $domain_name " will show the vncdisplay id, by default it's 0.

vncviewer $WRL9_host_ipaddress:0

 

If you want to use the "virsh console $domain_name" to access the serial console on the WRL9 host shell, you may need to change the Freebsd default setting to use the serial console.

/boot/defaults/loader.conf:

console="comconsole"

 

/etc/ttys:

dcons   "/usr/libexec/getty std.9600"   vt100   on secure

 

Then you can use:

#virsh console $domain_name 

to access the guest console, to exit the guest console, use Ctrl+] .

 

In the freebsd guest, enable rshd by:

create /root/.rhosts:

192.168.122.1 root

 

edit /etc/hosts.equive:

+@192.168.122.1

 

edit /etc/pam.d/rsh:

auth required pam_rhosts.so no_warn allow_root

 

/etc/inetd.conf:

shell stream tcp nowait root /usr/libexec/rshd rshd
login stream tcp nowait root /usr/libexec/rlogind rlogind

 

/etc/rc.d/inetd restart

 

mkdir /root/test

echo "test" > /root/test/test1

 

From the WRL9 host shell, run the following command:

mkdir -p /root/gyang

rcp -r root@192.168.122.211:/root /root/gyang/

 

After complete, check if the root directory, it's empty.

 

replace rcp.inetutils with the WRL6's binary, it works fine.