From e6a42a1ad4404a2c1adf186a4775657b54d94d42 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Mon, 5 Sep 2005 21:57:14 +0000 Subject: Added checks for nc and expect; added the Nomachine DSA key to the docdir. --- freenx/build/freenx.SlackBuild | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) (limited to 'freenx') diff --git a/freenx/build/freenx.SlackBuild b/freenx/build/freenx.SlackBuild index 062f3054..eb615ef8 100755 --- a/freenx/build/freenx.SlackBuild +++ b/freenx/build/freenx.SlackBuild @@ -21,6 +21,12 @@ # 0.4.4-4: 03/Sep/2005 by Eric Hameleers # * Reorganized the patches. Sound for Windows clients will now # work out-of-the-box if enabled in the node.conf. +# 0.4.4-5: 05/Sep/2005 by Eric Hameleers +# * Added a check for expect and nc as well. Also added the DSA key +# that a Nomachine client uses for the initial connection to a +# NX server (this is by default an allowed key for this FreeNX +# server package). You usually do not need this keyfile, but it is +# put in the doc directory for reference. # # Run 'sh SlackBuild --cleanup' to build a Slackware package. # The package (.tgz) plus descriptive .txt file are created in /tmp . @@ -38,7 +44,7 @@ fi PRGNAM=freenx VERSION=0.4.4 ARCH=noarch -BUILD=4 +BUILD=5 PKG=$TMP/package-$PRGNAM @@ -118,13 +124,22 @@ export $(grep ^NX_SESS_DIR usr/bin/nxloadconfig) export $(grep ^NX_ETC_DIR usr/bin/nxloadconfig) export $(grep ^NX_LOGFILE usr/bin/nxloadconfig) export $(grep ^SSH_AUTHORIZED_KEYS usr/bin/nxloadconfig) -#echo "I will restart the SSH daemon now -" -#echo "This will have no effect on any ssh session you may have running," -#echo " but it is needed for the FreeNX setup." -#/etc/rc.d/rc.sshd restart + if ! /sbin/pidof sshd >/dev/null ; then - echo "The SSH daemon is not running, but without SSH, NX will not work!" + echo "" + echo "WARNING: The SSH daemon is not running, but without SSH, NX will not work." +fi + +if ! which nc 1>/dev/null 2>/dev/null ; then + echo "" + echo "WARNING: FreeNX needs the 'netcat' program to be installed." fi + +if ! which expect 1>/dev/null 2>/dev/null ; then + echo "" + echo "WARNING: FreeNX needs the 'expect' program to be installed." +fi + touch ${NX_ETC_DIR/#\//}/passwords ${NX_ETC_DIR/#\//}/passwords.orig \ ${NX_LOGFILE/#\//} chmod 600 ${NX_ETC_DIR/#\//}/pass* ${NX_LOGFILE/#\//} @@ -146,7 +161,7 @@ fi if ! { chroot . getent passwd | egrep -q "^nx:"; } then chroot . useradd -m -d ${NX_HOME_DIR} -s /usr/bin/nxserver nx - chroot . passwd -u nx + chroot . passwd -u nx 1>/dev/null mkdir -p ${NX_HOME_DIR/#\//}/.ssh chmod 700 ${NX_HOME_DIR/#\//}/.ssh fi @@ -217,7 +232,8 @@ EEOOTT # --- DOCUMENTATION --- mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -DOCS="AUTHORS COPYING ChangeLog CONTRIB $CWD/README.slackware" +DOCS="AUTHORS COPYING ChangeLog CONTRIB \ + $CWD/README.slackware $CWD/nomachine.id_dsa.key" cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION chmod -R a-w $PKG/usr/doc/$PRGNAM-$VERSION/* -- cgit v1.2.3-79-gdb01