Editing hostname not clean

Issue #459 resolved
prl created an issue

When a user tries to change a T series hostname in MENU>Setup>Network>Mount manager>Change hostname, the newline at the end of the hostname file is not stripped before passing it to the virtual keyboard.

This means that if the user enters characters immediately, they aren't visible (they're on the "next line" of text, which isn't displayed).

The user can correctly edit the hostname only after using BACK once to delete the newline, and then editing normally, or by using the virtual left arrow button (bottom line of the virtual keyboard) to step back into the body of the text and then edit normally.

If the user deletes the trailing newline, a newline isn't added to the hostname when it is written.

The hostEdit() and hostnameCallback() methods inPlugins.SystemPlugins.NetworkBrowser.MountManager.AutoMountManager should respectively strip the newline from the hostname when read and add one when it is written.

Replication steps

Enter MENU>Setup>Network>Mount manager>Change hostname, and then use the remote/virtual keyboard to enter a single character. No character appears. Use the left arrow on the bottom line of the virtual keyboard to step back one character (nothing apparently changes). Then use the remote BACK key to delete one character (it should be the original terminating newline). The entered character will now be visible.

If GREEN is now used to save the new hostname, /etc/hostname will not be terminated with a newline (as it normally is).

Comments (2)

  1. Log in to comment