public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in net-misc/nxserver-freenx/files: nxserver-freenx-0.7.3_p104-nxnode_setup_samba.patch
@ 2009-10-09 14:29 Bernard Cafarelli (voyageur)
  0 siblings, 0 replies; only message in thread
From: Bernard Cafarelli (voyageur) @ 2009-10-09 14:29 UTC (permalink / raw
  To: gentoo-commits

voyageur    09/10/09 14:29:01

  Added:                nxserver-freenx-0.7.3_p104-nxnode_setup_samba.patch
  Log:
  Fix samba parameters setting in nxnode, patch by and thanks to Bruno Redondi <bruno.redondi@altarisoluzione.com> in bug #269593
  (Portage version: 2.2_rc44/cvs/Linux x86_64)

Revision  Changes    Path
1.1                  net-misc/nxserver-freenx/files/nxserver-freenx-0.7.3_p104-nxnode_setup_samba.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/nxserver-freenx/files/nxserver-freenx-0.7.3_p104-nxnode_setup_samba.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/nxserver-freenx/files/nxserver-freenx-0.7.3_p104-nxnode_setup_samba.patch?rev=1.1&content-type=text/plain

Index: nxserver-freenx-0.7.3_p104-nxnode_setup_samba.patch
===================================================================
diff -ruN freenx-server.orig/nxnode freenx-server/nxnode
--- freenx-server.orig/nxnode	2009-03-29 14:07:27.000000000 +0200
+++ freenx-server/nxnode	2009-05-12 19:19:28.090537066 +0200
@@ -85,6 +85,45 @@
 	echo $sessionid
 }
 
+setup_samba()
+{
+	smbport=""
+
+	# We know from protocol traces that client=linux,winnt,macosx are valid values.
+	# I hope with smbclientproto=smb on default and smbclientproto=cifs on all valid
+	# values we get support for all those systems.
+
+	smbproto="$SAMBA_MOUNT_SHARE_PROTOCOL"
+
+	if [ "$smbproto" = "both" ]
+	then
+		smbproto="smbfs"
+
+		[ "$client" = "linux" ] && smbproto="cifs"
+		[ "$client" = "winnt" ] && smbproto="cifs"
+		[ "$client" = "macosx" ] && smbproto="cifs"
+
+		# FIXME: This is a rather wild guess
+		[ "$client" = "win9x" ] && smbproto="smbfs"
+	fi
+
+	if [ "$smbproto" = "cifs" ]
+	then
+		smbport=445
+		COMMAND_SMBMOUNT=$COMMAND_SMBMOUNT_CIFS
+		COMMAND_SMBUMOUNT=$COMMAND_SMBUMOUNT_CIFS
+	elif [ "$smbproto" = "none" ] # none
+	then
+		# we set this to true so that the 
+		# SMB mount does not give an error message.
+
+		COMMAND_SMBMOUNT=/bin/true
+		COMMAND_SMBUMOUNT=/bin/true
+	else # smbfs
+		smbport=139
+	fi
+}
+
 #
 # -----------------------------------------------------------------------------
 # Node functions module
@@ -735,6 +774,7 @@
 
 node_umount_smb()
 {
+	setup_samba
 	[ -e "$USER_FAKE_HOME/.nx/C-$sess_id/scripts/mpoint" ] || return
 	cat "$USER_FAKE_HOME/.nx/C-$sess_id/scripts/mpoint" | while read mpoint
 	do
@@ -1136,39 +1176,7 @@
 
 	if [ "$samba" = "1" ]
 	then
-		# We know from protocol traces that client=linux,winnt,macosx are valid values.
-		# I hope with smbclientproto=smb on default and smbclientproto=cifs on all valid
-		# values we get support for all those systems.
-
-		smbproto="$SAMBA_MOUNT_SHARE_PROTOCOL"
-
-		if [ "$smbproto" = "both" ]
-		then
-			smbproto="smbfs"
-
-			[ "$client" = "linux" ] && smbproto="cifs"
-			[ "$client" = "winnt" ] && smbproto="cifs"
-			[ "$client" = "macosx" ] && smbproto="cifs"
-
-			# FIXME: This is a rather wild guess
-			[ "$client" = "win9x" ] && smbproto="smbfs"
-		fi
-
-		if [ "$smbproto" = "cifs" ]
-		then
-			smbport=445
-			COMMAND_SMBMOUNT=$COMMAND_SMBMOUNT_CIFS
-			COMMAND_SMBUMOUNT=$COMMAND_SMBUMOUNT_CIFS
-		elif [ "$smbproto" = "none" ] # none
-		then
-			# we set this to true so that the 
-			# SMB mount does not give an error message.
-
-			COMMAND_SMBMOUNT=/bin/true
-			COMMAND_SMBUMOUNT=/bin/true
-		else # smbfs
-			smbport=139
-		fi
+		setup_samba
 	fi
 	
 	# FreeNX specific variables
@@ -1430,6 +1438,7 @@
 
 cmd_node_smbmount()
 {
+	setup_samba
 	sessionid=$(getparam_sessionid)
 	port=$(getparam port)
 	username=$(getparam username)






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-10-09 14:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-09 14:29 [gentoo-commits] gentoo-x86 commit in net-misc/nxserver-freenx/files: nxserver-freenx-0.7.3_p104-nxnode_setup_samba.patch Bernard Cafarelli (voyageur)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox