netkit-jh / netkit-jh-build

Build scripts for the kernel, filesystem and assisting scripts/programs for Netkit-JH.
https://netkit-jh.github.io/
GNU General Public License v3.0
22 stars 12 forks source link

Machine files with spaces in cause errors when copying files into the VM #11

Closed TechSupportJosh closed 3 years ago

TechSupportJosh commented 3 years ago

Describe the bug File names that contain spaces in the file names do not get copied in correctly, causing errors in the netkit-phase1 startup script.

To Reproduce Steps to reproduce the behavior:

  1. Create a lab with a single machine in (we'll call it a).
  2. Create a file at a/root/test file.txt
  3. Wait for machine to boot
  4. See error

Expected behavior The file should be copied in normally.

Screenshots


netkit-phase1[1543]: Mounting /home/josh on /hosthome...
netkit-phase1[1543]: Mounting /home/josh/netkit-jh-build/tests/labs/abr on /hostlab ...
netkit-phase1[1543]: Configuring host name...
netkit-phase1[1543]: Copying a specific files from /hostlab/a/...
netkit-phase1[1664]: stat: cannot statx '/root/test': No such file or directory
netkit-phase1[1664]: stat: cannot statx 'file.txt': No such file or directory
netkit-phase1[1543]: --- Netkit phase 1 initialization terminated ---```

**Additional context**
This error comes from this line here: https://github.com/netkit-jh/netkit-jh-build/blob/master/fs/filesystem-tweaks/etc/netkit/netkit-phase1#L119
TechSupportJosh commented 3 years ago

Fixed by 29c7a8667cdfec9df2180b343371ce1d1cf78820.