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

Re: [K12OSN] PostSession script, rm command and user directories



Meelis Mihhailov wrote:

So every time a user ends his/her session, home directory will be removed and replaced with the one in the tar file. (with the needed permissions ) This works fine but now as I'm setting up so called backup server with LTSP 5, FC 5, Gnome 2.8 and Sabayon ... my solution won't work :(

in the old system I have the following code that will erase the home directory of a user who logged off :

cd /
cp /usr/BACKUP/terminal1.tar /home/terminal1.tar
cd /home
rm -R terminal1
tar -xvf terminal1
rm -f terminal1.tar

1) That "cd /" doesn't really do anything. But luckily it doesn't do any harm either.
2) I think "tar -xvf terminal1" should be "tar -xvf terminal1.tar"?

You could clean this up a little further, because it's not really necessary to copy the tar file, extract it and then remove it.

--------------------------------------------------
rm -rf /home/terminal1/*
cd /home
tar -xf /usr/BACKUP/terminal1.tar
--------------------------------------------------

Nils Breunese.

Attachment: PGP.sig
Description: Dit deel van het bericht is digitaal ondertekend


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