--- scripts/setup/nxserver.orig 2012-05-19 11:45:03.000000000 +0200 +++ scripts/setup/nxserver 2013-01-21 22:40:41.958166294 +0100 @@ -967,6 +975,12 @@ } addNXUserLinux () { + + # does the NX user already exist? + if id nx > /dev/null 2>&1 ; then + return + fi + if [ "x$system" != "xdebian" ] then sysuser=`useradd --help 2>&1|grep "\-r"`; @@ -2679,6 +2693,11 @@ system=fedora fi +if grep -q "ID=gentoo" /etc/os-release || [ -f /etc/gentoo-release ]; +then + system=gentoo +fi + if [ "x$system" = "x" -a -f /etc/release ]; then system=solaris @@ -2713,6 +2732,7 @@ "mandrake" ) ;; "fedora" ) ;; "debian" ) ;; + "gentoo" ) ;; "solaris" ) ;; "" ) ARGS=-1 && errMsg="$PREFIX $ERROR ERROR: Unable to autodetect the operating system type, please specify it" ;; * ) ARGS=-1 && errMsg="$PREFIX $ERROR ERROR: Unsupported operating system '$system'" ;; @@ -2892,21 +2912,6 @@ fi fi - - result=`id nx 2>&1` - if [ $? = 0 ]; - then -# printMsg "Cannot add user: nx. User: nx already exists" "error" -# printMsg "Please try to fix the problem by reinstalling the server" "error" - printMsg "Cannot add user: nx" "error" - printMsg "User: nx already exists" "error" - printMsgNoDot "To fix the problem, you may try to completely uninstall NX" - printMsgNoDot "Server and install it from scratch. If this is not enough," - printMsgNoDot "please delete the nx user by using the system commands and" - printMsg "proceed with a new installation of NX Server" - exit 1 - fi - LOGFILE="$INSTALLOG" createLogdirectory startLog