Does puppy auto-sync the pup001?
Does puppy auto-sync the pup001?
We have had a series of random/unexpected power outages around here, which have caused my puppy linux live-cd computer to shut down. Does puppy automatically syncronise itself with a pup001 file on my HD at regular intervals? Can I make it?
you could create a small shellscript
script: mysync
Save it as /usr/local/bin/mysync
Make it executable in a consolewindow with this command:
chmod 755 /usr/local/bin/mysync
Add the line
/usr/local/bin/mysync &
to /etc/rc.d/rc.local0 (as second line after the line "#!/bin/sh")
so that it runs automatically, when you boot puppy.
It will write changes to disk every 3 minutes (180 seconds).
Mark
script: mysync
Code: Select all
#!/bin/bash
sync
sleep 180
$0
Make it executable in a consolewindow with this command:
chmod 755 /usr/local/bin/mysync
Add the line
/usr/local/bin/mysync &
to /etc/rc.d/rc.local0 (as second line after the line "#!/bin/sh")
so that it runs automatically, when you boot puppy.
It will write changes to disk every 3 minutes (180 seconds).
Mark
maybe this would be better:
or maybe:
i think ext3 automatically does a sync every 5 seconds anyway (ext3 is optimised for reliablility), unless it was mounted with other options ... i don't know if ext2 does an automatic sync every 5 seconds
Code: Select all
#!/bin/bash
sync
sleep 180
exec $0
Code: Select all
#!/bin/bash
while true
do
sleep 180
sync
done
- Pizzasgood
- Posts: 6183
- Joined: Wed 04 May 2005, 20:28
- Location: Knoxville, TN, USA
Actually, use /etc/rc.d/rc.local instead. You use rc.local0 for a remaster, but otherwise you use rc.local.to /etc/rc.d/rc.local0
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]
[img]http://www.browserloadofcoolness.com/sig.png[/img]
- BarryK
- Puppy Master
- Posts: 9392
- Joined: Mon 09 May 2005, 09:23
- Location: Perth, Western Australia
- Contact:
Well, the puppy2 saving at shutdown should potentially be more reliable,Brian C wrote:Is there a way to sync a multisession disk manually? When I shut down Puppy, the multisession disk doesn't always burn like it's supposed to, and I'd like the opportunity to sync it while I'm still booted in Puppy.
when we get the bugs out of the alpha release that is.
saving back to DVD is a simple script, that can be launched periodically, or manually by
a icon on the desktop -- TedDog posted an example one line of script that does
that for puppy2 - see the Cutting Edge section I think. I intend to include the desktop icon in the beta release.