Hello all, I am trying to craft a script that moves files from users Desktops to a network share which is mounted via NFS. I currently run this script successfully at logon under Ubuntu Hardy 8.04 AMD 64. My clients are built with the -ai386 option so they run in 32 bit mode. The working verison of the script is sourced from /etc/X11/Xsession.d
However I'd rather have this script run at log off, and I understand that I need to run it from /opt/ltsp/i386/usr/lib/ldm/rc.d I've created a file called K99-CleanDesktop and I've re-rolled my client image. But my script doesn't appear to run on logoff. I suspect it's because I don't understand how to adapt this script correctly. I've tried to grok section 15.5 from the LTSP Admin Manual www.ltsp.org/~sbalneav/LTSPManual.pdf but I am sorry to say it's just too terse for me to understand. I've pasted my script below with the hope that someone can tutor me and help me get this working. Thanks!! John # K99-CleanDesktop # Clean up from previous session # # Sweep all files from $HOME and $HOME/Desktop to $HOME/Desktop/ZDrive # (ignores directories). # Makes Desktop and ZDrive dir entries if needed. # # Name of desktop itself dt=$HOME/Desktop # Name of ZDrive on Desktop zd=$dt/ZDrive # If the user created files in the home directory, rsync them # to their Zdrive and remove the copy for src in "$HOME" "$dt" do # Walk entries in this dir cd $src for x in * do # Only process *files* in this dir if [ -f "$x" ] then # Calculate default destination dest="$zd/$x" if [ -e "$dest" ] then rsync -avu "$x" "$dest" rm -rf "$x" else cp "$x" "$dest" && rm -f "$x" fi fi done done ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _____________________________________________________________________ Ltsp-discuss mailing list. To un-subscribe, or change prefs, goto: https://lists.sourceforge.net/lists/listinfo/ltsp-discuss For additional LTSP help, try #ltsp channel on irc.freenode.net