/usr/share/tcos/hooks-addons/59freenx is in initramfs-tools-tcos 0.89.86.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | # hooks addon of FreeNX
# need nxclient installed
if [ ! ${TCOS_FREENX} ]; then
_verbose "(59freenx) TCOS_FREENX disabled"
else
stat_before
mkdir -p $DESTDIR/usr/NX/bin
mkdir -p $DESTDIR/usr/NX/lib
mkdir -p $DESTDIR/usr/NX/share
mkdir -p $DESTDIR/usr/NX/share/keys
# mkdir -p $DESTDIR/etc/nxserver/
#cat << EOF > $DESTDIR/etc/nxserver/node.conf
#COMMAND_XAUTH=/usr/bin/xauth
#ENABLE_SSH_AUTHENTICATION="1"
#EOF
#FIXME
# to work sound need esddsp and this vars
##ENABLE_ESD_PRELOAD="0"
##ESD_BIN_PRELOAD="esddsp"
# not know if needed
# ssh ssh-keygen md5sum
# AGENT_EXTRA_OPTIONS_X commented as Antonio Quesada said
# firewalled freenx (by Antonio Quesada)
# $ssh -l pepito -C -2 -L 5000:serverNX:22 dominio.com
#
#pepito= cuenta de usuario registrado en el fw
#serverNX= hostname del servidor NX al que queremos acceder
#dominio.com= el fw, claro está.
#5000= Puerto local al que queremos redirigir, puedes escoger el que quieras
#22= Salvo que redirijas a otro puerto, el NX está a la escucha en el ssh
#-C -2= utilizar ssh 2 y comprimido
#ahora llamamos al NXclient y le decimos que el servidor es localhost y que se
#conecte al puerto 5000 o al que hayamos decidido en la opción -L xxxx:
cpifexists /usr/NX/bin/nxclient /usr/NX/bin/
cpifexists /usr/NX/bin/nxesd /usr/NX/bin/
cpifexists /usr/NX/bin/nxssh /usr/NX/bin/
# firewalled connection
cpifexists /usr/bin/ssh /usr/bin/
cpifexists /usr/bin/ssh-keygen /usr/bin/
# expect runs on server
# cpifexists /usr/bin/expect /usr/bin/
#copydir /usr/NX/share/keyboards/ /usr/NX/share/
cpifexists /usr/NX/share/keyboards /usr/NX/share/
cpifexists /usr/NX/share/keys/server.id_dsa.key /usr/NX/share/keys/
copydir /usr/NX/share/images /usr/NX/share/
cpifexists /lib/libpthread.so.0 /lib/
if [ ! -d /usr/share/doc/libstdc++2.10-glibc2.2/ ]; then
_echo " ** ERROR: need to install libstdc++2.10-glibc2.2 package for FreeNX"
else
cpifexists /usr/lib/libstdc++-libc6.2-2.so.3 /usr/lib/
fi
cpifexists /usr/NX/lib/libcrypto.so /usr/NX/lib/
cpifexists /usr/NX/lib/libjpeg.so /usr/NX/lib/
cpifexists /usr/NX/lib/libpng12.so /usr/NX/lib/
cpifexists /usr/NX/lib/libXcomp.so /usr/NX/lib/
cpifexists /usr/NX/lib/libz.so /usr/NX/lib/
# not know if necesary
cpifexists /usr/lib/libXcomp.so.1 /usr/lib/
cpifexists /usr/lib/libXcompext.so.1 /usr/lib/
cpifexists /usr/lib/libaudiofile.so.0 /usr/lib/
#echo "/usr/NX/lib" >> $DESTDIR/etc/ld.so.conf
stat_after "FreeNX"
fi # end of TCOS_FREENX
if [ ${TCOS_FREENX_SQUASHFS} ]; then
stat_before
cat << EOF > ${DESTDIR}/scripts/tcos-premount/60freenx
#!/bin/sh
#
# new header not using prereqs
if [ "\$1" = "prereqs" ]; then
echo ""
exit 0
fi
quiet=n
. /scripts/functions
. /conf/tcos.conf
. /conf/tcos-run-functions
TCOS_FREENX_SQUASHFS_FILE=\$(read_cmdline_var "freenx" "")
if [ "\$TCOS_FREENX_SQUASHFS_FILE" = "" ]; then
exit 0
fi
# load modules
modprobe -q loop >> /tmp/initramfs.debug 2>&1
modprobe -q squashfs >> /tmp/initramfs.debug 2>&1
modprobe -q unionfs >> /tmp/initramfs.debug 2>&1
value=0
log_begin_msg "Downloading FREENX squashfs"
download_file /tcos/\${TCOS_FREENX_SQUASHFS_FILE} /mnt/tmp/nxclient.squashfs || value=1
sync
sleep 1
log_end_msg \$value
# Mount squashfs filesystems
log_begin_msg "Mounting FREENX filesystem"
mkdir -p /usr/NX
mount -r -o loop -t squashfs /mnt/tmp/\${TCOS_FREENX_SQUASHFS_FILE} /usr/NX >> /tmp/initramfs.debug 2>&1
log_end_msg \$?
# download settings
mkdir -p /root/.nx/config
download_file /tcos/nxclient.cfg /root/.nx/config/nxclient.cfg
download_file /tcos/servidor.nxs /root/.nx/config/servidor.nxs
echo "TCOS_XORG_TYPE=\"F\"" >> /conf/tcos.conf
EOF
chmod +x ${DESTDIR}/scripts/tcos-premount/60freenx
# needed libs (libstdc++2.10-glibc2.2 package)
cpifexists /usr/lib/libstdc++-libc6.2-2.so.3 /usr/lib/
stat_after "FreeNX squashfs"
fi
|