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 Mon 22 Oct 2018, 19:09
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
sfs_load-2.4 on-the-fly
Post new topic   Reply to topic View previous topic :: View next topic
Page 22 of 25 [372 Posts]   Goto page: Previous 1, 2, 3, ..., 20, 21, 22, 23, 24, 25 Next
Author Message
shinobar


Joined: 28 May 2009
Posts: 2666
Location: Japan

PostPosted: Fri 17 Apr 2015, 18:38    Post subject: Re: sfs_load-2.3.2 on pupmode=13  

tnx mavrothal.
i am using sfs_load-2.3.2 on PUPMODE=13 and working with no problem so far.

_________________
Downloads for Puppy Linux http://shino.pos.to/linux/downloads.html
Back to top
View user's profile Send private message Visit poster's website 
mavrothal


Joined: 24 Aug 2009
Posts: 2981

PostPosted: Sat 18 Apr 2015, 01:40    Post subject:  

Thx
Any ideas how to adapt it for pupmode 2?
It should be possible as aufs is there just the same.
Is it worth trying to integrate it with the current or maybe write a new script and have it called from sfs_load?
Best

_________________
== Here is how to solve your Linux problems fast ==
Back to top
View user's profile Send private message 
Argolance


Joined: 06 Jan 2008
Posts: 3416
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Fri 05 Jun 2015, 05:58    Post subject:  

Bonjour,
Arrow Please take a look around this thread...

sfs_load (2.3.2) seems to generate a (wrong) path starting with '/initrd/initrd/' (pupmode 5)

Cordialement.

_________________

Back to top
View user's profile Send private message Visit poster's website 
mavrothal


Joined: 24 Aug 2009
Posts: 2981

PostPosted: Fri 05 Jun 2015, 06:35    Post subject:  

Argolance wrote:
Bonjour,
Arrow Please take a look around this thread...

sfs_load (2.3.2) seems to generate a (wrong) path starting with '/initrd/initrd/' (pupmode 5)

Cordialement.


I did

_________________
== Here is how to solve your Linux problems fast ==
Back to top
View user's profile Send private message 
ASRI éducation


Joined: 09 May 2009
Posts: 3203
Location: France

PostPosted: Wed 08 Jul 2015, 11:14    Post subject:  

sfs_load-2.3.0.pet

I used the latest version of shinobar 'sfs_load-2.3.pet (2014-09-06)'.
I have not integrated the mavrothal changes (v2.3.1/2.3.2) because testing is not finished.

Proposed changes for /usr/sbin/sfs_load
#20150706 v2.3.0 by ASRI: Increase the size of main GUI # Add info "number of sfs mounted" # For the list of mounted sfs, use a "table" (instead of "list") to sort the list alphabetically # Add button refresh

Regards

Code:
--- ./sfs_load_2.3   2014-09-06 10:44:34.000000000 +0200
+++ ./sfs_load_2.3.0   2015-07-07 16:06:31.000000000 +0200
@@ -51,9 +51,10 @@
 #v2.1.9: fix loop device conflict with irregular initramfs
 #2014-08-10 v2.2: fix was removed all sfs after abnormal shutdown
 #2014-09-06 v2.3: fix again save-to-directry, avoid always mounted puppy sfs partition under PUPMODE=5 
+#20150706 v2.3.0 by ASRI: Increase the size of main GUI # Add info "number of sfs mounted" # For the list of mounted sfs, use of a "table" (instead of "list") to sort the list alphabetically # Add button refresh
 MYPATH=$0
 MYNAME=$(basename "$0")
-VERSION=2.3
+VERSION=2.3.0
 ORGOPT="$@"
 #some options the puplet builder can choose
 WIPEWHITEONINIT="true"   # true/false
