Index: ipk/source/network_networkbrowser_1_0/usr/lib/enigma2/python/Plugins/SystemPlugins/NetworkBrowser/AutoMount.py
===================================================================
--- ipk/source/network_networkbrowser_1_0/usr/lib/enigma2/python/Plugins/SystemPlugins/NetworkBrowser/AutoMount.py	(revision 14692)
+++ ipk/source/network_networkbrowser_1_0/usr/lib/enigma2/python/Plugins/SystemPlugins/NetworkBrowser/AutoMount.py	(revision 14692)
@@ -0,0 +1,559 @@
+# -*- coding: utf-8 -*-
+# for localized messages
+from __init__ import _
+from re import compile as re_compile
+from os import path as os_path, symlink, listdir, unlink, readlink, remove, system
+#-- obi start
+#from enigma import eTimer
+from enigma import eTimer, eConsoleAppContainer
+#-- obi stop
+from Components.Console import Console
+from Components.Harddisk import harddiskmanager #global harddiskmanager
+from Tools.Directories import isMount, removeDir, createDir, copyfile, pathExists
+
+from xml.etree.cElementTree import parse as cet_parse
+import commands
+import os
+
+def command(comandline, strip=1):
+	comandline = comandline + " >/tmp/command.txt"
+	os.system(comandline)
+	text = ""
+	if os.path.exists("/tmp/command.txt") is True:
+		file = open("/tmp/command.txt", "r")
+		if strip == 1:
+			for line in file:
+				text = text + line.strip() + '\n'
+		else:
+			for line in file:
+				text = text + line
+				if text[-1:] != '\n': text = text + "\n"
+		file.close
+	# if one or last line then remove linefeed
+	if text[-1:] == '\n': text = text[:-1]
+	comandline = text
+	os.system("rm /tmp/command.txt")
+	return comandline
+
+debug = command('cat /var/etc/autostart/start-config | grep debug | cut -d = -f2')
+
+# currently unused autofs support stuff
+
+def tryOpen(filename):
+	try:
+		procFile = open(filename)
+	except IOError:
+		return ""
+	return procFile
+	
+class AutoMount:
+	def __init__(self):
+		global debug
+		self.debug = debug
+		self.automounts = {}
+		self.restartConsole = Console()
+		self.MountConsole = Console()
+		self.activeMountsCounter = 0
+		self.getAutoMountPoints()
+
+	# helper function
+	def regExpMatch(self, pattern, string):
+		if string is None:
+			return None
+		try:
+			return pattern.search(string).group()
+		except AttributeError:
+			None
+
+	# helper function to convert ips from a sring to a list of ints
+	def convertIP(self, ip):
+		strIP = ip.split('.')
+		ip = []
+		for x in strIP:
+			ip.append(int(x))
+		return ip
+
+
+	def getAutoMountPoints(self, callback = None):
+		if self.debug != "off":
+			print "[AutoMount.py] getAutoMountPoints"
+		automounts = []
+		self.automounts = {}
+		self.activeMountsCounter = 0
+		fp = None
+		try:
+			fp = file('/var/etc/automount/auto.misc', 'r')
+			automounts = fp.readlines()
+			fp.close()
+		except:
+			if self.debug != "off":
+				print "[AutoMount.py] /var/etc/automount/auto.misc - opening failed"
+
+		ipRegexp = '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'
+		cifsIpLinePattern = re_compile('://' + ipRegexp + '/')
+		nfsIpLinePattern = re_compile(ipRegexp + ':/')
+		ftpfsIpLinePattern = re_compile('://' + ipRegexp + '\\:')
+		
+		ipPattern = re_compile(ipRegexp)
+		for line in automounts:
+#			if self.debug != "off":
+#				print "[AutoMount.py] Line:",line
+			split = line.strip().split('\t',2)
+			if split[0] == '*':
+				continue
+			if len(split) == 2 and split[0][0] == '*':
+				continue
+			if len(split) == 3:
+				data = { 'isMounted': False, 'active': False, 'ip': False, 'sharename': False, 'sharedir': False, 'username': False, 'password': False, 'mounttype' : False, 'options' : False, 'hdd_replacement' : False, 'rsize' : False, 'wsize' : False, 'protocol' : False, 'proxy' : False, 'proxy_ip' : False, 'proxy_port' : False, 'proxy_auth' : False, 'proxy_type' : False, 'proxy_user' : False, 'proxy_pass' : False, 'ssl' : False, 'ssl_type' : False, 'port' : False, 'ftp_auth' : True }
+
+				if '-fstype=auto' in split[1]:
+					continue
+				if '-fstype=smbfs' in split[1]:
+					continue
+				if '-fstype=upnpfs' in split[1]:
+					continue
+				if '-fstype=jffs2' in split[1]:
+					continue
+									
+				currshare = ""
+				if split[0][0] == '#':
+					data['active'] = False
+					currshare = split[0][1:]
+					data['sharename'] = currshare
+				else:
+					data['active'] = True
+					self.activeMountsCounter +=1
+					currshare = split[0]
+					data['sharename'] = currshare
+
+				if '-fstype=cifs' in split[1]:
+					data['mounttype'] = 'cifs'
+					options = split[1][split[1].index('-fstype=cifs')+13 : split[1].index(',rsize=')]
+					if options is not None:
+						data['options'] = options
+
+					if 'rsize=' in split[1]:
+						rsize = split[1][split[1].index(',rsize=')+7 : split[1].index(',wsize=')]
+						if rsize is not None:
+							data['rsize'] = rsize
+
+					if 'wsize=' in split[1]:
+						wsize = split[1][split[1].index(',wsize=')+7 : split[1].index(',user=')]
+						if wsize is not None:
+							data['wsize'] = wsize
+
+					if 'user=' in split[1]:
+						username = split[1][split[1].index(',user=')+6 : split[1].index(',pass=')]
+						if username is not None:
+							data['username'] = username
+					if 'pass=' in split[1]:
+						password = split[1][split[1].index(',pass=')+6 : ]
+						if password is not None:
+							data['password'] = password
+					ip = self.regExpMatch(ipPattern, self.regExpMatch(cifsIpLinePattern, split[2]))
+					if ip is not None:
+						data['ip'] = ip
+					sharedir = split[2][split[2].index(ip)+len(ip)+1 : ]
+					if sharedir is not None:
+						tmpsharedir = sharedir.replace("\\ ", " ")
+						if tmpsharedir[-2:] == "\$":
+							tmpdir = tmpsharedir.replace("\$", "$")
+							tmpsharedir = tmpdir
+						data['sharedir'] = tmpsharedir
+
+				elif '-fstype=nfs' in split[1]:
+					data['mounttype'] = 'nfs'
+					
+					options = split[1][split[1].index('-fstype=nfs')+12 : split[1].index(',rsize=')]
+					if options is not None:
+						data['options'] = options
+
+					if 'rsize=' in split[1]:
+						rsize = split[1][split[1].index(',rsize=')+7 : split[1].index(',wsize=')]
+						if rsize is not None:
+							data['rsize'] = rsize
+
+					if 'wsize=' in split[1]:
+						if ',udp' in split[1]:
+							wsize = split[1][split[1].index(',wsize=')+7 : split[1].index(',udp')]
+							if wsize is not None:
+								data['wsize'] = wsize
+						elif ',tcp' in split[1]:
+							wsize = split[1][split[1].index(',wsize=')+7 : split[1].index(',tcp')]
+							if wsize is not None:
+								data['wsize'] = wsize
+
+					if ',udp' in split[1]:
+						protocol = 'udp'
+						if protocol is not None:
+							data['protocol'] = protocol
+					elif ',tcp' in split[1]:
+						protocol = 'tcp'
+						if protocol is not None:
+							data['protocol'] = protocol
+							
+					ip = self.regExpMatch(ipPattern, self.regExpMatch(nfsIpLinePattern, split[2]))
+					if ip is not None:
+						data['ip'] = ip
+
+					sharedir = split[2][split[2].index(ip)+len(ip)+1 : ]
+					if sharedir is not None:
+						tmpsharedir = sharedir.replace("\\ ", " ")
+						if tmpsharedir.startswith("/") and len(tmpsharedir) > 1:
+							tmpsharedir = tmpsharedir[+1:]
+																			
+						if tmpsharedir[-2:] == "\$":
+							tmpdir = tmpsharedir.replace("\$", "$")
+							tmpsharedir = tmpdir
+							
+						data['sharedir'] = tmpsharedir
+
+				elif '-fstype=ftpfs' in split[1]:
+					data['mounttype'] = 'ftpfs'
+					options = split[1][split[1].index('-fstype=ftpfs')+14 : ]
+					if options is not None:
+						data['options'] = options
+						
+					if 'proxy=' in split[1] and ',allow_other' in split[1]:
+						proxy = True
+						data['proxy'] = proxy
+
+						proxy_ip = split[1][split[1].index(',proxy=')+7 : split[1].index(',allow_other') ]
+						if proxy_ip is not None:
+							proxy_ip = proxy_ip.replace("\\", "")
+
+							tmp = proxy_ip.split(":")
+							if len(tmp) == 2: 
+								proxy_ip = tmp[0]
+								proxy_port = tmp[1]
+							else:
+								proxy_ip = [222, 1, 0, 1]
+								proxy_port = 8080
+							
+							data['proxy_port'] = int(proxy_port)
+							data['proxy_ip'] = proxy_ip
+
+						if 'proxy_user=' in split[1] and ',nonempty' in split[1]:
+							proxy_auth = True
+							data['proxy_auth'] = proxy_auth
+
+							proxy_user = split[1][split[1].index(',proxy_user=')+12 : split[1].index(',nonempty') ]
+							if proxy_user is not None:
+								proxy_user = proxy_user.replace("\\", "")
+
+								tmp = proxy_user.split(":")
+								if len(tmp) == 2: 
+									proxy_user = tmp[0]
+									proxy_pass = tmp[1]
+								else:
+									proxy_user = "xbox"
+									proxy_pass = "xbox"
+
+								data['proxy_user'] = proxy_user
+								data['proxy_pass'] = proxy_pass
+							
+						else:
+							proxy_auth = False
+							data['proxy_auth'] = proxy_auth
+															
+						if ',socks5' in split[1]:
+							proxy_type = 'socks5'
+						elif ',socks4' in split[1]:
+							proxy_type = 'socks4'
+						else:
+							proxy_type = 'html'
+
+						data['proxy_type'] = proxy_type
+
+					else:
+						proxy = False
+						proxy_auth = False	
+						data['proxy'] = proxy
+						data['proxy_auth'] = proxy_auth
+
+							
+					if ',ssl_try' in split[1]:
+						ssl_type = 'ssl_try'
+						ssl = True
+					elif ',ssl_control' in split[1]:
+						ssl_type = 'ssl_control'
+						ssl = True
+					elif ',ssl' in split[1]:
+						ssl_type = 'ssl'
+						ssl = True
+					else:
+						ssl = False					
+						ssl_type = False
+					
+					data['ssl'] = ssl
+					data['ssl_type'] = ssl_type
+
+
+					if '@' in split[2]:
+						ftp_auth = False
+						data['ftp_auth'] = ftp_auth
+						tmp = split[2]
+						tmp = tmp.replace(":ftp\://", "")
+						tmp = tmp.replace("\\", "")
+						tmp = tmp.split("@")
+						tmp = tmp[1]
+						tmp = tmp.split(":")
+						ip = tmp[0]
+						tmp = tmp[1].split("/")
+						port = tmp[0]
+
+						tmp = split[2]
+						tmp = tmp.replace(":ftp\://", "")
+						tmp = tmp.replace("\\", "")
+						tmp = tmp.split("@")
+						tmp = tmp[0]
+						tmp = tmp.split(":")						
+						username = tmp[0]
+						password = tmp[1]
+						
+						data['username'] = username
+						data['password'] = password
+
+						tmp = split[2]
+						tmp = tmp.replace(":ftp\://", "")
+						tmp = tmp.replace("\\", "")
+						sharedir = tmp.replace(username + ":" + password + "@" + ip + ":" + port, "")						
+					else:
+						ftp_auth = True
+						data['ftp_auth'] = ftp_auth
+						tmp = split[2]
+						tmp = tmp.replace(":ftp\://", "")
+						tmp = tmp.replace("\\", "")
+						tmp = tmp.split(":")
+						ip = tmp[0]
+						tmp = tmp[1].split("/")
+						port = tmp[0]
+
+						tmp = split[2]
+						tmp = tmp.replace(":ftp\://", "")
+						tmp = tmp.replace("\\", "")
+						sharedir = tmp.replace(ip + ":" + port, "")						
+					
+					if sharedir.startswith("/") and len(sharedir) > 1:
+						sharedir = sharedir[+1:]
+
+					data['sharedir'] = sharedir
+
+					if ip is not None:
+						data['ip'] = ip
+
+					if port is not None:
+						data['port'] = int(port)
+
+				if pathExists("/var/etc/automount/.recordshare"):
+					readStatus = tryOpen("/var/etc/automount/.recordshare")
+					for n in readStatus.readlines():
+						is_hdd_replacement = n
+
+					if currshare == is_hdd_replacement[:-1]:
+						hdd_replacement = True						
+						data['hdd_replacement'] = hdd_replacement
+
+				checkmounted1 = command("ls -d /media/autofs/" + data['sharename'] + " 2>/dev/null")
+				checkmounted2 = command("ls -L -d /media/net/" + data['sharename'] + " 2>/dev/null")
+				if checkmounted1 + " " + checkmounted2 == "/media/autofs/" + data['sharename'] + " /media/net/" + data['sharename']:
+					data['isMounted'] = True
+
+				self.automounts[currshare] = data
+								
+		if callback is not None:
+			callback(True)
+
+	def makeHDDlink(self, path):
+		hdd_dir = '/media/hdd'
+		if self.debug != "off":
+			print "[AutoMount.py] symlink %s %s" % (path, hdd_dir)
+		if os_path.islink(hdd_dir):
+			if readlink(hdd_dir) != path:
+				remove(hdd_dir)
+				symlink(path, hdd_dir)
+		elif isMount(hdd_dir) is False:
+			if os_path.isdir(hdd_dir):
+				self.rm_rf(hdd_dir)
+		try:
+			symlink(path, hdd_dir)
+		except OSError:
+			if self.debug != "off":
+				print "[AutoMount.py] add symlink fails!"
+		if os_path.exists(hdd_dir + '/movie') is False:
+			createDir(hdd_dir + '/movie')
+#---- Civer start restoring epg.dat------
+#		if not os_path.isfile(hdd_dir + '/epg.dat'):
+#			if os_path.isfile(hdd_dir + '/epg.dat.sav'):
+#				print "[AutoMount.py] restoring epg.dat"
+#				copyfile('/media/hdd/epg.dat.sav' , '/media/hdd/epg.dat')
+#---- Civer end restoring epg.dat--------
+
+	def rm_rf(self, d): # only for removing the ipkg stuff from /media/hdd subdirs
+		for path in (os_path.join(d,f) for f in listdir(d)):
+			if os_path.isdir(path):
+				self.rm_rf(path)
+			else:
+				unlink(path)
+		removeDir(d)
+		
+	def CleanMountPointFinished(self, result, retval, extra_args):
+		if self.debug != "off":
+			print "[AutoMount.py] CleanMountPointFinished"
+		(data, callback ) = extra_args
+		path = '/tmp/'+ data['sharename']
+#		if os_path.exists(path):
+#			print path
+#			rmdir(path)
+		if self.MountConsole:
+			if len(self.MountConsole.appContainers) == 0:
+				if self.debug != "off":
+					print "self.automounts after mountcheck",self.automounts
+				if callback is not None:
+					callback(True)
+
+	def getMountsList(self):
+		return self.automounts
+
+	def getMountsAttribute(self, mountpoint, attribute):
+		if self.automounts.has_key(mountpoint):
+			if self.automounts[mountpoint].has_key(attribute):
+				return self.automounts[mountpoint][attribute]
+		return None
+
+	def setMountsAttribute(self, mountpoint, attribute, value):
+		if self.debug != "off":
+			print "setting for mountpoint", mountpoint, "attribute", attribute, " to value", value
+		if self.automounts.has_key(mountpoint):
+			self.automounts[mountpoint][attribute] = value
+
+	def removeMount(self, mountpoint):
+		self.newautomounts = {}
+		#self.automounts[currshare] = data
+		if self.debug != "off":
+			print "[AutoMount.py] removing mount: ",mountpoint
+		for sharename, sharedata in self.automounts.items():
+			if sharename is not mountpoint.strip():
+				self.newautomounts[sharename] = sharedata
+				
+		self.automounts.clear()
+		self.automounts = self.newautomounts		
+
+	def convertIPw(self, ip):
+		#// list 192 168 000 001 => 192.168.000.001
+		tmpip = ''
+		for x in ip:
+			tmpip += str(x) + "."
+		tmpip = tmpip[0:len(tmpip)-1]
+		return tmpip
+
+	def writeMountsConfig(self):
+		fp = file('/var/etc/automount/auto.misc', 'w')
+		fp.write("# automatically generated by enigma 2\n# do NOT change manually, all shares withe tab or gs on NetworkBrowser !\n\n")
+		
+#		defaultCfg = command('/var/etc/automount/auto.misc')
+		if pathExists("/var/etc/auto.default"):
+			autofs = tryOpen("/var/etc/auto.default")
+			for n in autofs.readlines():
+				fp.write(n)
+
+			fp.write("\n")
+
+		system("rm /var/etc/automount/.recordshare")
+		system("rm /media/net/*")
+				
+		for sharename, sharedata in self.automounts.items():
+			if sharedata['mounttype'] == 'nfs':
+				if sharedata['active'] is False:
+					fp.write("#" + sharedata['sharename'] + "\t")
+				else:
+					fp.write( sharedata['sharename'] + "\t")
+				fp.write( "-fstype=nfs," + str(sharedata['options']) + ",")
+				fp.write( "rsize=" + str(sharedata['rsize']) + ",")
+				fp.write( "wsize=" + str(sharedata['wsize']) + ",")
+				fp.write( str(sharedata['protocol']) + "\t")
+	
+				fp.write(sharedata['ip'] + ":")
+				tmpsharedir = sharedata['sharedir'].replace(" ", "\\ ")
+				if tmpsharedir[-1:] == "$":
+					tmpdir = tmpsharedir.replace("$", "\\$")
+					tmpsharedir = tmpdir
+				fp.write( "/" + tmpsharedir + "\n")
+
+			if sharedata['mounttype'] == 'cifs':
+				if sharedata['active'] is False:
+					fp.write("#" + sharedata['sharename'] + "\t")
+				else:
+					fp.write( sharedata['sharename'] + "\t")
+				fp.write( "-fstype=cifs," + str(sharedata['options']) + ",")
+				fp.write( "rsize=" + str(sharedata['rsize']) + ",")
+				fp.write( "wsize=" + str(sharedata['wsize']) + ",")
+				if sharedata['username'] is not None and sharedata['password'] is not None and sharedata['username'] is not False and sharedata['password'] is not False:		
+					fp.write( "user=" + str(sharedata['username']) + ",")
+					fp.write( "pass=" + str(sharedata['password']) + "\t://")
+				else:
+					fp.write( "\t://")
+				
+				fp.write(sharedata['ip'] + "/")
+				tmpsharedir = sharedata['sharedir'].replace(" ", "\\ ")
+				if tmpsharedir[-1:] == "$":
+					tmpdir = tmpsharedir.replace("$", "\\$")
+					tmpsharedir = tmpdir
+				fp.write( tmpsharedir + "\n")
+
+			if sharedata['mounttype'] == 'ftpfs':
+				if sharedata['active'] is False:
+					fp.write("#" + sharedata['sharename'] + "\t")
+				else:
+					fp.write( sharedata['sharename'] + "\t")
+
+				fp.write( "-fstype=ftpfs," + str(sharedata['options']))
+
+				if sharedata['proxy'] == True:
+					fp.write( ",proxy=" + self.convertIPw(sharedata['proxy_ip']) + "\:" + str(sharedata['proxy_port']))
+					fp.write( ",allow_other," + str(sharedata['proxy_type']))
+					
+					if sharedata['proxy_auth'] == True:
+						if sharedata['proxy_user'] is not None and sharedata['proxy_pass'] is not None and sharedata['proxy_user'] is not False and sharedata['proxy_pass'] is not False:
+							fp.write( ",proxy_user=" + str(sharedata['proxy_user']) + "\:" + str(sharedata['proxy_pass']) + ",nonempty" )
+						else:
+							fp.write( ",nonempty" )
+					else:
+						fp.write( ",nonempty" )
+				else:
+					fp.write( ",allow_other,nonempty" )
+
+				if sharedata['ssl'] == True:
+					fp.write( "," + str(sharedata['ssl_type']) + "\t:ftp\\://")
+				else:
+					fp.write("\t:ftp\\://")
+
+				if sharedata['username'] is not None and sharedata['password'] is not None and sharedata['username'] is not False and sharedata['password'] is not False and sharedata['ftp_auth'] == True:
+					fp.write( str(sharedata['username']) + "\:" + str(sharedata['password']) + "@")
+
+				fp.write(sharedata['ip'] + "\:" + (str(sharedata['port'])) + "/")
+				tmpsharedir = sharedata['sharedir'].replace(" ", "\\ ")
+				if tmpsharedir[-1:] == "$":
+					tmpdir = tmpsharedir.replace("$", "\\$")
+					tmpsharedir = tmpdir
+				fp.write( tmpsharedir + "\n")
+
+			if sharedata['hdd_replacement'] is True:
+				hdd_replacement = True
+				path = '/media/autofs/' + sharedata['sharename']
+				self.makeHDDlink(path)
+				path = sharedata['sharename']
+				system("echo " + path + " > /var/etc/automount/.recordshare")
+
+			print "[AutoMount.py] link /media/net/%s > /media/autofs/%s" % (sharedata['sharename'],sharedata['sharename'])
+			symlink('/media/autofs/' + sharedata['sharename'], '/media/net/' + sharedata['sharename'])
+
+			
+		fp.write("\n")
+		fp.close()
+
+	def stopMountConsole(self):
+		if self.MountConsole is not None:
+			self.MountConsole = None
+
+iAutoMount = AutoMount()
Index: ipk/source/network_networkbrowser_1_0/usr/lib/enigma2/python/Plugins/SystemPlugins/NetworkBrowser/MountEdit.py
===================================================================
--- ipk/source/network_networkbrowser_1_0/usr/lib/enigma2/python/Plugins/SystemPlugins/NetworkBrowser/MountEdit.py	(revision 14692)
+++ ipk/source/network_networkbrowser_1_0/usr/lib/enigma2/python/Plugins/SystemPlugins/NetworkBrowser/MountEdit.py	(revision 14692)
@@ -0,0 +1,817 @@
+# -*- coding: utf-8 -*-
+# for localized messages
+from __init__ import _
+from Screens.Screen import Screen
+from Screens.MessageBox import MessageBox
+from Screens.VirtualKeyBoard import VirtualKeyBoard
+from Components.ActionMap import ActionMap
+from Components.Button import Button
+#from Components.config import config, ConfigIP, NoSave, ConfigText, ConfigEnableDisable, ConfigPassword, ConfigSelection, getConfigListEntry, ConfigYesNo, ConfigSequence, ConfigNumber, ConfigInteger
+from Components.config import config, ConfigIP, NoSave, ConfigText, ConfigEnableDisable, ConfigPassword, ConfigSelection, getConfigListEntry, ConfigYesNo, ConfigSequence
+
+from Components.ConfigList import ConfigListScreen
+from Components.Label import Label
+from Components.Pixmap import Pixmap
+from Components.ActionMap import ActionMap, NumberActionMap
+from enigma import ePoint, eConsoleAppContainer
+from AutoMount import iAutoMount, AutoMount
+from re import sub as re_sub
+from string import split, rstrip
+
+def tryOpen(filename):
+	try:
+		procFile = open(filename)
+	except IOError:
+		return ""
+	return procFile
+		
+from Plugins.Extensions.Aafpanel.plugin import command
+
+#--- Civer start
+from os import path as os_path, unlink, readlink, system, popen
+from Tools.Directories import createDir
+#--- Civer end
+
+# # class ConfigPORT(ConfigSequence):
+# # 	def __init__(self, default):
+# # 		ConfigSequence.__init__(self, seperator = ".", limits = [(1,65535)], default = default)
+# 
+# 
+# integer_limits = (1, 65535)
+# class ConfigPORT(ConfigSequence):
+# 	def __init__(self, default, limits = integer_limits):
+# 		ConfigSequence.__init__(self, seperator = ".", limits = [limits], default = default)
+# 
+# 	# you need to override this to do input validation
+# 	def setValue(self, value):
+# 		self._value = [value]
+# 		self.changed()
+# 
+# 	def getValue(self):
+# 		return self._value[0]
+# 
+# 	value = property(getValue, setValue)
+# 
+# 	def fromstring(self, value):
+# 		return int(value)
+# 
+# 	def tostring(self, value):
+# 		return str(value)
+# 		
+integer_limits = (0, 65535)
+class ConfigInteger(ConfigSequence):
+	def __init__(self, default, limits = integer_limits):
+		ConfigSequence.__init__(self, seperator = ":", limits = [limits], default = default)
+
+	# you need to override this to do input validation
+	def setValue(self, value):
+		self._value = [value]
+		self.changed()
+
+	def getValue(self):
+		return self._value[0]
+
+	value = property(getValue, setValue)
+
+	def fromstring(self, value):
+		return int(value)
+
+	def tostring(self, value):
+		return str(value)
+
+	
+		
+class AutoMountEdit(Screen, ConfigListScreen):
+	skin = """
+		<screen name="AutoMountEdit" position="center,center" size="560,400" title="MountEdit">
+			<widget name="config" position="10,10" size="540,200" zPosition="1" scrollbarMode="showOnDemand" />
+			<widget name="ButtonGreen" pixmap="skin_default/buttons/button_green.png" position="30,365" zPosition="10" size="15,16" transparent="1" alphatest="on" />
+			<widget name="introduction2" position="110,330" size="300,20" zPosition="10" font="Regular;21" halign="center" transparent="1" />
+			<widget name="ButtonRedtext" position="410,365" size="140,21" zPosition="10" font="Regular;21" transparent="1" />
+			<widget name="ButtonRed" pixmap="skin_default/buttons/button_red.png" position="390,365" zPosition="10" size="15,16" transparent="1" alphatest="on" />
+			<widget name="VKeyIcon" pixmap="skin_default/vkey_icon.png" position="40,345" zPosition="10" size="60,48" transparent="1" alphatest="on" />
+			<widget name="HelpWindow" pixmap="skin_default/vkey_icon.png" position="175,325" zPosition="1" size="1,1" transparent="1" alphatest="on" />
+		</screen>""" 
+
+	def __init__(self, session, plugin_path, mountinfo = None ):
+		self.skin_path = plugin_path
+		self.session = session
+		Screen.__init__(self, self.session)
+
+		self.mountinfo = mountinfo
+		if self.mountinfo is None:
+			#Initialize blank mount enty
+#-- Civer start
+#obi
+#			self.mountinfo = { 'isMounted': False, 'active': False, 'ip': False, 'sharename': False, 'sharedir': False, 'username': False, 'password': False, 'mounttype' : False, 'options' : False, 'hdd_replacement' : False, 'rsize' : False, 'wsize' : False, 'protocol' : False }
+			self.mountinfo = { 'isMounted': False, 'active': False, 'ip': False, 'sharename': False, 'sharedir': False, 'username': False, 'password': False, 'mounttype' : False, 'options' : False, 'hdd_replacement' : False, 'rsize' : False, 'wsize' : False, 'protocol' : False, 'proxy' : False, 'proxy_ip' : False, 'proxy_port' : False, 'proxy_auth' : False, 'proxy_type' : False, 'proxy_user' : False, 'proxy_pass' : False, 'ssl' : False, 'ssl_type' : False, 'port' : False, 'ftp_auth' : True }
+#obi
+#-- Civer end
+		self.applyConfigRef = None
+		self.updateConfigRef = None
+		self.mounts = iAutoMount.getMountsList()
+		self.createConfig()
+
+		self["actions"] = NumberActionMap(["SetupActions", "ColorActions"],
+			{
+				"ok": self.ok,
+				"back": self.close,
+				"cancel": self.close,
+				"red": self.close,
+				"green": self.KeyGreen,
+			}, -2)
+
+		self["VirtualKB"] = ActionMap(["ShortcutActions"],
+			{
+				"green": self.KeyGreen,
+			}, -2)
+
+		self.list = []
+		ConfigListScreen.__init__(self, self.list,session = self.session)
+		self.createSetup()
+		self.onLayoutFinish.append(self.layoutFinished)
+		# Initialize Buttons
+		self["ButtonGreen"] = Pixmap()
+		self["VKeyIcon"] = Pixmap()
+		self["HelpWindow"] = Pixmap()
+		self["introduction2"] = Label(_("Press OK to activate the settings."))
+		self["ButtonRed"] = Pixmap()
+		self["ButtonRedtext"] = Label(_("Close"))
+
+#-- BB start
+		self.newposy = 0 # Y-Koordinates for virtual Helpscreen
+#-- BB end
+	def layoutFinished(self):
+		self.setTitle(_("Mounts editor"))
+		self["ButtonGreen"].hide()
+		self["VKeyIcon"].hide()
+		self["VirtualKB"].setEnabled(False)
+		self["HelpWindow"].hide()
+
+	# helper function to convert ips from a sring to a list of ints
+	def convertIP(self, ip):
+		strIP = ip.split('.')
+		ip = []
+		for x in strIP:
+			ip.append(int(x))
+		return ip
+
+	def exit(self):
+		self.close()
+
+	def createConfig(self):
+		self.sharenameEntry = None
+		self.mounttypeEntry = None
+		self.activeEntry = None
+		self.ipEntry = None
+		self.sharedirEntry = None
+		self.optionsEntry = None
+		self.usernameEntry = None
+		self.passwordEntry = None
+		self.hdd_replacementEntry = None
+#obi
+		self.proxyEntry = None
+		self.proxy_ipEntry = None
+		self.proxy_portEntry = None
+		self.proxy_typeEntry = None
+		self.proxy_authEntry = None
+		self.proxy_userEntry = None
+		self.proxy_passEntry = None		
+		self.portEntry = None
+		self.sslEntry = None
+		self.ssl_typeEntry = None
+		self.ftp_authEntry = None
+
+
+		proxy = None
+		proxy_ip = None
+		proxy_port = None
+		proxy_type = None
+		proxy_auth = None
+		proxy_user = None
+		proxy_pass = None		
+		port = None
+		ssl = None
+		ssl_type = None
+		ftp_auth = None
+
+		ssl_type = None
+		proxy_type = None
+		
+#obi
+
+#-- Civer start
+		self.rsizeEntry = None
+		self.wsizeEntry = None
+		rsize = None
+		wsize = None
+		self.protocolEntry = None
+		protocol = None
+#-- Civer end
+		self.sharetypelist = []
+		self.sharetypelist.append(("nfs", _("NFS share")))
+		self.sharetypelist.append(("cifs", _("CIFS share")))
+		self.sharetypelist.append(("ftpfs", _("FTPFS share")))
+		
+		if self.mountinfo.has_key('mounttype'):
+			mounttype = self.mountinfo['mounttype']
+		else:
+#obi
+			mounttype = "cifs"
+#obi
+		if self.mountinfo.has_key('active'):
+			active = self.mountinfo['active']
+			if active == 'True':
+				active = True
+			elif active == 'False':
+				active = False
+		else:
+			active = True
+		if self.mountinfo.has_key('ip'):
+			if self.mountinfo['ip'] is False:
+				ifmetric = None
+				iface = "eth0"
+				iflines = popen("route -n | grep -v ^0.0.0.0 | grep ^[0-9]")
+				for ifline in iflines.readlines():
+					iflinelist = split(rstrip(ifline))
+					if ifmetric is None or int(iflinelist[4]) < ifmetric:
+						ifmetric = int(iflinelist[4])
+						iface = (iflinelist[7])
+				iflines.close()	
+#---- Civer start added own IP detection---
+				ipstr = command("ifconfig " + iface + " | grep inet | grep Bcast | cut -d : -f 2 | sed 's/ Bcast//' | sed 's/ //'")
+				if ipstr:
+					ip = self.convertIP(ipstr)
+					if len(ip) == 4:
+						ip = [ip[0], ip[1], ip[2], 0]
+					else:
+						ip = [192, 168, 0, 0]
+				else:
+					ip = [192, 168, 0, 0]
+#---- Civer end
+			else:
+				ip = self.convertIP(self.mountinfo['ip'])
+		else:
+			ip = [192, 168, 0, 0]
+
+		if self.mountinfo.has_key('sharename'):
+			sharename = self.mountinfo['sharename']
+		else:
+			sharename = "Sharename"
+		if self.mountinfo.has_key('sharedir'):
+			sharedir = self.mountinfo['sharedir']
+		else:
+			sharedir = "Sharedir"
+		if self.mountinfo.has_key('options'):
+			options = self.mountinfo['options']
+		else:
+			options = "rw,nolock"
+		if self.mountinfo.has_key('username'):
+			username = self.mountinfo['username']
+		else:
+			username = ""
+		if self.mountinfo.has_key('password'):
+			password = self.mountinfo['password']
+		else:
+			password = ""
+			
+		if self.mountinfo.has_key('hdd_replacement'):
+			hdd_replacement = self.mountinfo['hdd_replacement']
+			if hdd_replacement == 'True':
+				hdd_replacement = True
+			elif hdd_replacement == 'False':
+				hdd_replacement = False
+		else:
+			hdd_replacement = False
+
+		if sharename is False:
+			sharename = "Sharename"
+		if sharedir is False:
+			sharedir = "Sharedir"
+		if options is False:
+			if mounttype == "nfs":
+				options = "rw,nolock"
+			else:
+				options = "rw"
+#-- Civer start
+		if self.mountinfo.has_key('protocol'):
+			protocol = self.mountinfo['protocol']
+			if protocol == "udp":
+				protocol = "udp"
+			else:
+				protocol = "tcp"
+		if self.mountinfo.has_key('rsize'):
+			rsize = self.mountinfo['rsize']
+			if rsize == "4096":
+				rsize = "4096"
+			elif rsize == "16384":
+				rsize = "16384"
+			elif rsize == "32768":
+				rsize = "32768"
+			elif rsize == "49152":
+				rsize = "49152"
+			elif rsize == "65536":
+				rsize = "65536"
+			else:
+				rsize = "8192"
+		if self.mountinfo.has_key('wsize'):
+			wsize = self.mountinfo['wsize']
+			if wsize == "4096":
+				wsize = "4096"
+			elif wsize == "16384":
+				wsize = "16384"
+			elif wsize == "32768":
+				wsize = "32768"
+			elif wsize == "49152":
+				wsize = "49152"
+			else:
+				wsize = "8192"
+
+
+# obi
+
+		if self.mountinfo.has_key('proxy'):
+			proxy = self.mountinfo['proxy']
+			if proxy == 'True':
+				proxy = True
+			elif proxy == 'False':
+				proxy = False
+		else:
+			proxy = False
+
+		if self.mountinfo.has_key('proxy_type'):
+			proxy_type = self.mountinfo['proxy_type']
+			if proxy_type == "html":
+				proxy_type = "html"
+			elif proxy_type == "socks4":
+				proxy_type = "socks4"
+			else:
+				proxy_type = "socks5"
+
+		if self.mountinfo.has_key('ssl'):
+			ssl = self.mountinfo['ssl']
+			if ssl == 'True':
+				ssl = True
+			elif ssl == 'False':
+				ssl = False
+		else:
+			ssl = False
+
+		if self.mountinfo.has_key('ssl_type'):
+			ssl_type = self.mountinfo['ssl_type']
+			if ssl_type == "ssl":
+				ssl_type = "ssl"
+			elif proxy_type == "ssl_control":
+				ssl_type = "ssl_control"
+			else:
+				ssl_type = "ssl_try"
+			
+		if self.mountinfo.has_key('ftp_auth'):
+			ftp_auth = self.mountinfo['ftp_auth']
+			if ftp_auth == 'True':
+				ftp_auth = True
+			elif ftp_auth == 'False':
+				ftp_auth = False
+		else:
+			ftp_auth = False
+			
+		if self.mountinfo.has_key('proxy_auth'):
+			proxy_auth = self.mountinfo['proxy_auth']
+			if proxy_auth == 'True':
+				proxy_auth = True
+			elif proxy_auth == 'False':
+				proxy_auth = False
+		else:
+			proxy_auth = False
+			
+		if self.mountinfo.has_key('proxy_user'):
+			proxy_user = self.mountinfo['proxy_user']
+		else:
+			proxy_user = ""
+
+		if self.mountinfo.has_key('proxy_pass'):
+			proxy_pass = self.mountinfo['proxy_pass']
+		else:
+			proxy_pass = ""
+
+		if proxy_user is False:
+			proxy_user = ""
+		if proxy_pass is False:
+			proxy_pass = ""
+#
+		if self.mountinfo.has_key('port'):
+			if self.mountinfo['port'] is False:
+				port = 21
+			else: 
+				port = self.mountinfo['port']
+		else:
+			port = 21
+
+		if self.mountinfo.has_key('proxy_ip'):
+			if self.mountinfo['proxy_ip'] is False:
+				proxy_ip = [222, 1, 0, 1]
+			else: 
+				proxy_ip = self.convertIP(self.mountinfo['proxy_ip'])
+		else:
+			proxy_ip = [222, 1, 0, 1]
+
+		if self.mountinfo.has_key('proxy_port'):
+			if self.mountinfo['proxy_port'] is False:
+				proxy_port = 8080
+			else: 
+				proxy_port = self.mountinfo['proxy_port']
+		else:
+			proxy_port = 8080
+
+# obi
+#-- Civer end
+		if username is False:
+			username = ""
+		if password is False:
+			password = ""
+		if mounttype is False:
+#obi
+			mounttype = "cifs"
+#obi
+		self.activeConfigEntry = NoSave(ConfigEnableDisable(default = active))
+		self.ipConfigEntry = NoSave(ConfigIP(default = ip))
+		self.sharenameConfigEntry = NoSave(ConfigText(default = sharename, visible_width = 50, fixed_size = False))
+		self.sharedirConfigEntry = NoSave(ConfigText(default = sharedir, visible_width = 50, fixed_size = False))
+#-- Civer Start
+		self.optionsConfigEntry = NoSave(ConfigText(default = options, visible_width = 50, fixed_size = False))
+#-- Civer end
+		self.usernameConfigEntry = NoSave(ConfigText(default = username, visible_width = 50, fixed_size = False))
+		self.passwordConfigEntry = NoSave(ConfigPassword(default = password, visible_width = 50, fixed_size = False))
+		self.mounttypeConfigEntry = NoSave(ConfigSelection(self.sharetypelist, default = mounttype ))
+		self.hdd_replacementConfigEntry = NoSave(ConfigYesNo(default = hdd_replacement))
+# obi
+		self.ssl_typeConfigEntry = NoSave(ConfigSelection(default= ssl_type, choices = [("ssl_try"),("ssl_control"),("ssl")]))
+		self.ftp_authConfigEntry = NoSave(ConfigYesNo(default = ftp_auth))
+		self.sslConfigEntry = NoSave(ConfigYesNo(default = ssl))
+#		self.portConfigEntry = NoSave(ConfigPORT(default = port))
+		self.portConfigEntry = NoSave(ConfigInteger(default = port))
+
+
+
+		self.proxyConfigEntry = NoSave(ConfigYesNo(default = proxy))
+		self.proxy_typeConfigEntry = NoSave(ConfigSelection(default= proxy_type, choices = [("html"),("socks4"),("socks5")]))
+		self.proxy_authConfigEntry = NoSave(ConfigYesNo(default = proxy_auth))
+		self.proxy_ipConfigEntry = NoSave(ConfigIP(default = proxy_ip))
+#		self.proxy_portConfigEntry = NoSave(ConfigPORT(default = proxy_port))
+		self.proxy_portConfigEntry = NoSave(ConfigInteger(default = proxy_port))
+		self.proxy_userConfigEntry = NoSave(ConfigText(default = proxy_user, visible_width = 50, fixed_size = False))
+		self.proxy_passConfigEntry = NoSave(ConfigPassword(default = proxy_pass, visible_width = 50, fixed_size = False))
+
+#obi
+#-- Civer start
+		self.rsizeConfigEntry = NoSave(ConfigSelection(default= rsize, choices = [("4096"),("8192"),("16384"),("32768"),("49152"),("65536")]))
+		self.wsizeConfigEntry = NoSave(ConfigSelection(default= wsize, choices = [("4096"),("8192"),("16384"),("32768"),("49152")]))
+		self.protocolConfigEntry = NoSave(ConfigSelection(default= protocol, choices = [("tcp"),("udp")]))
+
+#-- Civer end
+	def createSetup(self):
+		self.list = []
+		self.activeEntry = getConfigListEntry(_("Active"), self.activeConfigEntry)
+		self.list.append(self.activeEntry)
+		self.sharenameEntry = getConfigListEntry(_("Local share name"), self.sharenameConfigEntry)
+		self.list.append(self.sharenameEntry)
+		self.mounttypeEntry = getConfigListEntry(_("Mount type"), self.mounttypeConfigEntry)
+		self.list.append(self.mounttypeEntry)
+		self.ipEntry = getConfigListEntry(_("Server IP"), self.ipConfigEntry)
+		self.list.append(self.ipEntry)
+		if self.mounttypeConfigEntry.value == "ftpfs":
+			self.portEntry = getConfigListEntry(_("Server Port"), self.portConfigEntry)
+			self.list.append(self.portEntry)				
+		self.sharedirEntry = getConfigListEntry(_("Server share"), self.sharedirConfigEntry)
+		self.list.append(self.sharedirEntry)
+		self.hdd_replacementEntry = getConfigListEntry(_("use as HDD replacement"), self.hdd_replacementConfigEntry)
+		self.list.append(self.hdd_replacementEntry)
+
+		if self.mounttypeConfigEntry.value == "cifs":
+#-- BB start
+			self.optionsConfigEntry = NoSave(ConfigSelection(default= "rw", choices = [("rw"),("ro")]))
+			#self.optionsConfigEntry = NoSave(ConfigText(default = "rw", visible_width = 50, fixed_size = False))
+#obi
+#		else:
+#			self.optionsConfigEntry = NoSave(ConfigSelection(default= "rw,nolock", choices = [("rw,nolock"),("ro,nolock")]))
+
+		elif self.mounttypeConfigEntry.value == "nfs":
+			self.optionsConfigEntry = NoSave(ConfigSelection(default= "rw,nolock", choices = [("rw,nolock"),("ro,nolock")]))
+		else:
+			self.optionsConfigEntry = NoSave(ConfigSelection(default= "rw,nolock", choices = [("rw,nolock"),("ro,nolock")]))
+
+		
+#-- BB end
+		self.optionsEntry = getConfigListEntry(_("Mount options"), self.optionsConfigEntry)
+		self.list.append(self.optionsEntry)
+#-- Civer start
+		if self.mounttypeConfigEntry.value == "nfs":
+			self.protocolEntry = getConfigListEntry(_("protocol"), self.protocolConfigEntry)
+			self.list.append(self.protocolEntry)
+#obi
+		if self.mounttypeConfigEntry.value == "nfs" or self.mounttypeConfigEntry.value == "cifs":
+#obi
+			self.rsizeEntry = getConfigListEntry(_("rsize"), self.rsizeConfigEntry)
+			self.list.append(self.rsizeEntry)
+			self.wsizeEntry = getConfigListEntry(_("wsize"), self.wsizeConfigEntry)
+			self.list.append(self.wsizeEntry)
+#-- Civer end
+
+		if self.mounttypeConfigEntry.value == "cifs":
+			self.usernameEntry = getConfigListEntry(_("Username"), self.usernameConfigEntry)
+			self.list.append(self.usernameEntry)
+			self.passwordEntry = getConfigListEntry(_("Password"), self.passwordConfigEntry)
+			self.list.append(self.passwordEntry)
+		if self.mounttypeConfigEntry.value == "ftpfs":
+
+			self.sslEntry = getConfigListEntry(_("SSL"), self.sslConfigEntry)
+			self.list.append(self.sslEntry)
+			if self.sslConfigEntry.value is True:
+				self.ssl_typeEntry = getConfigListEntry(_("SSL Type"), self.ssl_typeConfigEntry)
+				self.list.append(self.ssl_typeEntry)
+
+			self.ftp_authEntry = getConfigListEntry(_("Anonymous"), self.ftp_authConfigEntry)
+			self.list.append(self.ftp_authEntry)
+			if self.ftp_authConfigEntry.value is False:
+				self.usernameEntry = getConfigListEntry(_("Username"), self.usernameConfigEntry)
+				self.list.append(self.usernameEntry)
+				self.passwordEntry = getConfigListEntry(_("Password"), self.passwordConfigEntry)
+				self.list.append(self.passwordEntry)
+
+			self.proxyEntry = getConfigListEntry(_("use as Proxy"), self.proxyConfigEntry)
+			self.list.append(self.proxyEntry)
+			if self.proxyConfigEntry.value is True:
+				self.proxy_ipEntry = getConfigListEntry(_("Proxy IP"), self.proxy_ipConfigEntry)
+				self.list.append(self.proxy_ipEntry)
+				self.proxy_portEntry = getConfigListEntry(_("Proxy Port"), self.proxy_portConfigEntry)
+				self.list.append(self.proxy_portEntry)				
+				self.proxy_typeEntry = getConfigListEntry(_("Proxy Type"), self.proxy_typeConfigEntry)
+				self.list.append(self.proxy_typeEntry)
+				self.proxy_authEntry = getConfigListEntry(_("Proxy use Auth"), self.proxy_authConfigEntry)
+				self.list.append(self.proxy_authEntry)
+				if self.proxy_authConfigEntry.value is True:
+					self.proxy_userEntry = getConfigListEntry(_("Proxy Username"), self.proxy_userConfigEntry)
+					self.list.append(self.proxy_userEntry)
+					self.proxy_passEntry = getConfigListEntry(_("Proxy Password"), self.proxy_passConfigEntry)
+					self.list.append(self.proxy_passEntry)
+
+		self["config"].list = self.list
+		self["config"].l.setList(self.list)
+		self["config"].onSelectionChanged.append(self.selectionChanged)
+
+	def newConfig(self):
+		if self["config"].getCurrent() == self.mounttypeEntry:
+			self.createSetup()
+		elif self["config"].getCurrent() == self.proxyEntry:
+			self.createSetup()
+		elif self["config"].getCurrent() == self.proxy_authEntry:
+			self.createSetup()
+		elif self["config"].getCurrent() == self.ftp_authEntry:
+			self.createSetup()
+		elif self["config"].getCurrent() == self.sslEntry:
+			self.createSetup()
+
+	def KeyGreen(self):
+		print "Green Pressed"
+#-- BB start
+		self.newposy = 780  # this position is outside the window
+		self.selectionChanged()  # move outside
+#-- BB end
+		if self["config"].getCurrent() == self.sharenameEntry:
+			self.session.openWithCallback(lambda x : self.VirtualKeyBoardCallback(x, 'sharename'), VirtualKeyBoard, title = (_("Enter share name:")), text = self.sharenameConfigEntry.value)
+		if self["config"].getCurrent() == self.sharedirEntry:
+			self.session.openWithCallback(lambda x : self.VirtualKeyBoardCallback(x, 'sharedir'), VirtualKeyBoard, title = (_("Enter share directory:")), text = self.sharedirConfigEntry.value)
+#-- CIver start
+#		if self["config"].getCurrent() == self.optionsEntry:
+#			self.session.openWithCallback(lambda x : self.VirtualKeyBoardCallback(x, 'options'), VirtualKeyBoard, title = (_("Enter options:")), text = self.optionsConfigEntry.value)
+#-- Civer end
+		if self["config"].getCurrent() == self.usernameEntry:
+			self.session.openWithCallback(lambda x : self.VirtualKeyBoardCallback(x, 'username'), VirtualKeyBoard, title = (_("Enter username:")), text = self.usernameConfigEntry.value)
+		if self["config"].getCurrent() == self.passwordEntry:
+			self.session.openWithCallback(lambda x : self.VirtualKeyBoardCallback(x, 'password'), VirtualKeyBoard, title = (_("Enter password:")), text = self.passwordConfigEntry.value)
+# obi
+		if self["config"].getCurrent() == self.proxy_userEntry:
+			self.session.openWithCallback(lambda x : self.VirtualKeyBoardCallback(x, 'proxy_user'), VirtualKeyBoard, title = (_("Enter Proxy Username:")), text = self.proxy_userConfigEntry.value)
+		if self["config"].getCurrent() == self.proxy_passEntry:
+			self.session.openWithCallback(lambda x : self.VirtualKeyBoardCallback(x, 'proxy_pass'), VirtualKeyBoard, title = (_("Enter Proxy password:")), text = self.proxy_passConfigEntry.value)
+# 		if self["config"].getCurrent() == self.portEntry:
+# 			self.session.openWithCallback(lambda x : self.VirtualKeyBoardCallback(x, 'port'), VirtualKeyBoard, title = (_("Enter Ftp port:")), text = self.portConfigEntry.value)
+# obi
+
+	def VirtualKeyBoardCallback(self, callback = None, entry = None):
+		if callback is not None and len(callback) and entry is not None and len(entry):
+			if entry == 'sharename':
+				self.sharenameConfigEntry.setValue(callback)
+				self["config"].invalidate(self.sharenameConfigEntry)
+			elif entry == 'sharedir':
+				self.sharedirConfigEntry.setValue(callback)
+				self["config"].invalidate(self.sharedirConfigEntry)
+#-- Civer start
+#			if entry == 'options':
+#				self.optionsConfigEntry.setValue(callback)
+#				self["config"].invalidate(self.optionsConfigEntry)--Civer end
+			elif entry == 'username':
+				self.usernameConfigEntry.setValue(callback)
+				self["config"].invalidate(self.usernameConfigEntry)
+			elif entry == 'password':
+				self.passwordConfigEntry.setValue(callback)
+				self["config"].invalidate(self.passwordConfigEntry)
+#obi
+			elif entry == 'proxy_user':
+				self.proxy_userConfigEntry.setValue(callback)
+				self["config"].invalidate(self.proxy_userConfigEntry)
+			elif entry == 'proxy_pass':
+				self.proxy_passConfigEntry.setValue(callback)
+				self["config"].invalidate(self.proxy_passConfigEntry)
+# 			elif entry == 'port':
+# 				self.portConfigEntry.setValue(callback)
+# 				self["config"].invalidate(self.portConfigEntry)
+#obi
+#-- BB start
+		self.newposy = 20
+		self.selectionChangednormal()
+#-- BB end
+	def keyLeft(self):
+		ConfigListScreen.keyLeft(self)
+		self.newConfig()
+
+	def keyRight(self):
+		ConfigListScreen.keyRight(self)
+		self.newConfig()
+
+	def selectionChanged(self):
+		current = self["config"].getCurrent()
+#-- Civer start
+#obi
+#		if current == self.activeEntry or current == self.ipEntry or current == self.mounttypeEntry or current == self.hdd_replacementEntry or current == self.rsizeEntry or current == self.wsizeEntry or current == self.protocolEntry or current == self.optionsEntry:
+		if current == self.activeEntry or current == self.ipEntry or current == self.mounttypeEntry or current == self.hdd_replacementEntry or current == self.rsizeEntry or current == self.wsizeEntry or current == self.protocolEntry or current == self.optionsEntry or current == self.proxyEntry or current == self.proxy_ipEntry or current == self.proxy_portEntry or current == self.proxy_typeEntry or current == self.proxy_authEntry or current == self.proxy_userEntry or current == self.proxy_passEntry or current == self.sslEntry or current == self.ssl_typeEntry or current == self.portEntry or current == self.ftp_authEntry:
+#obi
+#-- Civer end
+			self["ButtonGreen"].hide()
+			self["VKeyIcon"].hide()
+			self["VirtualKB"].setEnabled(False)
+		else:
+			helpwindowpos = self["HelpWindow"].getPosition()
+			if current[1].help_window.instance is not None:
+				current[1].help_window.instance.move(ePoint(helpwindowpos[0] + 35,helpwindowpos[1] + self.newposy))
+				self["ButtonGreen"].show()
+				self["VKeyIcon"].show()
+				self["VirtualKB"].setEnabled(True)
+
+#-- BB start
+	def selectionChangednormal(self):
+		current = self["config"].getCurrent()
+		helpwindowpos = self["HelpWindow"].getPosition()
+		if current[1].help_window.instance is not None:
+			current[1].help_window.instance.move(ePoint(helpwindowpos[0] + 35,helpwindowpos[1] + self.newposy))
+			self["VKeyIcon"].show()
+#-- BB end
+
+	def ok(self):
+		current = self["config"].getCurrent()
+#		if current == self.sharenameEntry or current == self.sharedirEntry or current == self.sharedirEntry or current == self.optionsEntry or current == self.usernameEntry or current == self.passwordEntry:
+##		if current == self.sharenameEntry or current == self.sharedirEntry or current == self.sharedirEntry or current == self.usernameEntry or current == self.passwordEntry or current == self.proxy_userEntry or current == self.proxy_passEntry or current == self.portEntry:
+		if current == self.sharenameEntry or current == self.sharedirEntry or current == self.sharedirEntry or current == self.usernameEntry or current == self.passwordEntry or current == self.proxy_userEntry or current == self.proxy_passEntry:
+
+
+			if current[1].help_window.instance is not None:
+				current[1].help_window.instance.hide()
+		sharename = self.sharenameConfigEntry.value
+
+		if self.mounts.has_key(sharename) is True:
+			self.session.openWithCallback(self.updateConfig, MessageBox, (_("A mount entry with this name already exists!\nUpdate existing entry and continue?\n") ) )
+		else:
+			self.session.openWithCallback(self.applyConfig, MessageBox, (_("Are you sure you want to save this network mount?\n\n") ) )
+
+	def updateConfig(self, ret = False):
+		if (ret == True):
+			sharedir = None
+			if self.sharedirConfigEntry.value.startswith("/") and self.mounttypeConfigEntry.value == "cifs":
+				sharedir = self.sharedirConfigEntry.value[1:]
+			else:
+				sharedir = self.sharedirConfigEntry.value
+			iAutoMount.setMountsAttribute(self.sharenameConfigEntry.value, "sharename", self.sharenameConfigEntry.value)
+			iAutoMount.setMountsAttribute(self.sharenameConfigEntry.value, "active", self.activeConfigEntry.value)
+			iAutoMount.setMountsAttribute(self.sharenameConfigEntry.value, "ip", self.ipConfigEntry.getText())
+			iAutoMount.setMountsAttribute(self.sharenameConfigEntry.value, "sharedir", sharedir)
+			iAutoMount.setMountsAttribute(self.sharenameConfigEntry.value, "mounttype", self.mounttypeConfigEntry.value)
+			iAutoMount.setMountsAttribute(self.sharenameConfigEntry.value, "options", self.optionsConfigEntry.value)
+			iAutoMount.setMountsAttribute(self.sharenameConfigEntry.value, "username", self.usernameConfigEntry.value)
+			iAutoMount.setMountsAttribute(self.sharenameConfigEntry.value, "password", self.passwordConfigEntry.value)
+			iAutoMount.setMountsAttribute(self.sharenameConfigEntry.value, "hdd_replacement", self.hdd_replacementConfigEntry.value)
+#obi
+			iAutoMount.setMountsAttribute(self.sharenameConfigEntry.value, "port", self.portConfigEntry.value)
+			iAutoMount.setMountsAttribute(self.sharenameConfigEntry.value, "ssl", self.sslConfigEntry.value)
+			iAutoMount.setMountsAttribute(self.sharenameConfigEntry.value, "ssl_type", self.ssl_typeConfigEntry.value)
+
+			iAutoMount.setMountsAttribute(self.sharenameConfigEntry.value, "proxy", self.proxyConfigEntry.value)
+			iAutoMount.setMountsAttribute(self.sharenameConfigEntry.value, "proxy_type", self.proxy_typeConfigEntry.value)
+			iAutoMount.setMountsAttribute(self.sharenameConfigEntry.value, "proxy_ip", self.proxy_ipConfigEntry.value)
+			iAutoMount.setMountsAttribute(self.sharenameConfigEntry.value, "proxy_port", self.proxy_portConfigEntry.value)
+			iAutoMount.setMountsAttribute(self.sharenameConfigEntry.value, "proxy_auth", self.proxy_authConfigEntry.value)
+			iAutoMount.setMountsAttribute(self.sharenameConfigEntry.value, "proxy_user", self.proxy_userConfigEntry.value)
+			iAutoMount.setMountsAttribute(self.sharenameConfigEntry.value, "proxy_pass", self.proxy_passConfigEntry.value)
+#obi
+#-- Civer start
+			iAutoMount.setMountsAttribute(self.sharenameConfigEntry.value, "rsize", self.rsizeConfigEntry.value)
+			iAutoMount.setMountsAttribute(self.sharenameConfigEntry.value, "wsize", self.wsizeConfigEntry.value)
+			iAutoMount.setMountsAttribute(self.sharenameConfigEntry.value, "protocol", self.protocolConfigEntry.value)			
+#-- Civer end
+			self.updateConfigRef = None
+			self.updateConfigRef = self.session.openWithCallback(self.updateConfigfinishedCB, MessageBox, _("Please wait while updating your network mount..."), type = MessageBox.TYPE_INFO, enable_input = False)
+#-------- Civer start umount Sharepoint before activating-----
+			print "[MountEdit.py] Umount Mointpoint /media/net/" + self.sharenameConfigEntry.value
+			system('umount -fl /media/net/'+ self.sharenameConfigEntry.value)
+#-------- Civer end umount Sharepoint before activating-------
+#-------- Civer start SWAPEPG workaround when changing mounts config---------------
+			if (self.activeConfigEntry.value == False or self.hdd_replacementConfigEntry.value == False) and os_path.islink('/media/hdd'):
+				if readlink('/media/hdd') == '/media/net/' + self.sharenameConfigEntry.value:
+					print "[MountEdit.py] Unlink /media/hdd..."
+					unlink('/media/hdd')
+#obi
+#					print "[MountEdit.py] Recreate folder /media/hdd for Swapepg"
+#					createDir('/media/hdd')
+#					print "[MountEdit.py] Recreate link /media/autofs/RECORD to /media/hdd"
+#					link('/media/autofs/RECORD /media/hdd')
+#obi
+
+#-------- Civer end SWAPEPG workaround when changing mounts config------------------
+			iAutoMount.writeMountsConfig()
+			iAutoMount.getAutoMountPoints(self.updateConfigDataAvail)
+		else:
+			self.close()
+
+	def updateConfigDataAvail(self, data):
+		if data is True:
+#---- CIver Test start------------
+#			self.updateConfigRef.close(True)
+			if self.updateConfigRef == None:
+				print "[MountEdit.py] Nothing to be done...."
+			else:
+				self.updateConfigRef.close(True)
+#--- Civer Test end
+
+	def updateConfigfinishedCB(self,data):
+		if data is True:
+			self.session.openWithCallback(self.Updatefinished, MessageBox, _("Your network mount has been updated."), type = MessageBox.TYPE_INFO, timeout = 10)
+
+	def Updatefinished(self,data):
+		if data is not None:
+			if data is True:
+				self.close()
+
+	def applyConfig(self, ret = False):
+		if (ret == True):
+			data = { 'isMounted': False, 'active': False, 'ip': False, 'sharename': False, 'sharedir': False, 'username': False, 'password': False, 'mounttype' : False, 'options' : False, 'hdd_replacement' : False, 'rsize' : False, 'wsize' : False, 'protocol' : False, 'proxy' : False, 'proxy_ip' : False, 'proxy_port' : False, 'proxy_auth' : False, 'proxy_type' : False, 'proxy_user' : False, 'proxy_pass' : False, 'ssl' : False, 'ssl_type' : False, 'port' : False, 'ftp_auth' : True }
+	
+			data['active'] = self.activeConfigEntry.value
+			data['ip'] = self.ipConfigEntry.getText()
+			data['sharename'] = re_sub("\W", "", self.sharenameConfigEntry.value)
+			# "\W" matches everything that is "not numbers, letters, or underscores",where the alphabet defaults to ASCII.
+			if self.sharedirConfigEntry.value.startswith("/") and self.mounttypeConfigEntry.value == "cifs":
+				data['sharedir'] = self.sharedirConfigEntry.value[1:]
+			else:
+				data['sharedir'] = self.sharedirConfigEntry.value
+			data['options'] =  self.optionsConfigEntry.value
+			data['mounttype'] = self.mounttypeConfigEntry.value
+			data['username'] = self.usernameConfigEntry.value
+			data['password'] = self.passwordConfigEntry.value
+			data['hdd_replacement'] = self.hdd_replacementConfigEntry.value
+			#-- Civer start
+			data['rsize'] = self.rsizeConfigEntry.value
+			data['wsize'] = self.wsizeConfigEntry.value
+			data['protocol'] = self.protocolConfigEntry.value
+#obi
+			data['ftp_auth'] = self.ftp_authConfigEntry.value
+			data['port'] = self.portConfigEntry.value
+			data['ssl'] = self.sslConfigEntry.value
+			data['ssl_type'] = self.ssl_typeConfigEntry.value
+			data['proxy'] = self.proxyConfigEntry.value
+			data['proxy_type'] = self.proxy_typeConfigEntry.value
+			data['proxy_ip'] = self.proxy_ipConfigEntry.value
+			data['proxy_port'] = self.proxy_portConfigEntry.value
+			data['proxy_auth'] = self.proxy_authConfigEntry.value
+			data['proxy_user'] = self.proxy_userConfigEntry.value
+			data['proxy_pass'] = self.proxy_passConfigEntry.value
+#obi
+			#-- Civer end
+			self.applyConfigRef = None
+			self.applyConfigRef = self.session.openWithCallback(self.applyConfigfinishedCB, MessageBox, _("Please wait for activation of your network mount..."), type = MessageBox.TYPE_INFO, enable_input = False)
+			iAutoMount.automounts[self.sharenameConfigEntry.value] = data
+			iAutoMount.writeMountsConfig()
+			iAutoMount.getAutoMountPoints(self.applyConfigDataAvail)
+		else:
+			self.close()
+
+	def applyConfigDataAvail(self, data):
+		if data is True:
+			self.applyConfigRef.close(True)
+
+	def applyConfigfinishedCB(self,data):
+		if data is True:
+			self.session.openWithCallback(self.applyfinished, MessageBox, _("Your network mount has been activated."), type = MessageBox.TYPE_INFO, timeout = 10)
+
+	def applyfinished(self,data):
+		if data is not None:
+			if data is True:
+				self.close()
Index: ipk/source/network_networkbrowser_1_0/usr/lib/enigma2/python/Plugins/SystemPlugins/NetworkBrowser/MountManager.py
===================================================================
--- ipk/source/network_networkbrowser_1_0/usr/lib/enigma2/python/Plugins/SystemPlugins/NetworkBrowser/MountManager.py	(revision 14692)
+++ ipk/source/network_networkbrowser_1_0/usr/lib/enigma2/python/Plugins/SystemPlugins/NetworkBrowser/MountManager.py	(revision 14692)
@@ -0,0 +1,164 @@
+# -*- coding: utf-8 -*-
+# for localized messages
+from __init__ import _
+from Screens.Screen import Screen
+from Screens.MessageBox import MessageBox
+from Screens.VirtualKeyBoard import VirtualKeyBoard
+from Components.Label import Label
+from Components.Pixmap import Pixmap
+from Components.ActionMap import ActionMap
+from Components.Network import iNetwork
+from Components.Sources.List import List
+from Tools.LoadPixmap import LoadPixmap
+from Tools.Directories import resolveFilename, SCOPE_PLUGINS, SCOPE_SKIN_IMAGE
+from os import path as os_path
+
+from MountView import AutoMountView
+from MountEdit import AutoMountEdit
+from AutoMount import iAutoMount, AutoMount
+from UserManager import UserManager
+
+#--------- Civer start-----------------
+#from Tools.HardwareInfo import HardwareInfo
+#--------- Civer end-------------------
+#obi
+from os import path as os_path, system as os_system
+
+def command(comandline):
+	comandline = comandline + " >/tmp/command.txt"
+	os_system(comandline)
+	text = ""
+	if os_path.exists("/tmp/command.txt") is True:
+		file = open("/tmp/command.txt", "r")
+		for line in file:
+			text = text + line.strip() + '\n'
+		file.close
+	# if one or last line then remove linefeed
+	if text[-1:] == '\n': text = text[:-1]
+	comandline = text
+	os_system("rm /tmp/command.txt")
+	return comandline
+
+boxversion = command('cat /etc/model')
+#obi
+
+class AutoMountManager(Screen):
+	skin = """
+		<screen name="AutoMountManager" position="center,center" size="560,350" title="AutoMountManager">
+			<widget source="config" render="Listbox" position="10,10" size="540,220" scrollbarMode="showOnDemand" >
+				<convert type="TemplatedMultiContent">
+					{"template": [
+							MultiContentEntryText(pos = (0, 3), size = (480, 25), font=0, flags = RT_HALIGN_LEFT, text = 0), # index 2 is the Menu Titel
+							MultiContentEntryText(pos = (10, 29), size = (480, 17), font=1, flags = RT_HALIGN_LEFT, text = 2), # index 3 is the Description
+							MultiContentEntryPixmapAlphaTest(pos = (500, 1), size = (48, 48), png = 3), # index 4 is the pixmap
+						],
+					"fonts": [gFont("Regular", 20),gFont("Regular", 14)],
+					"itemHeight": 50
+					}
+				</convert>
+			</widget>
+			<widget name="introduction" position="90,260" size="300,20" zPosition="10" font="Regular;21" halign="center" transparent="1" />
+			<widget name="ButtonRedtext" position="410,305" size="140,21" zPosition="10" font="Regular;21" transparent="1" />
+			<widget name="ButtonRed" pixmap="skin_default/buttons/button_red.png" position="390,305" zPosition="10" size="15,16" transparent="1" alphatest="on" />
+		</screen>"""
+	def __init__(self, session, iface ,plugin_path):
+		self.skin_path = plugin_path
+		self.session = session
+		self.hostname = None
+		self.restartLanRef = None
+		Screen.__init__(self, session)
+		self["shortcuts"] = ActionMap(["ShortcutActions", "WizardActions"],
+		{
+			"ok": self.keyOK,
+			"back": self.exit,
+			"cancel": self.exit,
+			"red": self.exit,
+		})
+		self["ButtonRed"] = Pixmap()
+		self["ButtonRedtext"] = Label(_("Close"))
+		self["introduction"] = Label(_("Press OK to select."))
+
+		self.list = []
+		self["config"] = List(self.list)
+		self.updateList()
+		self.onClose.append(self.cleanup)
+		self.onShown.append(self.setWindowTitle)
+
+	def setWindowTitle(self):
+		self.setTitle(_("MountManager"))
+
+	def cleanup(self):
+		iNetwork.stopRestartConsole()
+		iNetwork.stopGetInterfacesConsole()
+
+	def updateList(self):
+#----------- Civer change boxversion added--------------------------
+		global boxversion
+#		boxversion = HardwareInfo().get_device_name()
+		self.list = []
+		okpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/NetworkBrowser/icons/ok.png"))
+		self.list.append((_("Add new network mount point"),"add", _("Add a new NFS or CIFS mount point to your ")+ boxversion +".", okpng ))
+		self.list.append((_("Mountpoints management"),"view", _("View, edit or delete mountpoints on your ")+ boxversion +".", okpng ))
+		self.list.append((_("User management"),"user", _("View, edit or delete usernames and passwords for your network."), okpng))
+		self.list.append((_("Change hostname"),"hostname", _("Change the hostname of your ")+ boxversion +".", okpng))
+		self["config"].setList(self.list)
+#----------- Civer change end----------------------------
+
+	def exit(self):
+		self.close()
+
+	def keyOK(self, returnValue = None):
+		if returnValue == None:
+			returnValue = self["config"].getCurrent()[1]
+			if returnValue is "add":
+				self.addMount()
+			elif returnValue is "view":
+				self.viewMounts()
+			elif returnValue is "user":
+				self.userEdit()
+			elif returnValue is "hostname":
+				self.hostEdit()
+
+	def addMount(self):
+		self.session.open(AutoMountEdit, self.skin_path)
+
+	def viewMounts(self):
+		self.session.open(AutoMountView, self.skin_path)
+
+	def userEdit(self):
+		self.session.open(UserManager, self.skin_path)
+	
+#----------- Civer change boxversion added--------------------------
+	def hostEdit(self):
+		global boxversion
+		if os_path.exists("/etc/hostname"):
+			fp = open('/etc/hostname', 'r')
+			self.hostname = fp.read()
+			fp.close()
+			self.session.openWithCallback(self.hostnameCallback, VirtualKeyBoard, title = (_("Enter new hostname for your "+ boxversion +".")), text = self.hostname)
+#----------- Civer change end----------------------------
+			
+	def hostnameCallback(self, callback = None):
+		if callback is not None and len(callback):
+			fp = open('/etc/hostname', 'w+')
+			fp.write(callback)
+			fp.close()
+			self.restartLan()
+
+	def restartLan(self):
+		iNetwork.restartNetwork(self.restartLanDataAvail)
+		self.restartLanRef = self.session.openWithCallback(self.restartfinishedCB, MessageBox, _("Please wait while your network is restarting..."), type = MessageBox.TYPE_INFO, enable_input = False)
+
+	def restartLanDataAvail(self, data):
+		if data is True:
+			iNetwork.getInterfaces(self.getInterfacesDataAvail)
+
+	def getInterfacesDataAvail(self, data):
+		if data is True:
+			if self.restartLanRef.execing:
+				self.restartLanRef.close(True)
+
+	def restartfinishedCB(self,data):
+		if data is True:
+			self.session.open(MessageBox, _("Finished restarting your network"), type = MessageBox.TYPE_INFO, timeout = 10, default = False)
+
Index: ipk/source/network_networkbrowser_1_0/usr/lib/enigma2/python/Plugins/SystemPlugins/NetworkBrowser/MountView.py
===================================================================
--- ipk/source/network_networkbrowser_1_0/usr/lib/enigma2/python/Plugins/SystemPlugins/NetworkBrowser/MountView.py	(revision 14692)
+++ ipk/source/network_networkbrowser_1_0/usr/lib/enigma2/python/Plugins/SystemPlugins/NetworkBrowser/MountView.py	(revision 14692)
@@ -0,0 +1,163 @@
+# -*- coding: utf-8 -*-
+# for localized messages
+from __init__ import _
+from Screens.Screen import Screen
+from Screens.MessageBox import MessageBox
+from Components.Label import Label
+from Components.ActionMap import ActionMap
+from Components.Network import iNetwork
+from Components.Sources.List import List
+from Tools.LoadPixmap import LoadPixmap
+from Tools.Directories import resolveFilename, SCOPE_PLUGINS, SCOPE_SKIN_IMAGE
+from AutoMount import iAutoMount, AutoMount
+from MountEdit import AutoMountEdit
+
+#----Civer start----
+from os import system
+#----Civer end------
+
+class AutoMountView(Screen):
+	skin = """
+		<screen name="AutoMountView" position="center,center" size="560,350" title="MountView">
+			<widget name="legend1" position="0,0" zPosition="1" size="130,40" font="Regular;18" halign="center" valign="center" />
+			<widget name="legend2" position="130,0" zPosition="1" size="310,40" font="Regular;18" halign="center" valign="center" />
+			<widget name="legend3" position="410,0" zPosition="1" size="100,40" font="Regular;18" halign="center" valign="center" />
+			<ePixmap pixmap="skin_default/div-h.png" position="0,40" zPosition="2" size="560,2" />
+			<widget source="config" render="Listbox" position="5,50" size="555,200" scrollbarMode="showOnDemand">
+				<convert type="TemplatedMultiContent">
+					{"template": [
+							MultiContentEntryPixmapAlphaTest(pos = (15, 1), size = (48, 48), png = 0), # index 0 is the isMounted pixmap
+							MultiContentEntryText(pos = (100, 3), size = (200, 25), font=0, flags = RT_HALIGN_LEFT, text = 1), # index 1 is the sharename
+							MultiContentEntryText(pos = (290, 5), size = (150, 17), font=1, flags = RT_HALIGN_LEFT, text = 2), # index 2 is the IPdescription
+							MultiContentEntryText(pos = (100, 29), size = (350, 17), font=1, flags = RT_HALIGN_LEFT, text = 3), # index 3 is the DIRdescription
+							MultiContentEntryPixmapAlphaTest(pos = (450, 9), size = (48, 48), png = 4), # index 4 is the activepng pixmap
+							MultiContentEntryPixmapAlphaTest(pos = (480, 1), size = (48, 48), png = 5), # index 4 is the mounttype pixmap
+						],
+					"fonts": [gFont("Regular", 20),gFont("Regular", 14)],
+					"itemHeight": 50
+					}
+				</convert>
+			</widget>
+			<widget name="introduction" position="110,270" size="300,20" zPosition="10" font="Regular;21" halign="center" transparent="1" />
+			<widget name="ButtonRedtext" position="410,305" size="140,21" zPosition="10" font="Regular;21" transparent="1" />
+			<ePixmap pixmap="skin_default/buttons/button_red.png" position="390,305" zPosition="10" size="15,16" transparent="1" alphatest="on" />
+			<ePixmap pixmap="skin_default/buttons/button_yellow.png" position="30,305" zPosition="10" size="15,16" transparent="1" alphatest="on" />
+			<widget name="deletetext" position="50,305" size="350,21" zPosition="10" font="Regular;21" transparent="1" />
+		</screen>"""
+
+	def __init__(self, session, plugin_path):
+		self.skin_path = plugin_path
+		self.session = session
+		Screen.__init__(self, session)
+		self.mounts = None
+		self.applyConfigRef = None
+		self["shortcuts"] = ActionMap(["ShortcutActions", "WizardActions"],
+		{
+			"ok": self.keyOK,
+			"back": self.exit,
+			"cancel": self.exit,
+			"red": self.exit,
+			"yellow": self.delete,
+		})
+		self["legend1"] = Label(_("Mounted/\nUnmounted"))
+		self["legend2"] = Label(_("Mount informations"))
+		self["legend3"] = Label(_("Active/\nInactive"))
+		self["introduction"] = Label(_("Press OK to edit the settings."))
+		self["ButtonRedtext"] = Label(_("Close"))
+		self["deletetext"] = Label(_("Delete selected mount"))
+
+		self.list = []
+		self["config"] = List(self.list)
+		self.showMountsList()
+
+	def showMountsList(self):
+		self.list = []
+		self.mounts = iAutoMount.getMountsList()
+		for sharename in self.mounts.keys():
+			print "sharename", sharename
+			mountentry = iAutoMount.automounts[sharename]
+			print "mountentry", mountentry
+			self.list.append(self.buildMountViewItem(mountentry))
+		self["config"].setList(self.list)
+
+	def buildMountViewItem(self, entry):
+		if entry["isMounted"] is True:
+			isMountedpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/NetworkBrowser/icons/ok.png"))
+		if entry["isMounted"] is False:
+			isMountedpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/NetworkBrowser/icons/cancel.png"))
+		sharename = entry["sharename"]
+		IPdescription = _("IP:") + " " + str(entry["ip"])
+		DIRdescription = _("Dir:") + " " + str(entry["sharedir"])
+		
+		skip = False		
+		if entry["active"] == 'True' or entry["active"] == True:
+			activepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/lock_on.png"))
+		if entry["active"] == 'False' or entry["active"] == False:
+			activepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/icons/lock_error.png"))
+		if entry["mounttype"] == 'nfs':
+			mounttypepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/NetworkBrowser/icons/i-nfs.png"))
+		else:
+			mounttypepng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/NetworkBrowser/icons/i-smb.png"))
+		return((isMountedpng, sharename, IPdescription, DIRdescription, activepng, mounttypepng))
+
+	def exit(self):
+		self.close()
+
+	def keyOK(self, returnValue = None):
+		cur = self["config"].getCurrent()
+		if cur:
+			returnValue = cur[1]
+			self.session.openWithCallback(self.MountEditClosed, AutoMountEdit, self.skin_path, iAutoMount.automounts[returnValue])
+
+	def MountEditClosed(self, returnValue = None):
+		if returnValue == None:
+			self.showMountsList()
+
+	def delete(self, returnValue = None):
+		cur = self["config"].getCurrent()
+		if cur:
+			returnValue = cur[1]
+#obi
+#			self.applyConfigRef = self.session.openWithCallback(self.applyConfigfinishedCB, MessageBox, _("Please wait while removing your network mount..."), type = MessageBox.TYPE_INFO, enable_input = False)
+			self.session.openWithCallback(self.ConfigfinishedCB, MessageBox, _("Please wait while removing your network mount..."), type = MessageBox.TYPE_INFO, timeout = 5)
+#obi
+#---- Civer start kill execing mounts----
+			print "[MountView.py] Killall execing mounts"
+			system('killall -9 mount')
+#--- Civer end kill execing mounts----
+			print "[MountView.py] iAutoMount.removeMount"
+#obi
+#			iAutoMount.removeMount(returnValue,self.removeDataAvail)
+			iAutoMount.removeMount(returnValue)
+			print "iAutoMount.writeMountsConfig"
+			iAutoMount.writeMountsConfig()
+#			print "iAutoMount.getAutoMountPoints"
+#			iAutoMount.getAutoMountPoints(self.deleteDataAvail)
+#obi
+
+			print "[MountView.py] iAutoMount.removeMount done"
+			
+	def removeDataAvail(self, data):
+		print "removeDataAvail", data
+		
+		
+		if data is True:
+			print "removeDataAvail in data", data
+
+			iAutoMount.writeMountsConfig()
+			iAutoMount.getAutoMountPoints(self.deleteDataAvail)
+
+	def deleteDataAvail(self, data):
+		if data is True:
+			if self.applyConfigRef.execing:
+				self.applyConfigRef.close(True)
+
+	def applyConfigfinishedCB(self,data):
+		if data is True:
+			self.session.openWithCallback(self.ConfigfinishedCB, MessageBox, _("Your network mount has been removed."), type = MessageBox.TYPE_INFO, timeout = 10)
+
+	def ConfigfinishedCB(self,data):
+		if data is not None:
+			if data is True:
+				self.showMountsList()
+
Index: ipk/source/network_networkbrowser_1_0/usr/lib/enigma2/python/Plugins/SystemPlugins/NetworkBrowser/NetworkBrowser.py
===================================================================
--- ipk/source/network_networkbrowser_1_0/usr/lib/enigma2/python/Plugins/SystemPlugins/NetworkBrowser/NetworkBrowser.py	(revision 14692)
+++ ipk/source/network_networkbrowser_1_0/usr/lib/enigma2/python/Plugins/SystemPlugins/NetworkBrowser/NetworkBrowser.py	(revision 14692)
@@ -0,0 +1,523 @@
+# -*- coding: utf-8 -*-
+# for localized messages
+from __init__ import _
+from enigma import eTimer, getDesktop
+from Screens.Screen import Screen
+from Screens.MessageBox import MessageBox
+from Components.Label import Label
+from Components.ActionMap import ActionMap, NumberActionMap
+from Components.Sources.List import List
+from Components.Network import iNetwork
+from Components.Input import Input
+from Components.config import getConfigListEntry, NoSave, config, ConfigIP
+from Components.ConfigList import ConfigList, ConfigListScreen
+from Tools.Directories import resolveFilename, SCOPE_PLUGINS, SCOPE_SKIN_IMAGE
+from Tools.LoadPixmap import LoadPixmap
+from cPickle import dump, load
+from os import path as os_path, stat, mkdir, remove
+from time import time
+from stat import ST_MTIME
+
+import netscan
+from MountManager import AutoMountManager
+from AutoMount import iAutoMount
+from MountEdit import AutoMountEdit
+from UserDialog import UserDialog
+
+def write_cache(cache_file, cache_data):
+	#Does a cPickle dump
+	if not os_path.isdir( os_path.dirname(cache_file) ):
+		try:
+			mkdir( os_path.dirname(cache_file) )
+		except OSError:
+			print os_path.dirname(cache_file), '[Networkbrowser] is a file'
+	fd = open(cache_file, 'w')
+	dump(cache_data, fd, -1)
+	fd.close()
+
+def valid_cache(cache_file, cache_ttl):
+	#See if the cache file exists and is still living
+	try:
+		mtime = stat(cache_file)[ST_MTIME]
+	except:
+		return 0
+	curr_time = time()
+	if (curr_time - mtime) > cache_ttl:
+		return 0
+	else:
+		return 1
+
+def load_cache(cache_file):
+	#Does a cPickle load
+	fd = open(cache_file)
+	cache_data = load(fd)
+	fd.close()
+	return cache_data
+
+class NetworkDescriptor:
+	def __init__(self, name = "NetworkServer", description = ""):
+		self.name = name
+		self.description = description
+
+class NetworkBrowser(Screen):
+	skin = """
+		<screen name="NetworkBrowser" position="center,center" size="560,450" title="Network Neighbourhood">
+			<widget source="list" render="Listbox" position="10,10" size="540,350" zPosition="10" scrollbarMode="showOnDemand">
+				<convert type="TemplatedMultiContent">
+					{"template": [
+							MultiContentEntryPixmapAlphaTest(pos = (0, 0), size = (48, 48), png = 1), # index 1 is the expandable/expanded/verticalline icon
+							MultiContentEntryText(pos = (50, 4), size = (420, 26), font=2, flags = RT_HALIGN_LEFT, text = 2), # index 2 is the Hostname
+							MultiContentEntryText(pos = (140, 5), size = (320, 25), font=0, flags = RT_HALIGN_LEFT, text = 3), # index 3 is the sharename
+							MultiContentEntryText(pos = (140, 26), size = (320, 17), font=1, flags = RT_HALIGN_LEFT, text = 4), # index 4 is the sharedescription
+							MultiContentEntryPixmapAlphaTest(pos = (45, 0), size = (48, 48), png = 5), # index 5 is the nfs/cifs icon
+							MultiContentEntryPixmapAlphaTest(pos = (90, 0), size = (48, 48), png = 6), # index 6 is the isMounted icon
+						],
+					"fonts": [gFont("Regular", 20),gFont("Regular", 14),gFont("Regular", 24)],
+					"itemHeight": 50
+					}
+				</convert>
+			</widget>
+			<ePixmap pixmap="skin_default/buttons/button_green.png" position="30,370" zPosition="10" size="15,16" transparent="1" alphatest="on" />
+			<widget name="mounttext" position="50,370" size="250,21" zPosition="10" font="Regular;21" transparent="1" />
+			<ePixmap pixmap="skin_default/buttons/button_blue.png" position="30,395" zPosition="10" size="15,16" transparent="1" alphatest="on" />
+			<widget name="searchtext" position="50,395" size="150,21" zPosition="10" font="Regular;21" transparent="1" />
+			<widget name="infotext" position="300,375" size="250,21" zPosition="10" font="Regular;21" transparent="1" />
+			<ePixmap pixmap="skin_default/buttons/button_red.png" position="410,420" zPosition="10" size="15,16" transparent="1" alphatest="on" />
+			<widget name="closetext" position="430,420" size="120,21" zPosition="10" font="Regular;21" transparent="1" />
+			<ePixmap pixmap="skin_default/buttons/button_yellow.png" position="30,420" zPosition="10" size="15,16" transparent="1" alphatest="on" />
+			<widget name="rescantext" position="50,420" size="300,21" zPosition="10" font="Regular;21" transparent="1" />
+		</screen>"""
+
+	def __init__(self, session, iface,plugin_path):
+		Screen.__init__(self, session)
+		self.skin_path = plugin_path
+		self.session = session
+		self.iface = iface
+		if self.iface is None:
+			self.iface = 'eth0'
+		self.networklist = None
+		self.device = None
+		self.mounts = None
+		self.expanded = []
+		self.cache_ttl = 604800 #Seconds cache is considered valid, 7 Days should be ok
+		self.cache_file = '/etc/enigma2/networkbrowser.cache' #Path to cache directory
+
+		self["closetext"] = Label(_("Close"))
+		self["mounttext"] = Label(_("Mounts management"))
+		self["rescantext"] = Label(_("Rescan network"))
+		self["infotext"] = Label(_("Press OK to mount!"))
+		self["searchtext"] = Label(_("Expert"))
+
+		self["shortcuts"] = ActionMap(["ShortcutActions", "WizardActions"],
+		{
+			"ok": self.go,
+			"back": self.close,
+			"red": self.close,
+			"green": self.keyGreen,
+			"yellow": self.keyYellow,
+			"blue": self.keyBlue,
+		})
+
+		self.list = []
+		self.statuslist = []
+		self.listindex = 0
+		self["list"] = List(self.list)
+		self["list"].onSelectionChanged.append(self.selectionChanged)
+
+		self.onLayoutFinish.append(self.startRun)
+		self.onShown.append(self.setWindowTitle)
+		self.onClose.append(self.cleanup)
+		self.Timer = eTimer()
+		self.Timer.callback.append(self.TimerFire)
+
+	def cleanup(self):
+		del self.Timer
+		iAutoMount.stopMountConsole()
+		iNetwork.stopRestartConsole()
+		iNetwork.stopGetInterfacesConsole()
+
+	def startRun(self):
+		self.setStatus('update')
+		self.mounts = iAutoMount.getMountsList()
+		self["infotext"].hide()
+		self.vc = valid_cache(self.cache_file, self.cache_ttl)
+		if self.cache_ttl > 0 and self.vc != 0:
+			self.process_NetworkIPs()
+		else:
+			self.Timer.start(3000)
+
+	def TimerFire(self):
+		self.Timer.stop()
+		self.process_NetworkIPs()
+
+	def setWindowTitle(self):
+		self.setTitle(_("Browse network neighbourhood"))
+
+	def keyGreen(self):
+		self.session.open(AutoMountManager, None, self.skin_path)
+
+	def keyYellow(self):
+		if (os_path.exists(self.cache_file) == True):
+			remove(self.cache_file)
+		self.startRun()
+
+	def keyBlue(self):
+		self.session.openWithCallback(self.scanIPclosed,ScanIP)
+
+	def scanIPclosed(self,result):
+		if result[0]:
+			if result[1] == "address":
+				print "[Networkbrowser] got IP:",result[1]
+				nwlist = []
+				nwlist.append(netscan.netzInfo(result[0] + "/24"))
+				self.networklist += nwlist[0]
+			elif result[1] == "nfs":
+				self.networklist.append(['host', result[0], result[0] , '00:00:00:00:00:00', result[0], 'Master Browser'])
+
+		if len(self.networklist) > 0:
+			write_cache(self.cache_file, self.networklist)
+			self.updateHostsList()
+
+	def setStatus(self,status = None):
+		if status:
+			self.statuslist = []
+			if status == 'update':
+				statuspng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/NetworkBrowser/icons/update.png"))
+				self.statuslist.append(( ['info'], statuspng, _("Searching your network. Please wait..."), None, None, None, None ))
+				self['list'].setList(self.statuslist)
+			elif status == 'error':
+				statuspng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/NetworkBrowser/icons/error.png"))
+				self.statuslist.append(( ['info'], statuspng, _("No network devices found!"), None, None, None, None ))
+				self['list'].setList(self.statuslist)
+
+	def process_NetworkIPs(self):
+		self.inv_cache = 0
+		self.vc = valid_cache(self.cache_file, self.cache_ttl)
+		if self.cache_ttl > 0 and self.vc != 0:
+			print '[Networkbrowser] Loading network cache from ',self.cache_file
+			try:
+				self.networklist = load_cache(self.cache_file)
+			except:
+				self.inv_cache = 1
+		if self.cache_ttl == 0 or self.inv_cache == 1 or self.vc == 0:
+			print '[Networkbrowser] Getting fresh network list'
+			self.networklist = self.getNetworkIPs()
+			write_cache(self.cache_file, self.networklist)
+		if len(self.networklist) > 0:
+			self.updateHostsList()
+		else:
+			self.setStatus('error')
+
+	def getNetworkIPs(self):
+		nwlist = []
+		sharelist = []
+		self.IP = iNetwork.getAdapterAttribute(self.iface, "ip")
+		if len(self.IP):
+			strIP = str(self.IP[0]) + "." + str(self.IP[1]) + "." + str(self.IP[2]) + ".0/24"
+			nwlist.append(netscan.netzInfo(strIP))
+		tmplist = nwlist[0]
+		return tmplist
+
+	def getNetworkShares(self,hostip,hostname,devicetype):
+		sharelist = []
+		self.sharecache_file = None
+		self.sharecache_file = '/etc/enigma2/' + hostname.strip() + '.cache' #Path to cache directory
+		if os_path.exists(self.sharecache_file):
+			print '[Networkbrowser] Loading userinfo from ',self.sharecache_file
+			try:
+				self.hostdata = load_cache(self.sharecache_file)
+				username = self.hostdata['username']
+				password = self.hostdata['password']
+			except:
+				username = "username"
+				password = "password"
+		else:
+			username = "username"
+			password = "password"
+
+		if devicetype == 'unix':
+			smblist=netscan.smbShare(hostip,hostname,username,password)
+			for x in smblist:
+				if len(x) == 6:
+					if x[3] != 'IPC$':
+						sharelist.append(x)
+			nfslist=netscan.nfsShare(hostip,hostname)
+			for x in nfslist:
+				if len(x) == 6:
+					sharelist.append(x)
+		else:
+			smblist=netscan.smbShare(hostip,hostname,username,password)
+			for x in smblist:
+				if len(x) == 6:
+					if x[3] != 'IPC$':
+						sharelist.append(x)
+		return sharelist
+
+	def updateHostsList(self):
+		self.list = []
+		self.network = {}
+		for x in self.networklist:
+			if not self.network.has_key(x[2]):
+				self.network[x[2]] = []
+			self.network[x[2]].append((NetworkDescriptor(name = x[1], description = x[2]), x))
+		
+		for x in self.network.keys():
+			hostentry = self.network[x][0][1]
+			name = hostentry[2] + " ( " +hostentry[1].strip() + " )"
+			expandableIcon = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/NetworkBrowser/icons/host.png"))
+			self.list.append(( hostentry, expandableIcon, name, None, None, None, None ))
+
+		if len(self.list):
+			for entry in self.list:
+				entry[0][2]= "%3s.%3s.%3s.%3s" % tuple(entry[0][2].split("."))
+			self.list.sort(key=lambda x: x[0][2])
+			for entry in self.list:
+				entry[0][2]= entry[0][2].replace(" ", "")
+		self["list"].setList(self.list)
+		self["list"].setIndex(self.listindex)
+
+	def updateNetworkList(self):
+		self.list = []
+		self.network = {}
+		self.mounts = iAutoMount.getMountsList() # reloading mount list
+		for x in self.networklist:
+			if not self.network.has_key(x[2]):
+				self.network[x[2]] = []
+			self.network[x[2]].append((NetworkDescriptor(name = x[1], description = x[2]), x))
+		self.network.keys().sort()
+		for x in self.network.keys():
+			if self.network[x][0][1][3] == '00:00:00:00:00:00':
+				self.device = 'unix'
+			else:
+				self.device = 'windows'
+			if x in self.expanded:
+				networkshares = self.getNetworkShares(x,self.network[x][0][1][1].strip(),self.device)
+				hostentry = self.network[x][0][1]
+				name = hostentry[2] + " ( " +hostentry[1].strip() + " )"
+				expandedIcon = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/NetworkBrowser/icons/host.png"))
+				self.list.append(( hostentry, expandedIcon, name, None, None, None, None ))
+				for share in networkshares:
+					self.list.append(self.BuildNetworkShareEntry(share))
+			else: # HOSTLIST - VIEW
+				hostentry = self.network[x][0][1]
+				name = hostentry[2] + " ( " +hostentry[1].strip() + " )"
+				expandableIcon = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/NetworkBrowser/icons/host.png"))
+				self.list.append(( hostentry, expandableIcon, name, None, None, None, None ))
+		if len(self.list):
+			for entry in self.list:
+				entry[0][2]= "%3s.%3s.%3s.%3s" % tuple(entry[0][2].split("."))
+			self.list.sort(key=lambda x: x[0][2])
+			for entry in self.list:
+				entry[0][2]= entry[0][2].replace(" ", "")
+		self["list"].setList(self.list)
+		self["list"].setIndex(self.listindex)
+
+	def BuildNetworkShareEntry(self,share):
+		verticallineIcon = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/NetworkBrowser/icons/verticalLine.png"))
+		sharetype = share[0]
+		localsharename = share[1]
+		sharehost = share[2]
+
+		if sharetype == 'smbShare':
+			sharedir = share[3]
+			sharedescription = share[5]
+		else:
+			sharedir = share[4]
+			sharedescription = share[3]
+
+		if sharetype == 'nfsShare':
+			newpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/NetworkBrowser/icons/i-nfs.png"))
+		else:
+			newpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/NetworkBrowser/icons/i-smb.png"))
+
+		self.isMounted = False
+		for sharename, sharedata in self.mounts.items():
+			if sharedata['ip'] == sharehost:
+				if sharetype == 'nfsShare' and sharedata['mounttype'] == 'nfs':
+					if sharedir == sharedata['sharedir']:
+						if sharedata["isMounted"] is True:
+							self.isMounted = True
+				if sharetype == 'smbShare' and sharedata['mounttype'] == 'cifs':
+					if sharedir == sharedata['sharedir']:
+						if sharedata["isMounted"] is True:
+							self.isMounted = True
+		if self.isMounted is True:
+			isMountedpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/NetworkBrowser/icons/ok.png"))
+		else:
+			isMountedpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/NetworkBrowser/icons/cancel.png"))
+
+		return((share, verticallineIcon, None, sharedir, sharedescription, newpng, isMountedpng))
+
+	def selectionChanged(self):
+		current = self["list"].getCurrent()
+		self.listindex = self["list"].getIndex()
+		if current:
+			if current[0][0] in ("nfsShare", "smbShare"):
+				self["infotext"].show()
+			else:
+				self["infotext"].hide()
+
+	def go(self):
+		sel = self["list"].getCurrent()
+		if sel is None:
+			return
+		if len(sel[0]) <= 1:
+			return
+		selectedhost = sel[0][2]
+		selectedhostname = sel[0][1]
+
+		self.hostcache_file = None
+		if sel[0][0] == 'host': # host entry selected
+			if selectedhost in self.expanded:
+				self.expanded.remove(selectedhost)
+				self.updateNetworkList()
+			else:
+				self.hostcache_file = '/etc/enigma2/' + selectedhostname.strip() + '.cache' #Path to cache directory
+				if os_path.exists(self.hostcache_file):
+					print '[Networkbrowser] Loading userinfo cache from ',self.hostcache_file
+					try:
+						self.hostdata = load_cache(self.hostcache_file)
+						self.passwordQuestion(False)
+					except:
+						self.session.openWithCallback(self.passwordQuestion, MessageBox, (_("Do you want to enter a username and password for this host?\n") ) )
+				else:
+					self.session.openWithCallback(self.passwordQuestion, MessageBox, (_("Do you want to enter a username and password for this host?\n") ) )
+
+		if sel[0][0] == 'nfsShare': # share entry selected
+			print '[Networkbrowser] sel nfsShare'
+			self.openMountEdit(sel[0])
+		if sel[0][0] == 'smbShare': # share entry selected
+			print '[Networkbrowser] sel nfsShare'
+			self.session.openWithCallback(self.passwordQuestion, MessageBox, (_("Do you want to enter a username and password for this host?\n") ) )
+			self.openMountEdit(sel[0])
+
+	def passwordQuestion(self, ret = False):
+		sel = self["list"].getCurrent()
+		selectedhost = sel[0][2]
+		selectedhostname = sel[0][1]
+		if (ret == True):
+			self.session.openWithCallback(self.UserDialogClosed, UserDialog, self.skin_path, selectedhostname.strip())
+		else:
+			if sel[0][0] == 'host': # host entry selected
+				if selectedhost in self.expanded:
+					self.expanded.remove(selectedhost)
+				else:
+					self.expanded.append(selectedhost)
+				self.updateNetworkList()
+			if sel[0][0] == 'nfsShare': # share entry selected
+				self.openMountEdit(sel[0])
+			if sel[0][0] == 'smbShare': # share entry selected
+				self.openMountEdit(sel[0])
+
+	def UserDialogClosed(self, *ret):
+		if ret is not None and len(ret):
+			self.go()
+
+	def openMountEdit(self, selection):
+		if selection is not None and len(selection):
+			mounts = iAutoMount.getMountsList()
+			if selection[0] == 'nfsShare': # share entry selected
+				#Initialize blank mount enty
+				data = { 'isMounted': False, 'active': False, 'ip': False, 'sharename': False, 'sharedir': False, 'username': False, 'password': False, 'mounttype' : False, 'options' : False }
+				# add data
+				data['mounttype'] = 'nfs'
+				data['active'] = True
+				data['ip'] = selection[2]
+				data['sharename'] = selection[1]
+				data['sharedir'] = selection[4]
+				data['options'] = "rw,nolock"
+
+				for sharename, sharedata in mounts.items():
+					if sharedata['ip'] == selection[2] and sharedata['sharedir'] == selection[4]:
+						data = sharedata
+				self.session.openWithCallback(self.MountEditClosed,AutoMountEdit, self.skin_path, data)
+			if selection[0] == 'smbShare': # share entry selected
+				#Initialize blank mount enty
+				data = { 'isMounted': False, 'active': False, 'ip': False, 'sharename': False, 'sharedir': False, 'username': False, 'password': False, 'mounttype' : False, 'options' : False }
+				# add data
+				data['mounttype'] = 'cifs'
+				data['active'] = True
+				data['ip'] = selection[2]
+				data['sharename'] = selection[1]
+				data['sharedir'] = selection[3]
+				data['options'] = "rw"
+				self.sharecache_file = None
+				self.sharecache_file = '/etc/enigma2/' + selection[1].strip() + '.cache' #Path to cache directory
+				if os_path.exists(self.sharecache_file):
+					print '[Networkbrowser] Loading userinfo from ',self.sharecache_file
+					try:
+						self.hostdata = load_cache(self.sharecache_file)
+						data['username'] = self.hostdata['username']
+						data['password'] = self.hostdata['password']
+					except:
+						data['username'] = "username"
+						data['password'] = "password"
+				else:
+					data['username'] = "username"
+					data['password'] = "password"
+
+				for sharename, sharedata in mounts.items():
+					if sharedata['ip'] == selection[2].strip() and sharedata['sharedir'] == selection[3].strip():
+						data = sharedata
+				self.session.openWithCallback(self.MountEditClosed,AutoMountEdit, self.skin_path, data)
+
+	def MountEditClosed(self, returnValue = None):
+		if returnValue == None:
+			self.updateNetworkList()
+
+class ScanIP(Screen, ConfigListScreen):
+	skin = """
+		<screen name="ScanIP" position="center,center" size="550,80" title="Scan IP" >
+			<widget name="config" position="10,10" size="530,25" scrollbarMode="showOnDemand" />
+			<ePixmap pixmap="skin_default/buttons/red.png" position="10,40" zPosition="2" size="140,40" transparent="1" alphatest="on" />
+			<widget name="closetext" position="20,50" size="140,21" zPosition="10" font="Regular;21" transparent="1" />
+			<ePixmap pixmap="skin_default/buttons/green.png" position="160,40" zPosition="2" size="140,40" transparent="1" alphatest="on" />
+			<widget name="edittext" position="170,50" size="140,21" zPosition="10" font="Regular;21" transparent="1" />
+			<ePixmap pixmap="skin_default/buttons/yellow.png" position="320,40" zPosition="2" size="140,40" transparent="1" alphatest="on" />
+			<widget name="scanaddress" position="325,50" size="140,21" zPosition="10" font="Regular;21" transparent="1" />
+		</screen>"""
+
+	def __init__(self, session):
+		Screen.__init__(self, session)
+		self.session = session
+
+		self["closetext"] = Label(_("Cancel"))
+		self["edittext"] = Label(_("Scan NFS Share"))
+		self["scanaddress"] = Label(_("address range"))
+
+		self["actions"] = ActionMap(["SetupActions", "ColorActions"],
+		{
+			"back": self.exit,
+			"red": self.exit,
+			"cancel": self.exit,
+			"green": self.goNfs,
+			"yellow": self.goAddress,
+		}, -1)
+		self.ipAddress = ConfigIP(default=[0,0,0,0])
+		ConfigListScreen.__init__(self, [
+			getConfigListEntry(_("IP Address"), self.ipAddress),
+		], self.session)
+
+		self.onLayoutFinish.append(self.layoutFinished)
+
+	def exit(self):
+		self.close((None,None))
+
+	def layoutFinished(self):
+		self.setWindowTitle()
+
+	def setWindowTitle(self):
+		self.setTitle(_("Enter IP to scan..."))
+
+	def goAddress(self):
+		if self.ipAddress.getText() != "0.0.0.0":
+			self.close((self.ipAddress.getText(), "address"))
+		else:
+			self.exit
+
+	def goNfs(self):
+		if self.ipAddress.getText() != "0.0.0.0":
+			self.close((self.ipAddress.getText(), "nfs"))
+		else:
+			self.exit
+
Index: ipk/source/network_networkbrowser_1_0/usr/lib/enigma2/python/Plugins/SystemPlugins/NetworkBrowser/UserDialog.py
===================================================================
--- ipk/source/network_networkbrowser_1_0/usr/lib/enigma2/python/Plugins/SystemPlugins/NetworkBrowser/UserDialog.py	(revision 14692)
+++ ipk/source/network_networkbrowser_1_0/usr/lib/enigma2/python/Plugins/SystemPlugins/NetworkBrowser/UserDialog.py	(revision 14692)
@@ -0,0 +1,180 @@
+# -*- coding: utf-8 -*-
+# for localized messages
+from __init__ import _
+from Screens.Screen import Screen
+from Screens.MessageBox import MessageBox
+from Screens.VirtualKeyBoard import VirtualKeyBoard
+from Components.ActionMap import ActionMap
+from Components.config import ConfigText, ConfigPassword, NoSave, getConfigListEntry
+from Components.ConfigList import ConfigListScreen
+from Components.Label import Label
+from Components.Pixmap import Pixmap
+from Components.ActionMap import ActionMap, NumberActionMap
+from enigma import ePoint
+from cPickle import dump, load
+from os import path as os_path, unlink, stat, mkdir
+from time import time
+from stat import ST_MTIME
+
+def write_cache(cache_file, cache_data):
+	#Does a cPickle dump
+	if not os_path.isdir( os_path.dirname(cache_file) ):
+		try:
+			mkdir( os_path.dirname(cache_file) )
+		except OSError:
+			print os_path.dirname(cache_file), 'is a file'
+	fd = open(cache_file, 'w')
+	dump(cache_data, fd, -1)
+	fd.close()
+
+def valid_cache(cache_file, cache_ttl):
+	#See if the cache file exists and is still living
+	try:
+		mtime = stat(cache_file)[ST_MTIME]
+	except:
+		return 0
+	curr_time = time()
+	if (curr_time - mtime) > cache_ttl:
+		return 0
+	else:
+		return 1
+
+def load_cache(cache_file):
+	#Does a cPickle load
+	fd = open(cache_file)
+	cache_data = load(fd)
+	fd.close()
+	return cache_data
+
+class UserDialog(Screen, ConfigListScreen):
+	skin = """
+		<screen name="UserDialog" position="center,center" size="560,380" title="UserDialog">
+			<widget name="config" position="10,10" size="540,200" zPosition="1" scrollbarMode="showOnDemand" />
+			<widget name="ButtonGreen" pixmap="skin_default/buttons/button_green.png" position="20,330" zPosition="10" size="15,16" transparent="1" alphatest="on" />
+			<widget name="introduction2" position="90,300" size="300,20" zPosition="10" font="Regular;21" halign="center" transparent="1" />
+			<widget name="ButtonRedtext" position="410,345" size="140,21" zPosition="10" font="Regular;21" transparent="1" />
+			<widget name="ButtonRed" pixmap="skin_default/buttons/button_red.png" position="390,345" zPosition="10" size="15,16" transparent="1" alphatest="on" />
+			<widget name="VKeyIcon" pixmap="skin_default/vkey_icon.png" position="35,310" zPosition="10" size="60,48" transparent="1" alphatest="on" />
+			<widget name="HelpWindow" pixmap="skin_default/vkey_icon.png" position="175,300" zPosition="1" size="1,1" transparent="1" alphatest="on" />
+		</screen>"""
+
+	def __init__(self, session, plugin_path, hostinfo = None ):
+		self.skin_path = plugin_path
+		self.session = session
+		Screen.__init__(self, self.session)
+		self.hostinfo = hostinfo
+		self.cache_ttl = 86400 #600 is default, 0 disables, Seconds cache is considered valid
+		self.cache_file = '/etc/enigma2/' + self.hostinfo + '.cache' #Path to cache directory
+		self.createConfig()
+
+		self["shortcuts"] = ActionMap(["ShortcutActions","WizardActions","ColorActions"],
+		{
+			"red": self.close,
+			"back": self.close,
+			"ok": self.ok,
+			"green": self.KeyGreen,
+		}, -2)
+
+		self["VirtualKB"] = ActionMap(["ShortcutActions","WizardActions"],
+		{
+			"green": self.KeyGreen,
+		}, -2)
+
+		self.list = []
+		ConfigListScreen.__init__(self, self.list,session = self.session)
+		self.createSetup()
+		self.onLayoutFinish.append(self.layoutFinished)
+		# Initialize Buttons
+		self["ButtonGreen"] = Pixmap()
+		self["VKeyIcon"] = Pixmap()
+		self["HelpWindow"] = Pixmap()
+		self["introduction2"] = Label(_("Press OK to save settings."))
+		self["ButtonRed"] = Pixmap()
+		self["ButtonRedtext"] = Label(_("Close"))
+
+	def layoutFinished(self):
+		print self["config"].getCurrent()
+		self.setTitle(_("Enter user and password for host: ")+ self.hostinfo)
+		self["ButtonGreen"].show()
+		self["VKeyIcon"].show()
+		self["VirtualKB"].setEnabled(True)
+		self["HelpWindow"].show()
+
+	# helper function to convert ips from a sring to a list of ints
+	def convertIP(self, ip):
+		strIP = ip.split('.')
+		ip = []
+		for x in strIP:
+			ip.append(int(x))
+		return ip
+
+	def createConfig(self):
+		self.usernameEntry = None
+		self.passwordEntry = None
+		self.username = None
+		self.password = None
+
+		if os_path.exists(self.cache_file):
+			print 'Loading user cache from ',self.cache_file
+			try:
+				self.hostdata = load_cache(self.cache_file)
+				username = self.hostdata['username']
+				password = self.hostdata['password']
+			except:
+				username = "username"
+				password = "password"
+		else:
+			username = "username"
+			password = "password"
+
+		self.username = NoSave(ConfigText(default = username, visible_width = 50, fixed_size = False))
+		self.password = NoSave(ConfigPassword(default = password, visible_width = 50, fixed_size = False))
+
+	def createSetup(self):
+		self.list = []
+		self.usernameEntry = getConfigListEntry(_("Username"), self.username)
+		self.list.append(self.usernameEntry)
+		self.passwordEntry = getConfigListEntry(_("Password"), self.password)
+		self.list.append(self.passwordEntry)
+
+		self["config"].list = self.list
+		self["config"].l.setList(self.list)
+		self["config"].onSelectionChanged.append(self.selectionChanged)
+
+	def KeyGreen(self):
+		if self["config"].getCurrent() == self.usernameEntry:
+			self.session.openWithCallback(lambda x : self.VirtualKeyBoardCallback(x, 'username'), VirtualKeyBoard, title = (_("Enter username:")), text = self.username.value)
+		if self["config"].getCurrent() == self.passwordEntry:
+			self.session.openWithCallback(lambda x : self.VirtualKeyBoardCallback(x, 'password'), VirtualKeyBoard, title = (_("Enter password:")), text = self.password.value)
+
+	def VirtualKeyBoardCallback(self, callback = None, entry = None):
+		if callback is not None and len(callback) and entry is not None and len(entry):
+			if entry == 'username':
+				self.username = NoSave(ConfigText(default = callback, visible_width = 50, fixed_size = False))
+				self.createSetup()
+			if entry == 'password':
+				self.password = NoSave(ConfigPassword(default = callback, visible_width = 50, fixed_size = False))
+				self.createSetup()
+
+	def newConfig(self):
+		if self["config"].getCurrent() == self.InterfaceEntry:
+			self.createSetup()
+
+	def keyLeft(self):
+		ConfigListScreen.keyLeft(self)
+
+	def keyRight(self):
+		ConfigListScreen.keyRight(self)
+
+	def selectionChanged(self):
+		current = self["config"].getCurrent()
+		helpwindowpos = self["HelpWindow"].getPosition()
+		if current[1].help_window.instance is not None:
+			current[1].help_window.instance.move(ePoint(helpwindowpos[0],helpwindowpos[1]))
+
+	def ok(self):
+		current = self["config"].getCurrent()
+		self.hostdata = { 'username': self.username.value, 'password': self.password.value }
+		write_cache(self.cache_file, self.hostdata)
+		self.close(True)
+
Index: ipk/source/network_networkbrowser_1_0/usr/lib/enigma2/python/Plugins/SystemPlugins/NetworkBrowser/UserManager.py
===================================================================
--- ipk/source/network_networkbrowser_1_0/usr/lib/enigma2/python/Plugins/SystemPlugins/NetworkBrowser/UserManager.py	(revision 14692)
+++ ipk/source/network_networkbrowser_1_0/usr/lib/enigma2/python/Plugins/SystemPlugins/NetworkBrowser/UserManager.py	(revision 14692)
@@ -0,0 +1,91 @@
+# -*- coding: utf-8 -*-
+# for localized messages
+from __init__ import _
+from Screens.Screen import Screen
+from Components.Label import Label
+from Components.Pixmap import Pixmap
+from Components.ActionMap import ActionMap
+from Components.Sources.List import List
+
+from Tools.LoadPixmap import LoadPixmap
+from Tools.Directories import resolveFilename, SCOPE_PLUGINS, SCOPE_SKIN_IMAGE
+from UserDialog import UserDialog
+from os import unlink, listdir, path as os_path
+
+class UserManager(Screen):
+	skin = """
+		<screen name="UserManager" position="center,center" size="560,350" title="UserManager">
+			<widget source="config" render="Listbox" position="10,10" size="540,220" scrollbarMode="showOnDemand">
+				<convert type="TemplatedMultiContent">
+					{"template": [
+							MultiContentEntryText(pos = (80, 5), size = (400, 50), font=0, flags = RT_HALIGN_LEFT, text = 0), # index 0 is the name
+							MultiContentEntryPixmapAlphaTest(pos = (0, 0), size = (48, 48), png = 3), # index 4 is the status pixmap
+						],
+					"fonts": [gFont("Regular", 40)],
+					"itemHeight": 50
+					}
+				</convert>
+			</widget>
+			<widget name="introduction" position="50,270" size="500,20" zPosition="10" font="Regular;21" halign="center" transparent="1" />
+			<widget name="ButtonRedtext" position="410,305" size="140,21" zPosition="10" font="Regular;21" transparent="1" />
+			<widget name="ButtonRed" pixmap="skin_default/buttons/button_red.png" position="390,305" zPosition="10" size="15,16" transparent="1" alphatest="on" />
+			<ePixmap pixmap="skin_default/buttons/button_yellow.png" position="30,305" zPosition="10" size="15,16" transparent="1" alphatest="on" />
+			<widget name="deletetext" position="50,305" size="350,21" zPosition="10" font="Regular;21" transparent="1" />
+		</screen>"""
+
+	def __init__(self, session, plugin_path):
+		self.skin_path = plugin_path
+		self.session = session
+		Screen.__init__(self, session)
+		self["shortcuts"] = ActionMap(["ShortcutActions", "WizardActions"],
+		{
+			"ok": self.keyOK,
+			"back": self.exit,
+			"cancel": self.exit,
+			"red": self.exit,
+			"yellow": self.delete,
+		})
+		self["ButtonRed"] = Pixmap()
+		self["ButtonRedtext"] = Label(_("Close"))
+		self["introduction"] = Label(_("Press OK to edit selected settings."))
+		self["deletetext"] = Label(_("Delete"))
+
+		self.list = []
+		self["config"] = List(self.list)
+		self.updateList()
+		self.onShown.append(self.setWindowTitle)
+
+	def setWindowTitle(self):
+		self.setTitle(_("Usermanager"))
+
+	def updateList(self):
+		self.list = []
+		for file in listdir('/etc/enigma2'):
+			if file.endswith('.cache'):
+				if file == 'networkbrowser.cache':
+					continue
+				else:
+					hostpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_PLUGINS, "SystemPlugins/NetworkBrowser/icons/host.png"))
+					self.list.append(( file[:-6],'edit',file,hostpng ))
+		self["config"].setList(self.list)
+
+	def exit(self):
+		self.close()
+
+	def keyOK(self, returnValue = None):
+		cur = self["config"].getCurrent()
+		if cur:
+			returnValue = cur[1]
+			hostinfo = cur[0]
+			if returnValue is "edit":
+				self.session.open(UserDialog, self.skin_path,hostinfo)
+
+	def delete(self, returnValue = None):
+		cur = self["config"].getCurrent()
+		if cur:
+			returnValue = cur[2]
+			cachefile = '/etc/enigma2/' + returnValue.strip()
+			if os_path.exists(cachefile):
+				unlink(cachefile)
+				self.updateList()
+
Index: ipk/source/network_networkbrowser_1_0/usr/lib/enigma2/python/Plugins/SystemPlugins/NetworkBrowser/__init__.py
===================================================================
--- ipk/source/network_networkbrowser_1_0/usr/lib/enigma2/python/Plugins/SystemPlugins/NetworkBrowser/__init__.py	(revision 14692)
+++ ipk/source/network_networkbrowser_1_0/usr/lib/enigma2/python/Plugins/SystemPlugins/NetworkBrowser/__init__.py	(revision 14692)
@@ -0,0 +1,31 @@
+# -*- coding: ISO-8859-1 -*-
+#===============================================================================
+# NetworkBrowser and MountManager Plugin by acid-burn
+# netscan lib by Nix_niX
+# for further License informations see the corresponding License files
+# or SourceCodes
+#
+# Networkbrowser modded by Civer (AAF Team): Networkbrowsermod 0.9
+#===============================================================================
+
+from Components.Language import language
+from Tools.Directories import resolveFilename, SCOPE_PLUGINS, SCOPE_LANGUAGE
+import os,gettext
+PluginLanguageDomain = "NetworkBrowser"
+PluginLanguagePath = "SystemPlugins/NetworkBrowser/po"
+
+def localeInit():
+	lang = language.getLanguage()[:2] # getLanguage returns e.g. "fi_FI" for "language_country"
+	os.environ["LANGUAGE"] = lang # Enigma doesn't set this (or LC_ALL, LC_MESSAGES, LANG). gettext needs it!
+	print "[NetworkBrowser] set language to ", lang
+	gettext.bindtextdomain(PluginLanguageDomain, resolveFilename(SCOPE_PLUGINS, PluginLanguagePath))
+
+def _(txt):
+	t = gettext.dgettext(PluginLanguageDomain, txt)
+	if t == txt:
+		print "[NetworkBrowser] fallback to default translation for", txt
+		t = gettext.gettext(txt)
+	return t
+
+localeInit()
+language.addCallback(localeInit)
Index: ipk/source/network_networkbrowser_1_0/usr/lib/enigma2/python/Plugins/SystemPlugins/NetworkBrowser/plugin.py
===================================================================
--- ipk/source/network_networkbrowser_1_0/usr/lib/enigma2/python/Plugins/SystemPlugins/NetworkBrowser/plugin.py	(revision 14692)
+++ ipk/source/network_networkbrowser_1_0/usr/lib/enigma2/python/Plugins/SystemPlugins/NetworkBrowser/plugin.py	(revision 14692)
@@ -0,0 +1,34 @@
+# -*- coding: utf-8 -*-
+# for localized messages
+from __init__ import _
+
+from Plugins.Plugin import PluginDescriptor
+from NetworkBrowser import NetworkBrowser
+from Components.Network import iNetwork
+from MountManager import AutoMountManager
+
+plugin_path = ""
+
+def NetworkBrowserMain(session, iface = None, **kwargs):
+	session.open(NetworkBrowser,iface, plugin_path)
+
+def MountManagerMain(session, iface = None, **kwargs):
+	session.open(AutoMountManager, iface, plugin_path)
+
+def NetworkBrowserCallFunction(iface):
+	interfaceState = iNetwork.getAdapterAttribute(iface, "up")
+	if interfaceState is True:
+		return NetworkBrowserMain
+	else:
+		return None
+
+def MountManagerCallFunction(iface):
+	return MountManagerMain
+
+def Plugins(path, **kwargs):
+	global plugin_path
+	plugin_path = path
+	return [
+		PluginDescriptor(name=_("NetworkBrowser"), description=_("Search for network shares"), where = PluginDescriptor.WHERE_NETWORKSETUP, fnc={"ifaceSupported": NetworkBrowserCallFunction, "menuEntryName": lambda x: _("NetworkBrowser"), "menuEntryDescription": lambda x: _("Search for network shares...")}),
+		PluginDescriptor(name=_("MountManager"), description=_("Manage network shares"), where = PluginDescriptor.WHERE_NETWORKSETUP, fnc={"ifaceSupported": MountManagerCallFunction, "menuEntryName": lambda x: _("MountManager"), "menuEntryDescription": lambda x: _("Manage your network shares...")})
+	]
