ports/net/freenx/files/patch-freenx-nxserver
Pav Lucistnik dd46cefe97 - Update to 0.4.1
PR:		ports/82740
Submitted by:	dewey hylton <freenx@deweyonline.com> (maintainer)
2005-06-30 14:58:24 +00:00

44 lines
1.5 KiB
Text

--- freenx-0.4.1/nxserver.orig Sat Jun 25 08:26:22 2005
+++ freenx-0.4.1/nxserver Tue Jun 28 09:38:25 2005
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/local/bin/bash
# Free implementation of nxserver components
#
@@ -27,7 +27,7 @@
# Reread boot command line; echo last parameter's argument or return false.
getparam(){
stringinstring "&$1=" "$CMDLINE" || return 1
-echo "$CMDLINE" | awk "/^$1=/"' { VAL=$2 } END { print VAL }' FS="=" RS="(&|\n)"
+echo "$CMDLINE" | tr "&" "\n" | egrep "^"$1"=" | awk -F= '{ VAL=$2 } END { print VAL }'
return 0
}
@@ -46,7 +46,7 @@
passdb_get_crypt_pass()
{
- echo "$@" | md5sum | cut -d" " -f1
+ echo "$@" | md5 | cut -d" " -f1
}
passdb_get_pass()
@@ -836,7 +836,7 @@
rm -f "$SESS_LOCKFILE"
- uniqueid=$(echo $[$RANDOM*$RANDOM] | md5sum | cut -d" " -f1 | tr "[a-z]" "[A-Z]")
+ uniqueid=$(echo $[$RANDOM*$RANDOM] | md5 | cut -d" " -f1 | tr "[a-z]" "[A-Z]")
FULL_PARAMS="user=$USER&userip=$USERIP&uniqueid=$uniqueid&display=$SESS_DISPLAY&$PARAMS"
log 6 "$FULL_PARAMS"
@@ -1091,7 +1091,7 @@
[ ${#CMD_CHUSER} -ge 32 ] && cmd_abort "Error: User $CMD_CHUSER must be shorter than 32 characters."
egrep -q "^$CMD_CHUSER:" $NX_ETC_DIR/passwords && cmd_abort "Error: User $CMD_CHUSER already in database."
- getent passwd | egrep -q "^$CMD_CHUSER:" || cmd_abort "Error: User $CMD_CHUSER not existing on local system. Can't add."
+ cat /etc/passwd | egrep -q "^$CMD_CHUSER:" || cmd_abort "Error: User $CMD_CHUSER not existing on local system. Can't add."
passdb_add_user "$CMD_CHUSER"
}