@@ -761,7 +762,18 @@
 }
 main_dialog() {
    waitsplash $(gettext "Probing...")
-   BOXHEIGHT=150
+   BOXHEIGHT1=300
+   BOXWIDTH=650
+   TEXTWIDTH=580
+   TEXTWIDTHCHARS=30
+      list="/tmp/sfs_load/loop_device_list"
+      cntsfsloaded=0
+      while read LINE
+      do
+         if [ "$LINE" != "" ]; then
+            cntsfsloaded=`expr $cntsfsloaded + 1`
+         fi
+      done < "$list"
    LOADVISIBLE="enabled"
    UNLOADVISIBLE="eabled"
    if [ "$ACTION" = "unload" ]; then
@@ -793,8 +805,9 @@
    UNLOADCOMBO=""
    if [ "$ALREADY_SFS_LIST" != "" ]; then
      UNLOADABLE="enabled"
-     UNLOADCOMBO='<list tooltip-text="'$(gettext "Select the sfs file you want to unload.")'">
-     <variable>UNLOADSFS</variable>'$(make_combo $ALREADY_SFS_LIST)'<visible>'$UNLOADVISIBLE'</visible></list>'
+     UNLOADCOMBO='<table tooltip-text="'$(gettext "Select the sfs file you want to unload.")'">
+     <label>'$(gettext 'Total of mounted SFS =')' '$cntsfsloaded'</label>
+     <variable>UNLOADSFS</variable>'$(make_combo $ALREADY_SFS_LIST)'<visible>'$UNLOADVISIBLE'</visible></table>'
      [ "$QUEUELIST" ] && UNLOADCOMBO="$UNLOADCOMBO
      "'<text><input>echo -en "'$(gettext "Some are not loaded but in the queue.")'"</input></text>'
    else
@@ -804,10 +817,10 @@
    DIALOG='<window title="'$LONG_TITLE'"><vbox>
     <hbox>
     <pixmap><input file>'$MYICON'</input></pixmap>
-   <text width-chars="40"><input>echo -en "'$(gettext "You can load or unload extra SFS files on-the-fly.")'"</input></text>
+   <text width-chars="'$TEXTWIDTHCHARS'" width-request="'$TEXTWIDTH'"><input>echo -en "'$(gettext "You can load or unload extra SFS files on-the-fly.")'"</input></text>
    </hbox>
-   <hbox><frame '$(gettext "Load SFS")'>
-   <vbox height-request="'$BOXHEIGHT'">
+   <hbox width-request="'$BOXWIDTH'"><frame '$(gettext "Load SFS")'>
+   <vbox height-request="'$BOXHEIGHT1'">
    '"$LOADCOMBO
    $WRONGTEXT"'
    </vbox>
@@ -816,7 +829,7 @@
    <action>EXIT:Load</action><visible>'$LOADVISIBLE'</visible></button>
    </frame>
    <frame '$(gettext "Unload SFS")'>
-   <vbox height-request="'$BOXHEIGHT'">
+   <vbox height-request="'$BOXHEIGHT1'">
    '$UNLOADCOMBO'
     </vbox>
      <button tooltip-text="'$(gettext "Which SFS do you want to unload?")' '$(gettext "Click here after you choose the extra sfs file.")'">
@@ -825,7 +838,8 @@
 
     </frame></hbox>
     <hbox>
-     <button><label>'$(gettext 'Quit')'</label><input file stock="gtk-quit"></input><action>EXIT:Abort</action></button>
+     <button tooltip-text="'$(gettext "Refresh list of loaded sfs.")'"><input file stock="gtk-refresh"></input><action>sfs_load &</action><action>EXIT:Abort</action></button>
+     <button tooltip-text="'$(eval_gettext "Quit $TITLE v$VERSION.")'"><input file stock="gtk-quit"></input><action>EXIT:Abort</action></button>
     </hbox>
    </vbox></window>'
    waitsplash --stop
sfs_load-2.3.0.pet
Description  md5 ac2aaf2b4d6831f6923dd70ba39d9f31
pet

 Download 
Filename  sfs_load-2.3.0.pet 
Filesize  33.94 KB 
Downloaded  290 Time(s) 
sfs_load-2.3.0.jpg
 Description   
 Filesize   48.7 KB
 Viewed   821 Time(s)

sfs_load-2.3.0.jpg


_________________
Projet ASRI éducation => Association | Forum | Dépôt | Espace kids
Back to top
View user's profile Send private message Visit poster's website 
Argolance


Joined: 06 Jan 2008
Posts: 3416
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Fri 21 Aug 2015, 10:12    Post subject:  

Bonjour,
When trying to load an SFS file that is different but has the same name of an already loaded SFS file, SFS_load says this SFS is already loaded and asks user if he wants to unload it.
If user wants to load the new one and then to copy or to move it to /initrd/mnt/dev_save, SFS_load just says SFS file "was found" but does not allow user to choose if he wants to keep the old one or to overwrite it with the new one.
Is it silly or could the script be modified beneficially in this way? I tried to test/do this myself but am a bit afraid to break something so much the script is complicated for me Embarassed .

Cordialement.

_________________

Back to top
View user's profile Send private message Visit poster's website 
musher0

Joined: 04 Jan 2009
Posts: 12843
Location: Gatineau (Qc), Canada

PostPosted: Fri 21 Aug 2015, 11:11    Post subject:  

Bonjour Argolance.

It could be a simple matter of adding a check in the script for size and/or date of the
sfs file.

But I think it is Linux itself (and maybe all OS's) that cannot handle two files of the same
name at the same time. This is a good way to confuse the system, let alone sfs-load.
First trick explained in The Hacker's Book, I think.

A question, though: if you're using sfs-load and you get that message, does that means
that you have already and gleefully squished the existing sfs by the same name? Smile

This situation happens every second month with java JRE for example :
someone does a new sfs for the new java JRE, we unload the old one and we load
the new one. Simple. But of course the javas don't have the same version number.

À plus tard.

musher0

_________________
musher0
~~~~~~~~~~
Fidèle elle commença, ainsi elle restera. (Prov. canadien) /
Faithful she began, so will she stay. (Canadian prov.)
Back to top
View user's profile Send private message 
Argolance


Joined: 06 Jan 2008
Posts: 3416
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Fri 21 Aug 2015, 12:08    Post subject:  

Bonjour,
Thanks for replying, dear musher0 Wink
musher0 wrote:
cannot handle two files of the same name at the same time.

I obviously do not intend to let user load two sfs files with the same name at the same time (for that strange purpose - probably useless - it is enough to name both differently), just replace the "old" one by the "new" one, which should be loaded at next startup. When SFS file is already present in /initrd/mnt/dev_save, SFS_load doesn't replace the old one with the new one, it just says that SFS file "was found" but keeps the old one that will be loaded at next startup anyway. If user chooses not to copy/move the SFS file to /initrd/mnt/dev_save, so there is no problem because the SFS file is directly loaded from the Downloads directory and the new one will be loaded at next startup. If it could be possible with moved/copied SFS files, using a dialog box prompting user if he wants or not do the overwriting, I think it would be convenient.

Cordialement.

_________________

Back to top
View user's profile Send private message Visit poster's website 
musher0

Joined: 04 Jan 2009
Posts: 12843
Location: Gatineau (Qc), Canada

PostPosted: Fri 21 Aug 2015, 14:08    Post subject:  

Hello again, Argolance.

Je crois que ç'a à voir avec les couches / I think it has to do with the layers.
and you can't change an active layer mounted at /initrd/pup_ro-something without
un-mounting it first.

This layer is active, so removing it while it is active would be like cutting the branch
you are sitting on. The system will not let you do it.

On the other hand,
Code:
more /initrd/tmp/EXTRASFSS

will tell you which sfs's are loaded at the moment in your Puppy, therefore which sfs
you must unload before mounting the new sfs.

From that list, it should be possible to write a script to
    -- compare the names of the sfs's
    -- unmount the old sfs and
    -- mount the new one directly --

carefully, possibly bypassing sfs_load entirely.
(Not sure about this "bypassing").

Just a thought. / Une idée comme ça.
It needs testing, validation, of course -- and probably multiple checks in the script
in order not to "break" your system.

Autrement tu te retrouveras le bec à l'eau. / Otherwise you'll be left high and dry.

À+

musher0

_________________
musher0
~~~~~~~~~~
Fidèle elle commença, ainsi elle restera. (Prov. canadien) /
Faithful she began, so will she stay. (Canadian prov.)
Back to top
View user's profile Send private message 
Argolance


Joined: 06 Jan 2008
Posts: 3416
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Fri 21 Aug 2015, 17:48    Post subject:  

[EDIT]
Bonsoir,
Thank you musher0.
Quote:
This layer is active, so removing it while it is active would be like cutting the branch you are sitting on. The system will not let you do it.

Question May be I am wrong, but you can delete a mounted SFS file and you will see that it will work properly during all the session because, as layer, it is not affected. The only difference is that it will not be mounted at next startup (with all the troubles this implies). Now, if you delete any file of the mounted SFS file with your file manager, Puppy will remember this and deleted files will not be present at next startup though the (new or old) SFS is duly mounted. Deletion affects the layer but not the SFS file itself (which is read-only anyway) and what could happen to the SFS file seems to be none of its business all long the session.
Quote:
Autrement tu te retrouveras le bec à l'eau.

Not sure: I really think replacing an SFS with another one is possible while it is currently mounted (it is what my little experiment tends to "prove": I did it manually with my devx file and even with my main ToOpPy sfs file during all my tests and at next startup, as far as I know, all works fine). So, I admit I would like to have (also) the opinion of another "leading light" of the forum and learn, if "feasible", how to modify the SFS_load script properly, using some added command lines inside and with all the required precautions!

To sum up: I download a SFS file that has the same name as a SFS file present (loaded/mounted or not) in /initrd/mnt/dev_save. If I try to install/load the new SFS, 2 cases:
    - if already mounted, SFS_load asks me if I want to unload it. So, I unload it, then I click the new one, choose "Install SFS", SFS_load says he found it, then doesn't load the new one but reload the old one.
    - if not loaded/mounted, SFS_load says he found it and so on... Sad
I just would like the old one to be replaced by the new one and not to have to do it manually..

Suggestion: the button "Install SFS" should be labeled "Un/Install SFS" because user can uninstall/unload any SFS file this way too.

Cordialement.

_________________


Last edited by Argolance on Sun 23 Aug 2015, 05:34; edited 5 times in total
Back to top
View user's profile Send private message Visit poster's website 
musher0

Joined: 04 Jan 2009
Posts: 12843
Location: Gatineau (Qc), Canada

PostPosted: Sat 22 Aug 2015, 03:01    Post subject:  

Hello Argolance.

Moi, a "leading light" among Puppyists?! Wow, that really is flattery! You must have a
favor to ask me! Wink Very Happy

I find you courageous to change the devx file "in vivo". I know that I wouldn't risk it! Smile
If it works, bravo!

I did follow your reasoning, and I think it makes sense, but I am more conservative
than you are, so I'll stick with the traditional procedure for changing sfs's.

However, this may be of interest to you:

I remember that on another thread (mais lequel dans le capharnaüm du forum ! / but
which one in this mess of a forum! ) mikeb (I think) had found a way to change
pupsaves without exiting the Puppy. I guess that what you are seeking is along those
lines. If he could do it with a pupsave, why not with a regular sfs?

The trick, if I remember correctly, was to be in the main puppy sfs (probably in urxvt)
when doing the change. He had various pupsaves in the form of pup_rw directories
neatly stored on /mnt/home. He would erase the current /initrd/pup_rw and copy another
one in its place. And vroom, he had another flavor of the Puppy at his fingertips.

I don't know if this helps, but there you have it!

Bye for now / À+

musher0

_________________
musher0
~~~~~~~~~~
Fidèle elle commença, ainsi elle restera. (Prov. canadien) /
Faithful she began, so will she stay. (Canadian prov.)
Back to top
View user's profile Send private message 
Argolance


Joined: 06 Jan 2008
Posts: 3416
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Sat 22 Aug 2015, 06:26    Post subject:  

Quote:
I find you courageous to change the devx file "in vivo". I know that I wouldn't risk it! Smile
If it works, bravo!

Je n'y suis pour rien: tout le mérite en revient à Puppy et son génial système de fichiers à couches! Wink
I updated my post above to make my question more understandable.

No answer: silly/untoward question? Rolling Eyes

Cordialement.

_________________

Back to top
View user's profile Send private message Visit poster's website 
Argolance


Joined: 06 Jan 2008
Posts: 3416
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Sat 22 Aug 2015, 14:05    Post subject:  

Hello,
Quote:
No answer: silly/untoward question?

Crying or Very sad
Note: the suggestion above is about filemount and has nothing to do here with SFS_load.

Cordialement.

_________________

Back to top
View user's profile Send private message Visit poster's website 
musher0

Joined: 04 Jan 2009
Posts: 12843
Location: Gatineau (Qc), Canada

PostPosted: Sat 22 Aug 2015, 19:15    Post subject:  

Ahem. That statement is illogical: the file system in the sfs file has to be mounted to
be of any benefit to the user.

Without filemount, no sfs. Oh, the sfs will exist, but as I said, it won't be of any benefit.

_________________
musher0
~~~~~~~~~~
Fidèle elle commença, ainsi elle restera. (Prov. canadien) /
Faithful she began, so will she stay. (Canadian prov.)
Back to top
View user's profile Send private message 
Argolance


Joined: 06 Jan 2008
Posts: 3416
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Sun 23 Aug 2015, 05:33    Post subject:  

Quote:
Suggestion: the button "Install SFS" [of filemount] should be labeled "Un/Install SFS" because user can uninstall/unload any SFS file this way too,

_________________

Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 22 of 25 [372 Posts]   Goto page: Previous 1, 2, 3, ..., 20, 21, 22, 23, 24, 25 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
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.1041s ][ Queries: 12 (0.0410s) ][ GZIP on ]