[NetworkBrowser] Problems with default options
Issue #746
new
AutoMount.sanitizeOptions()
is intended to supply defaults for options if they aren’t supplied by users.
But:
- It applies different NFS default options depending on whether the “Mount using” setting is autofs, fstab or enigma2, without there being any apparent reason for the differences.
- It can override (depending on option processing details not present in the man pages) some user-specified options: for example, if the user adds the NFS mount option
nfsvers=4
, thensanitizeOptions()
will make the system file optionnfsvers=4,…,nfsvers=3
. Similar overrides can happen for the NFS optionstimeo
andhard
and the CIFS optioncache
. - It uses loose substring matches in the option string to detect whether particular options are present, rather than parsing the option string to explicitly test against option names and values. For example, it will replace
iocharset=utf8
in the user-specified options withiocharset=iocharset=utf8
, because it doesoptions = options.replace('utf8','iocharset=utf8')
Replication
For mount types fstab or autofs (sanitised options aren’t written to file for mount type enigma2), add any of the above-mentioned options in a new mount setup and create the mount. Then examine the options in /etc/auto.network
(for autofs mounts) or /etc/fstab
(for fstab mounts).