[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [K12OSN] lts.conf syncing question





Shawn Powers wrote:
I am trying to keep the lts.conf file between my two LTSP servers in sync, and I'd love to just rsync them -- but the SERVER = ip.add.ress line is obviously different...   Anyone have any ideas on how to remedy that?  Or possibly keep the workstation specific stuff in a separate file, and include that file into the lts.conf file?

Maybe I could create a bash script that rsyncs and then somehow awk's the server line back to where it's supposed to be?  Thoughts?

-Shawn


Dunno about rsync, but I can see how you could use NFS to accomplish the same goal, and reasonably securely.  Here's how.

Make an NFS share on the one that you want to be the "master" server, allowing only the "slave" server's IP address to access it, like this ("w.x.y.z" is your "master" server's IP address here):

# this line goes into your /etc/exports file on the "master" server
/opt/ltsp/i386/etc   w.x.y.z(ro,async,no_root_squash)

Then, from the "slave" server, mount /opt/ltsp/i386/etc on w.x.y.z to, say, /root/ltsconfsync or some other safe place.

mount -t nfs w.x.y.z:/opt/ltsp/i386/etc /root/ltsconfsync

Finally, pop a script like the following into the "slave" server's /etc/cron.daily directory and make it executable:

------------CUT HERE-----------
#!/bin/sh
cp -p /root/ltsconfsync/lts.conf /opt/ltsp/i386/etc/lts.conf
------------CUT HERE-----------

Would this work for your situation?

--TP
_______________________________
Do you GNU?
Microsoft Free since 2003--the ultimate antivirus protection!

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]