fix nfs mount problems with latest kernel on some nas systems
authorFrank Lage <nixkoenner@users.schwerkraft.elitedvb.net>
Sun, 31 Oct 2010 18:06:37 +0000 (18:06 +0000)
committerFrank Lage <nixkoenner@users.schwerkraft.elitedvb.net>
Sun, 31 Oct 2010 18:06:37 +0000 (18:06 +0000)
networkbrowser/src/AutoMount.py
networkbrowser/src/MountEdit.py
networkbrowser/src/NetworkBrowser.py

index ba454bd..cd3f1e1 100755 (executable)
@@ -59,7 +59,7 @@ class AutoMount():
                                        data['ip'] = getValue(mount.findall("ip"), "192.168.0.0").encode("UTF-8")
                                        data['sharedir'] = getValue(mount.findall("sharedir"), "/exports/").encode("UTF-8")
                                        data['sharename'] = getValue(mount.findall("sharename"), "MEDIA").encode("UTF-8")
-                                       data['options'] = getValue(mount.findall("options"), "rw,nolock").encode("UTF-8")
+                                       data['options'] = getValue(mount.findall("options"), "rw,nolock,tcp").encode("UTF-8")
                                        print "NFSMOUNT",data
                                        self.automounts[data['sharename']] = data
                                except Exception, e:
@@ -433,7 +433,7 @@ class AutoMount_Unused:
                                if tmpsharedir[-1:] == "$":
                                        tmpdir = tmpsharedir.replace("$", "\\$")
                                        tmpsharedir = tmpdir
-                               nfscmd = 'mount -o nolock -t nfs ' + data['ip'] + ':' + tmpsharedir + ' ' + path
+                               nfscmd = 'mount -o nolock,tcp -t nfs ' + data['ip'] + ':' + tmpsharedir + ' ' + path
                                print "[AutoMount.py] nfsscmd--->",nfscmd
                                self.MountConsole.ePopen(nfscmd, self.CheckMountPointFinished, [data, callback])
                        if data['mounttype'] == 'cifs' and data['active'] is True:
index 8980c34..cd645be 100755 (executable)
@@ -128,7 +128,7 @@ class AutoMountEdit(Screen, ConfigListScreen):
                 if self.mountinfo.has_key('options'):
                         options = self.mountinfo['options']
                 else:
-                        options = "rw,nolock"
+                        options = "rw,nolock,tcp"
                 if self.mountinfo.has_key('username'):
                         username = self.mountinfo['username']
                 else:
@@ -151,7 +151,7 @@ class AutoMountEdit(Screen, ConfigListScreen):
                         sharedir = "/export/hdd"
                 if options is False:
                         if mounttype == "nfs":
-                                options = "rw,nolock"
+                                options = "rw,nolock,tcp"
                         else:
                                 options = "rw"
                 if username is False:
@@ -188,7 +188,7 @@ class AutoMountEdit(Screen, ConfigListScreen):
                 if self.mounttypeConfigEntry.value == "cifs":
                         self.optionsConfigEntry = NoSave(ConfigText(default = "rw", visible_width = 50, fixed_size = False))
                 else:
-                        self.optionsConfigEntry = NoSave(ConfigText(default = "rw,nolock", visible_width = 50, fixed_size = False))
+                        self.optionsConfigEntry = NoSave(ConfigText(default = "rw,nolock,tcp", visible_width = 50, fixed_size = False))
                 self.optionsEntry = getConfigListEntry(_("Mount options"), self.optionsConfigEntry)
                 self.list.append(self.optionsEntry)
                 if self.mounttypeConfigEntry.value == "cifs":
index a35621a..dea7c00 100755 (executable)
@@ -439,7 +439,7 @@ class NetworkBrowser(Screen):
                                data['ip'] = selection[2]
                                data['sharename'] = selection[1]
                                data['sharedir'] = selection[4]
-                               data['options'] = "rw,nolock"
+                               data['options'] = "rw,nolock,tcp"
 
                                for sharename, sharedata in mounts.items():
                                        if sharedata['ip'] == selection[2] and sharedata['sharedir'] == selection[4]: