[arch-commits] Commit in freenx/trunk (PKGBUILD freenx.install)

andyrtr at archlinux.org andyrtr at archlinux.org
Sat Apr 21 17:53:51 EDT 2012


    Date: Saturday, April 21, 2012 @ 17:53:51
  Author: andyrtr
Revision: 156613

more file location fixes; fix nx user homedir

Modified:
  freenx/trunk/PKGBUILD
  freenx/trunk/freenx.install

----------------+
 PKGBUILD       |    8 ++++----
 freenx.install |   12 +++++-------
 2 files changed, 9 insertions(+), 11 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2012-04-21 21:08:27 UTC (rev 156612)
+++ PKGBUILD	2012-04-21 21:53:51 UTC (rev 156613)
@@ -47,12 +47,12 @@
   # remove broken dialog function
   patch -Np0 -i  ${srcdir}/remove-dialog.patch
   sed -i -e 's,authorized_keys2,authorized_keys,g' nxloadconfig
-  sed -i -e 's,/usr/NX,/usr/lib/nx,g' nxloadconfig
+  sed -i -e 's,\/usr\/NX,\/usr\/lib/nx,g' nxloadconfig node.conf.sample
   sed -i -e 's,netcat,nc,g' nxloadconfig
   sed -i -e 's/utmp/nx/g' nxsetup
   sed -i -e 's,/usr/X11R6/bin/xauth,/usr/bin/xauth,g' nxloadconfig
   sed -i -e 's,COMMAND_FOOMATIC="/usr/lib/cups/driver/foomatic-ppdfile",COMMAND_FOOMATIC="/usr/bin/foomatic-ppdfile",g' nxloadconfig
-  sed -i -e 's,COMMAND_MD5SUM="openssl md5",COMMAND_MD5SUM="md5sum",g' nxloadconfig
+  sed -i -e 's,COMMAND_MD5SUM="openssl md5",COMMAND_MD5SUM="md5sum",g' nxloadconfig node.conf.sample
   sed -i -e 's|AGENT_EXTRA_OPTIONS_X=""|AGENT_EXTRA_OPTIONS_X="-co /usr/share/X11/rgb -fp /usr/share/fonts/misc,/usr/share/fonts/75dpi,/usr/share/fonts/100dpi,/usr/share/fonts/TTF,/usr/share/fonts/Type1 -xkbdir /usr/share/X11/xkb"|g' nxloadconfig
   sed -i -e 's/ENABLE_AUTORECONNECT_BEFORE_140="1"/ENABLE_AUTORECONNECT_BEFORE_140="0"/g' nxloadconfig
   sed -i -e 's,/etc/init.d/ssh,/etc/rc.d/sshd,g' nxsetup
@@ -62,7 +62,7 @@
   sed -i -e 's:NX_ETC_DIR\=$NX_DIR\/etc:NX_ETC_DIR=\/etc\/nxserver:g' nxloadconfig
   sed -i -e 's:NX_SESS_DIR=$NX_DIR\/var\/db:NX_SESS_DIR=\/var\/lib\/nxserver\/db:g' nxloadconfig
   sed -i -e 's:NX_HOME_DIR=$NX_DIR:NX_HOME_DIR=\/var\/lib\/nxserver:g' nxloadconfig
-  sed -i -e 's:NOMACHINE_NX_HOME_DIR="/usr/lib/nx/home/nx":NOMACHINE_NX_HOME_DIR="/var/lib/nxserver/home/nx":g' nxloadconfig
+  sed -i -e 's:NOMACHINE_NX_HOME_DIR="/usr/lib/nx/home/nx":NOMACHINE_NX_HOME_DIR="/var/lib/nxserver/home/nx":g' nxloadconfig node.conf.sample
   sed -i -e 's:\/usr\/NX:\/usr\/lib\/nx:g' nxdialog
 
   # fix key generation
@@ -91,5 +91,5 @@
 
   # remove files that are part of nxclient
   rm -f  ${pkgdir}/usr/lib/nx/bin/nxprint
-  rm -f  ${pkgdir}/usr//bin/nxprint
+  rm -f  ${pkgdir}/usr/bin/nxprint
 }

Modified: freenx.install
===================================================================
--- freenx.install	2012-04-21 21:08:27 UTC (rev 156612)
+++ freenx.install	2012-04-21 21:53:51 UTC (rev 156613)
@@ -7,14 +7,13 @@
   fi
 
   if grep -q "^nx:" /etc/passwd 2> /dev/null ; then
-    usermod -s /usr/bin/nxserver -c "NX user" -d /var/lib/nxserver/home -u 85 -g nx nx &> /dev/null
+    usermod -s /usr/bin/nxserver -c "NX user" -d /var/lib/nxserver/home/nx -u 85 -g nx nx &> /dev/null
   else
-    useradd -s /usr/bin/nxserver -c "NX user" -d /var/lib/nxserver/home -u 85 -g nx -r nx &> /dev/null
+    useradd -s /usr/bin/nxserver -c "NX user" -d /var/lib/nxserver/home/nx -u 85 -g nx -r nx &> /dev/null
   fi 
 
   # setting up freenx
   echo 'Generating keys ...'
-#  /usr/lib/nx/bin/nxsetup --install --uid 85 --gid 85  2>&1 >/dev/null
   /usr/lib/nx/bin/nxsetup --install 2>&1 >/dev/null
 
   echo "ATTENTION FREENX:"
@@ -31,14 +30,13 @@
   fi
 
   if grep -q "^nx:" /etc/passwd 2> /dev/null ; then
-    usermod -s /usr/bin/nxserver -c "NX user" -d /var/lib/nxserver/home -u 85 -g nx nx &> /dev/null
+    usermod -s /usr/bin/nxserver -c "NX user" -d /var/lib/nxserver/home/nx -u 85 -g nx nx &> /dev/null
   else
-    useradd -s /usr/bin/nxserver -c "NX user" -d /var/lib/nxserver/home -u 85 -g nx -r nx &> /dev/null
+    useradd -s /usr/bin/nxserver -c "NX user" -d /var/lib/nxserver/home/nx -u 85 -g nx -r nx &> /dev/null
   fi
 
   # setting up freenx
   echo "Rerunning nxsetup ..."
-#  /usr/lib/nx/bin/nxsetup --install --uid 85 --gid 85 2>&1 >/dev/null
   /usr/lib/nx/bin/nxsetup --install 2>&1 >/dev/null
 
   if [ "`vercmp $2 0.7.3-10.1`" -lt 0 ]; then
@@ -50,8 +48,8 @@
     echo "/var/lib/nxserver/{var/db/,home/}*"
     echo "When you have FreeNX server running clean with rm -rf /opt/NX"
   fi
+}
 
-}
 # arg 1:  the old package version
 pre_remove() {
   /usr/lib/nx/bin/nxsetup --uninstall --purge 2>&1 >/dev/null



More information about the arch-commits mailing list