Lines 56-62
Link Here
|
56 |
{ |
56 |
{ |
57 |
stringinstring "&$1=" "$CMDLINE" || return 1 |
57 |
stringinstring "&$1=" "$CMDLINE" || return 1 |
58 |
|
58 |
|
59 |
echo "$CMDLINE" | tr "&" "\n" | egrep "^"$1"=" | awk -F= '{ VAL=$2 } END { print VAL }' |
59 |
echo "$CMDLINE" | tr "&" "\n" | egrep "^"$1"=" | awk -F= '{ VAL=$2 } END { print VAL }' | sed 's|%24|$|' |
60 |
|
60 |
|
61 |
return 0 |
61 |
return 0 |
62 |
} |
62 |
} |
Lines 720-726
Link Here
|
720 |
# Catch NXAGENT SMB Port (sometimes the port differs from what we got from nxserver) |
720 |
# Catch NXAGENT SMB Port (sometimes the port differs from what we got from nxserver) |
721 |
# |
721 |
# |
722 |
|
722 |
|
723 |
if stringinstring "Info: Listening for SMB connections on port" "$line" |
723 |
if stringinstring "Info: Listening * SMB connections on port" "$line" |
724 |
then |
724 |
then |
725 |
SMBMOUNT_PORT=$(echo $line | cut -d"'" -f2) |
725 |
SMBMOUNT_PORT=$(echo $line | cut -d"'" -f2) |
726 |
echo "$SMBMOUNT_PORT" >"$USER_FAKE_HOME/.nx/C-$sess_id/scripts/mport" |
726 |
echo "$SMBMOUNT_PORT" >"$USER_FAKE_HOME/.nx/C-$sess_id/scripts/mport" |
Lines 1314-1321
Link Here
|
1314 |
sleep 1 |
1314 |
sleep 1 |
1315 |
done |
1315 |
done |
1316 |
# sometimes the samba port we get from nxserver is not the right one, so let's get it from nxagent |
1316 |
# sometimes the samba port we get from nxserver is not the right one, so let's get it from nxagent |
1317 |
port=$(cat "$USER_FAKE_HOME/.nx/C-$SERVER_NAME-$display-$sessionid/scripts/mport") |
1317 |
realport=$(cat "$USER_FAKE_HOME/.nx/C-$SERVER_NAME-$display-$sessionid/scripts/mport") |
1318 |
error=$(PASSWD="$password" $COMMAND_SMBMOUNT "//$computername/$share" "$HOME/$dir" -o username="$username,ip=127.0.0.1,port=$port" 2>&1) |
1318 |
[ -n "$realport" ] && port=$realport |
|
|
1319 |
error=$(PASSWD="$password" $COMMAND_SMBMOUNT "//$computername/$share" "$HOME/$dir" -o username="$username",ip=127.0.0.1,port=$port 2>&1) |
1319 |
if [ $? -eq 0 ] |
1320 |
if [ $? -eq 0 ] |
1320 |
then |
1321 |
then |
1321 |
$PATH_BIN/nxdialog -dialog ok -caption "NXServer Message" -message "Info: Share: '//$computername/$share' mounted on: '$HOME/$dir'" -display :$display & |
1322 |
$PATH_BIN/nxdialog -dialog ok -caption "NXServer Message" -message "Info: Share: '//$computername/$share' mounted on: '$HOME/$dir'" -display :$display & |