#686 Mount point with a space results in WebGUI error

v0.7
closed
Volker
WebGUI (143)
5
2012-10-28
2009-09-26
dimaj
No

When trying to create a mount point with a name that contains a space, WebGUI states that there's an error and we could retry mounting it.

Steps to reproduce:
1) Navigate to FreeNAS | Disks | Mount Point
2) Add a new mount point where you mount an ISO image to a name "This Is My ISO" or any name that contains spaces
3) Save your configuration and notice that status shows an error next to your newly mounted ISO
4) SSH into the FreeNAS or navigate to FreeNAS | Advanced | Command and execute "mount" (without quotes). Notice that ISO image is actually mounted

How to fix it:
1) Navigate to /etc/inc/util.inc
2) Locate a function called: get_mounts_list
3) Replace line:
if (0 == preg_match("/^(\S+) on (\S+).+fsid (\S+).+/", $line, $aline))
with
if (0 == preg_match("/^(\S+) on ([\w\d\s.\/]+).+fsid (\S+).+/", $line, $aline))

Discussion