[solved] autosyncr. on shut down

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
der-schutzhund
Posts: 1045
Joined: Mon 26 Nov 2007, 22:07
Location: Blomberg / Germany

[solved] autosyncr. on shut down

#1 Post by der-schutzhund »

Hi,

I want to make an automatic synchronization.
Whenever a computer is shut down, he should look at the directory of another computer for new files. Are there any newer files will be copied to the root directory. This "central PC" shut be mountet automatic.
The "central PC" can be either a Windows or Puppy. That does not matter, and depends on what is easier to program.
On Windows I can build with Pnethood by hand a network connection. Under Puppy I get the point not. The entire process would have to proceed with a script.
I have. 20 PCs in use in school so I could get with very little effort adjustments and changes to Puppy all PCs of students to its current level.

Greetings

Wolfgang
-----------------------------------------------------
In Lazy you can insert this line in "shutdown-pc" to mount

Code: Select all

mkdir /mnt/update
mount-FULL -t cifs //192.168.111.101/linuxtest /mnt/update -o username=XXX,password=XXX
Then copy vom /mnt/update to any directorie.

Greetings

Wolfgang
Last edited by der-schutzhund on Mon 25 Feb 2013, 17:30, edited 1 time in total.

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#2 Post by Karl Godt »

i have code like that in rc.shutdown to source a private file to mount and unmount things , create backups and other not really needed stuff since stable hardware on journaling filesystems don't do wrong if there is a hard power-off :

Code: Select all

[ -r /etc/rc.d/rc.shutdown.local ] && . /etc/rc.d/rc.shutdown.local
«Give me GUI or Death» -- I give you [[Xx]term[inal]] [[Cc]on[s][ole]] .
Macpup user since 2010 on full installations.
People who want problems with Puppy boot frugal :P

der-schutzhund
Posts: 1045
Joined: Mon 26 Nov 2007, 22:07
Location: Blomberg / Germany

#3 Post by der-schutzhund »

Hallo Karl Godt,

inzwischen habe ich das Problem schon gelöst aber bei dir finde ich keinen Befehl um einen externen LAN-PC zu mounten.
Du wolltest nur zeigen an welcher Stelle man beim shutdown ein zusätzliches "mountscript" starten kann?

LG

Wolfgang
Karl Godt wrote:i have code like that in rc.shutdown to source a private file to mount and unmount things , create backups and other not really needed stuff since stable hardware on journaling filesystems don't do wrong if there is a hard power-off :

Code: Select all

[ -r /etc/rc.d/rc.shutdown.local ] && . /etc/rc.d/rc.shutdown.local

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#4 Post by Karl Godt »

I only have broadband and no router and such -- and yes i wanted to show where to add code for a second sutdown script . Don't know much 'bout cifs either , but searching for cifs shows 6x30 hits on this forum . Since i am compiling my kernels i am interested in file system also .

Shutdown hang when CIFS shares are mounted and potential fix
http://murga-linux.com/puppy/viewtopic. ... 882&t=7312

HiDrive mount (From Strato)
http://murga-linux.com/puppy/viewtopic. ... 82&t=73745

fstab mounting is borked in v5.25
http://murga-linux.com/puppy/viewtopic. ... 82&t=69069

I am glad you found a stable OS for your purposes :)
«Give me GUI or Death» -- I give you [[Xx]term[inal]] [[Cc]on[s][ole]] .
Macpup user since 2010 on full installations.
People who want problems with Puppy boot frugal :P

Post Reply