Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 07 Jul 2020, 12:48
All times are UTC - 4
 Forum index » Taking the Puppy out for a walk » Suggestions
A mod to save2flash + snapmergepuppy + savepuppyd
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [10 Posts]  
Author Message
Sit Heel Speak


Joined: 30 Mar 2006
Posts: 2595
Location: downwind

PostPosted: Wed 21 Apr 2010, 18:05    Post subject:  A mod to save2flash + snapmergepuppy + savepuppyd
Subject description: do not allow it to follow a symlink'ed /root/ftpd
 

My usb-stick frugal install just attempted to perform its routine periodic save, whilst I had a 12 GB partition full of large .tar's symlink'ed to /root/ftpd, so as to transfer them over to another box using PureFTPd (which serves from /root/ftpd) and gFTP (on the other box, to fetch from this box's /root/ftpd).

"Warning, cannot save entire contents," or some such silly complaint.

Suggestion:

When /root/ftpd is a symlink, then make it an exception to the policy of saving everything in the main filesystem.

Might be a good idea to consider the idea of not following symlinks to other things, as well, which are routinely symlink'ed-out to non-mount-home partitions for the purpose of saving space in the savefile, e.g.

/~/.opera
/~/.cpan
/~/.packages
/~/checkout (gnome sources)
/usr/java
/usr/libexec
python2.5 wherever it is (not on a built-up Puppy at the moment)
python2.6
perl/perl5

and others will surely suggest themselves.
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 9396
Location: Perth, Western Australia

PostPosted: Thu 22 Apr 2010, 03:03    Post subject:  

I'm not quite clear, does /root/ftpd contain symlinks to files that are elsewhere?

Anyway, I have added exclusion of "root/ftpd" into snapmergepuppy.

_________________
https://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
Sit Heel Speak


Joined: 30 Mar 2006
Posts: 2595
Location: downwind

PostPosted: Thu 22 Apr 2010, 03:49    Post subject:  

BarryK wrote:
I'm not quite clear, does /root/ftpd contain symlinks to files that are elsewhere?

Anyway, I have added exclusion of "root/ftpd" into snapmergepuppy.
Menu --> Network --> PureFTP starts an ftp server which serves files out from a dedicated directory called /root/ftpd...

Ah, but by cleverly changing /root/ftpd from a regular directory (which is how it is supplied in Puppy) to a symlink, say for example to /mnt/sda9, it is possible to serve out the entire contents of a partition.

Makes it easy and fast to move a laaaaarge batch of files out to another computer. Just start Menu --> Internet --> gFTP on the 'nother computer, point it at the server computer on which /root/ftpd has been made into a symlink to e.g. /mnt/sda9, and whoooooosh.

Ah, but if the server computer is booted from a usb stick...and if snapmergepuppy happens while /root/ftpd is symlink'ed to /mnt/sda9...then, heretofore, snapmergepuppy tries to save the entire contents of /mnt/sda9 to the savefile. If sda9 contains 12 GB of content, but the savefile is only 512 MB, then yikes, snapmergepuppy attempts to fill the savefile with the entire 12 GB. No workee. You get that red warning message at topscreen and a warning that entire contents cannot be saved, and freememapplet goes to 0 bytes left.

Thanks very much for changing it...is the pet in woof official, or are you folding it into the next edition of rootfs-skeleton?
Back to top
View user's profile Send private message 
jemimah


Joined: 26 Aug 2009
Posts: 4309
Location: Tampa, FL

PostPosted: Thu 22 Apr 2010, 09:24    Post subject:  

Another exclusion that might be good is browser caches.

I'd added '.cache' to Puppeee to exclude Chrome's cache, and shutdown is now significantly faster.

I don't think there's any reason you'd really want to save the cache is there?
Back to top
View user's profile Send private message Visit poster's website 
DMcCunney

Joined: 02 Feb 2009
Posts: 894

PostPosted: Thu 22 Apr 2010, 11:09    Post subject:  

jemimah wrote:
Another exclusion that might be good is browser caches.

I'd added '.cache' to Puppeee to exclude Chrome's cache, and shutdown is now significantly faster.

I don't think there's any reason you'd really want to save the cache is there?

I certainly don't. In Mozilla based browsers, I specify that cache is to be placed in /dev/shm. I can't find an option in Chrome to specify where cache is placed, or I'd do it there, too.
______
Dennis
Back to top
View user's profile Send private message 
jemimah


Joined: 26 Aug 2009
Posts: 4309
Location: Tampa, FL

PostPosted: Thu 22 Apr 2010, 12:03    Post subject:  

There's a command line option to do it in Chrome.

Code:
--disk-cache-dir="CACHE_DIR" --disk-cache-size=N
Back to top
View user's profile Send private message Visit poster's website 
DMcCunney

Joined: 02 Feb 2009
Posts: 894

PostPosted: Thu 22 Apr 2010, 12:09    Post subject:  

jemimah wrote:
There's a command line option to do it in Chrome.

Code:
--disk-cache-dir="CACHE_DIR" --disk-cache-size=N

Ah, splendid. Thanks! I hadn't found that yet.
______
Dennis
Back to top
View user's profile Send private message 
big_bass

Joined: 13 Aug 2007
Posts: 1742

PostPosted: Thu 22 Apr 2010, 12:56    Post subject:  

I am pre woof using 4.12 snapmergepuppy ,but if the newer
has this line too it needs this edit



Code:

#original snapmergepuppy line# 83
 - if [ $FILESIZEK -gt $FREEBASEK ];then
 

#fixed big_bass
+ if [ "$FILESIZEK" -gt "$FREEBASEK" ];then
 
 


Joe
Back to top
View user's profile Send private message 
glene77is


Joined: 17 Aug 2010
Posts: 200
Location: Memphis, TN, USA

PostPosted: Wed 22 Apr 2020, 23:45    Post subject: exclusions from SnapMergePuppy
Subject description: script C3C
 

jemimah wrote:
Another exclusion that might be good is browser caches.

I'd added '.cache' to Puppeee to exclude Chrome's cache, and shutdown is now significantly faster.

I don't think there's any reason you'd really want to save the cache is there?


No reason to save ".cache" ?
One of my browsers ( IRON , U-Light, Mozilla FireFox )
requires a subdir for its profile to reference.
That browser faults,
and then we must copy the subdir in-place to restore function.

Our note on this is :
############################################
#
### Clear these possibly lingering '.cache' subdir,
### which may be 100 MB size and enlarge the saveFolder grossly.
### Note: we have edited the FireFox "U-Light" browser profile
### so that "U-Light" browser will call
### "/root/.cache/light/light/Lite-profile.default"
### This will be our common cache for U-light.
### Other browsers can be handled the same way.
### Note: sometimes we kill FireFox while FireFox is still running,
### so FireFox does not clear the cache.
### This routine clears the left-over trash.
#
############################################

We set our Browsers to 'kill off' extra files on "Shutdown"
but we found that this is not a total 'culling'.

Therefore, due to the large amount of file space used
which is extraneous to the rebooted system,
we have written a simple script "C3C" which manually parses through
a list of subdir that we have verified are not needed after shutdown.

C3C deletes these subdir :
"/var/spool/cups/tmp/*"
"/var/cache/cups/*"
"/root/.cache/mesa_shader_cache/*"
"/root/.cache/event-sound*"
"/root/.cache/light/light/Lite-profile-default/thumbnails/*"
"/root/.cache/light/light/Lite-profile-default/cache2/entries/*"
"/root/.cache/iron/Default/Cache"
"/root/.cache/iron/Default/Media?Cache"
"/root/.config/iron/Default/Service?Worker/*"
"/root/.config/iron/Default/Local?Storage/*"
"/root/.config/iron/pnacl/*"
"/root/.config/iron/EVWhitelist/*"
"/root/.config/iron/ShaderCache/*"

That amounts to sometimes 100 MB transferred into saveDATA.
This can accumulate if one of my custom script projects
does a "Fatal Nose Dive" to the "black screen".

We set our Browsers to 'kill off' extra files on "Shutdown"
but we found that this is not a total 'culling'.

So, Be Thoughtful and Careful about 'deleting' and 'not-deleting'
your system subdir. Research your systems "real" requirements.

_________________
Puppy Linux is more fun than a barrel of M$ monkeys Razz
www.geocities.WS/glene77is
glene77is --- {^,^} --- electricity is shocking, Memphis, TN, USA.

Last edited by glene77is on Sat 09 May 2020, 09:07; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
glene77is


Joined: 17 Aug 2010
Posts: 200
Location: Memphis, TN, USA

PostPosted: Thu 23 Apr 2020, 00:04    Post subject:  

"SMP" = 'snapmergepuppy'
#
* We have noticed that the original 'old' SMP appeared to 'drop'
some system changes ;
* ie, the changes did not appear in the saveDATA on reboot.
We initiated the practice of always running 'save2flash' several times,
in order to flush the RAM data to the saveDATA.
#
While 'enhancing' the '/usr/sbin/save2flash' script, adding 'splash' ,
We introduced several repetitions of the SMP block.
[ sync ]
[ /usr/sbin/snapmergepuppy /initrd/pup_ro1 /initrd/pup_rw ]
#
We used GEANY for IDE , and Geany Execute for BASH terminal test/debug.
We observed the following 'non-fatal' error messages.
#
SMP generates 'non-fatal' error messages,
associated with line # 169, and # 171, "unary operator expected".
First run may have 25 messages.
Second run may have 5 messages.
Third run may have 1 messages.
#
We enhanced the current 'new' '/usr/sbin/save2flash' ,
... which used the 'nice' SMP block
[ sync ]
[ nice -n 19 snapmergepuppy ]
#
We observed the same 'problem'.
We managed this problem with the same repetition method.
#
Problem resolved.
******************

_________________
Puppy Linux is more fun than a barrel of M$ monkeys Razz
www.geocities.WS/glene77is
glene77is --- {^,^} --- electricity is shocking, Memphis, TN, USA.
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [10 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Taking the Puppy out for a walk » Suggestions
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.2106s ][ Queries: 12 (0.0349s) ][ GZIP on ]