# hooks addon to use terminal devices # need autofs and ltspfs # ltspfs # TCOS_REMOTEFS = shfs ltspfs mkdir -p $DESTDIR/etc/X11/PreRun/ cat << EOF > $DESTDIR/etc/X11/PreRun/15ltspfs-set-xprop #!/bin/sh /bin/ltspfs-set-xprop >> /tmp/initramfs.debug 2>&1 & EOF chmod +x $DESTDIR/etc/X11/PreRun/15ltspfs-set-xprop create_launcher() { cat << EOF > $DESTDIR/bin/ltspfs-set-xprop #!/bin/sh # wait for Xorg export DISPLAY=:0 export XAUTHORITY=/root/.Xauthority if [ "\$1" != "now" ]; then sleep 2 fi echo "ltspfs-set-xprop::waitforX" waitforX # wait until Xorg is complety started if [ "\$1" != "now" ]; then sleep 5 fi echo "ltspfs-set-xprop::setting xprop value" echo "xprop -root -f LTSPFS_TOKEN 8s -set LTSPFS_TOKEN \$(cat /var/run/ltspfs_token)" xprop -root -f LTSPFS_TOKEN 8s -set LTSPFS_TOKEN \$(cat /var/run/ltspfs_token) exit 0 EOF chmod +x $DESTDIR/bin/ltspfs-set-xprop } if [ "$TCOS_REMOTEFS" = "ltspfs" ]; then create_launcher cpifexists /usr/bin/xprop /usr/bin/ if [ -e /usr/bin/ltspfsd ]; then stat_before cpifexists /usr/bin/ltspfsd /usr/bin stat_after "ltspfsd" else echo "ERROR:" echo "" echo "Not LTSPFS support, please install ltspfsd-core." echo "" echo "" fi fi if [ $TCOS_NTFS_3G ] && [ ! -e /usr/share/initramfs-tools/hooks/ntfs_3g ]; then stat_before # copy ntfs-3g bin and force load fuse cpifexists /usr/bin/ntfs-3g /usr/bin/ echo "/usr/bin/ntfs-3g /sbin/mount.ntfs-3g" >> $DESTDIR/conf/links manual_add_modules fuse echo "fuse" >> $DESTDIR/etc/modules stat_after "NTFS-3G tools" fi if [ ! $TCOS_AUTOFS ]; then _verbose "(05devices) TCOS_AUTOFS disabled" else if [ -d /usr/share/doc/autofs ]; then echo "ERROR" echo "" echo "No autofs support, please install autofs package." echo " => apt-get install autofs" echo "" else # autofs stat_before cpifexists /usr/sbin/automount /sbin/ mkdir -p $DESTDIR/usr/lib/autofs copydir /usr/lib/autofs/ /usr/lib/ mkdir -p $DESTDIR/var/run/autofs stat_after "Autofs mounter" fi fi