sfs_load-2.4 on-the-fly

Miscellaneous tools
Message
Author
User avatar
ASRI éducation
Posts: 3197
Joined: Sat 09 May 2009, 12:10
Location: France
Contact:

#331 Post by ASRI éducation »

Argolance wrote:
Suggestion: the button "Install SFS" [of filemount] should be labeled "Un/Install SFS" because user can uninstall/unload any SFS file this way too,
This is done for several months.
https://github.com/puppylinux-woof-CE/w ... 3a067b4c00
https://github.com/puppylinux-woof-CE/w ... a30efa84d1
Regards,
Projet ASRI éducation => [url=http://asri-education.org/]Association[/url] | [url=http://forum.asri-education.org/]Forum[/url] | [url=http://dl01.asri-education.org/]Dépôt[/url] | [url=http://kids.asri-education.org/]Espace kids[/url]

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#332 Post by Iguleder »

There's a bug in sfs_load - it should obtain the numeric kernel version using `uname -r | cut -f 1 -d \-`. Otherwise, it doesn't work at all with kernels that have an extra version string.
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]

User avatar
ASRI éducation
Posts: 3197
Joined: Sat 09 May 2009, 12:10
Location: France
Contact:

#333 Post by ASRI éducation »

Iguleder wrote:There's a bug in sfs_load - it should obtain the numeric kernel version using `uname -r | cut -f 1 -d \-`. Otherwise, it doesn't work at all with kernels that have an extra version string.
Yes, need to replace:
KERNVER="`uname -r`"
by
KERNVER="`uname -r | cut -f 1 -d \-`"

Thank you.
Projet ASRI éducation => [url=http://asri-education.org/]Association[/url] | [url=http://forum.asri-education.org/]Forum[/url] | [url=http://dl01.asri-education.org/]Dépôt[/url] | [url=http://kids.asri-education.org/]Espace kids[/url]

User avatar
ASRI éducation
Posts: 3197
Joined: Sat 09 May 2009, 12:10
Location: France
Contact:

#334 Post by ASRI éducation »

sfs_load-2.3.3

I incorporated:
- sfs_load-2.3 (by shinobar)
- sfs_load-2.3.0 (by ASRI)
- sfs_load-2.3.2 (by mavrothal)
- improve kernel detection KERNVER (by Iguleder)

Regards,
Attachments
sfs_load-2.3.3.jpg
(47.22 KiB) Downloaded 915 times
sfs_load-2.3.3.pet
(34.12 KiB) Downloaded 412 times
Last edited by ASRI éducation on Sun 04 Oct 2015, 19:14, edited 1 time in total.
Projet ASRI éducation => [url=http://asri-education.org/]Association[/url] | [url=http://forum.asri-education.org/]Forum[/url] | [url=http://dl01.asri-education.org/]Dépôt[/url] | [url=http://kids.asri-education.org/]Espace kids[/url]

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#335 Post by musher0 »

ASRI éducation wrote:sfs_load-2.3.3

This version is based on:
- sfs_load-2.3 (by shinobar)
- sfs_load-2.3.0 (by ASRI)
- sfs_load-2.3.2 (by mavrothal)
- improve kernel detection KERNVER (by Iguleder)

Regards,
Hello, ASRI.

Sorry, I have to translate to understand... "Based on", you mean
"incorporates", right?

Also, if you could kindly look over the translation I made for 01micko's
change-kernels script. It's in that thread.

I translated to "international French", but I'd like to have an European
editor go over it, to make double sure there are no "canadianisms". If
you can't, that's fine, I'll ask someone else.

Thanks.

musher0
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
ASRI éducation
Posts: 3197
Joined: Sat 09 May 2009, 12:10
Location: France
Contact:

#336 Post by ASRI éducation »

musher0 wrote:Sorry, I have to translate to understand... "Based on", you mean "incorporates", right?
That's it.
Thank you for pointing that out, I'll edit my previous message.
musher0 wrote:look over the translation I made for 01micko's
change-kernels script. It's in that thread
I just do it, everything seems ok.

Regards,
Projet ASRI éducation => [url=http://asri-education.org/]Association[/url] | [url=http://forum.asri-education.org/]Forum[/url] | [url=http://dl01.asri-education.org/]Dépôt[/url] | [url=http://kids.asri-education.org/]Espace kids[/url]

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

#337 Post by mavrothal »

As reported sfs_load in PUPMODE=5 fails to install as SFS saved in /tmp (ok when saved in other locations)
The problem is that the union (re)mount fails in this case. I think that this may be the expected behavior of aufs but it needs further investigation.
Till then the attached patch stops sfs_load from loading an SFS from /tmp or suggesting to copy it there when running in pupmode 5
The patch is against ASRI's 2.3.3 but should work in other versions too.

Code: Select all

--- a/usr/sbin/sfs_load	2015-10-04 15:25:30.000000000 +0300
+++ b/usr/sbin/sfs_load	2015-10-09 11:45:01.760463314 +0300
@@ -885,7 +885,7 @@
   local TOPPART="$1"
   # Offer RAM only if enough
   RAMPART=""
-  if [ "$FILEISAT" != "tmpfs" -a "$FILEISAT" != "ata" ]; then
+  if [ "$FILEISAT" != "tmpfs" -a "$FILEISAT" != "ata" -a "$PUPMODE" != "5" ]; then
    RAMPART=$(echo "RAM|($(gettext "Available"):$(kbyte2 $RFREE))"|tr ' ' '_')
    REST=$(($RFREE - $FILESIZE))
    if [ $REST -gt $RESERVRAM ]; then
@@ -1697,7 +1697,7 @@
       DIRNAME=$(dirname "$EXTRASFS")
       FILENAME=$(basename "$EXTRASFS")
       #if echo "$DIRNAME" | grep -qw '/tmp$' || [ "$(df "$DIRNAME" | tail -n 1 | cut -d ' ' -f1)" = "tmpfs" ]; then
-	  if [ "$(df "$DIRNAME" | tail -n 1 | cut -d ' ' -f1)" = "tmpfs" ]; then
+	  if [ "$(df "$DIRNAME" | tail -n 1 | cut -d ' ' -f1)" = "tmpfs" -a "$PUPMODE" != "5" ]; then
         rm -f "$EXTRASFS"
         RMLOG=$(printf "$(gettext "The temporary file '%s' is deleted.")" "$EXTRASFS")
         FOUND=""
@@ -1734,6 +1734,14 @@
 basename "$0" | grep -q '^un' && ACTION="unload"
 [ "$DISPLAY" != "" ] && GUI="y"
 basename "$0" | grep -q 'debug' && DEBUGFLAG="y"	# v1.3.9
+
+# Temp work around. Do not mount SFS from /tmp when running in pupmode 5
+. /etc/rc.d/PUPSTATE 
+if [ "$(echo $ORGOPT | cut -f2 -d/)" = "tmp" -a "$PUPMODE" = "5" ]; then
+  Xdialog --title "$(gettext 'Error')" --msgbox \
+   "$(gettext 'You can not install an SFS saved in the /tmp directory \nwhen running in PUPMODE=5')" 0 0
+ exit 0
+fi
 #v1.9.2: allow --skip-fixmenus with multiple files
  while [ "$1" ] ; do
   case "$1" in
Since the forum may add spaces at the end of the lines, it is also attached below.
Attachments
sfs_load.patch.gz
Patch to stop loading SFSs saved in /tmp when running in PUPMODE=5
(842 Bytes) Downloaded 337 times
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
ASRI éducation
Posts: 3197
Joined: Sat 09 May 2009, 12:10
Location: France
Contact:

#338 Post by ASRI éducation »

mavrothal wrote:sfs_load in PUPMODE=5 fails to install as SFS saved in /tmp (ok when saved in other locations)
Thank you for the patch (sfs_load.patch.gz).
Projet ASRI éducation => [url=http://asri-education.org/]Association[/url] | [url=http://forum.asri-education.org/]Forum[/url] | [url=http://dl01.asri-education.org/]Dépôt[/url] | [url=http://kids.asri-education.org/]Espace kids[/url]

jplt

#339 Post by jplt »

Is there a way to launch an sfs file with this :

Code: Select all

sfs_load -c -q xxx.sfs
And then have a box that say "The software is launching" and then launch the software ?

I want to do this because i found annoying to click on x box to launch an sfs file .

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

#340 Post by peebee »

jplt wrote:Is there a way to launch an sfs file with this :

Code: Select all

sfs_load -c -q xxx.sfs
And then have a box that say "The software is launching" and then launch the software ?

I want to do this because i found annoying to click on x box to launch an sfs file .
My script to load the wine sfs and then run irfanview called from a desktop file:

Code: Select all

#!/bin/sh 
# Purpose: To convert Linux-style filename to Windows-style 
# to pass as an argument to Irfanview within wine 

sfs_load -n -c wine.sfs

Filename=${1//\//\\} 
wine "C:\Program Files\IrfanView\i_view32.exe" "$Filename"

sleep 8
sfs_load -n -c -wine.sfs
sfs_load -n -c -wine.sfs &
You could add a yaf-splash message if you need one...
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

sfs_load-2.3.5

#341 Post by mavrothal »

Here is an updated version of sfs_load that is based on ASRI's version, plus the pupmod 5 patch abpve plus some code to warn if you try to unload the (new) fdrv sfs
Attachments
sfs_load-2.3.5.pet
(29.54 KiB) Downloaded 345 times
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
ASRI éducation
Posts: 3197
Joined: Sat 09 May 2009, 12:10
Location: France
Contact:

Re: sfs_load-2.3.5

#342 Post by ASRI éducation »

mavrothal wrote:Here is an updated version of sfs_load that is based on ASRI's version, plus the pupmod 5 patch abpve plus some code to warn if you try to unload the (new) fdrv sfs
Thank you mavrothal.
Projet ASRI éducation => [url=http://asri-education.org/]Association[/url] | [url=http://forum.asri-education.org/]Forum[/url] | [url=http://dl01.asri-education.org/]Dépôt[/url] | [url=http://kids.asri-education.org/]Espace kids[/url]

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

Re: sfs_load-2.3.5

#343 Post by shinobar »

mavrothal wrote:Here is an updated version of sfs_load that is based on ASRI's version, plus the pupmod 5 patch abpve plus some code to warn if you try to unload the (new) fdrv sfs
Thank you all for developing.

sfs_load-2.3.5.pet could not install on Puppy-571JP, but extracted and re-created package can be installed.

As for the "Total of mounted SFS", does not work in some case because the file /tmp/sfs_load/loop_device_list is not always created.
Next is my patch.

Code: Select all

# diff sfs_load235 sfs_load
773,780c773
< 		list="/tmp/sfs_load/loop_device_list"
< 		cntsfsloaded=0
< 		while read LINE
< 		do
< 			if [ "$LINE" != "" ]; then
< 				cntsfsloaded=`expr $cntsfsloaded + 1`
< 			fi
< 		done < "$list"
---
> 	cntsfsloaded=$(echo $LOADEDLIST|wc -w)
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

Re: sfs_load-2.3.5

#344 Post by mavrothal »

shinobar wrote:sfs_load-2.3.5.pet could not install on Puppy-571JP,
Ah, this is because in recent pups dir2pet defaults to xz compression that is problematic with older pups.
Here is 2.3.6 that includes your change above and is compressed with gzip. Should work fine in older pups too.

Maybe is time to stop this sublevel versions and you release a new minor version :wink:
Attachments
sfs_load-2.3.6.pet
(35.42 KiB) Downloaded 301 times
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

Re: sfs_load-2.3.6

#345 Post by shinobar »

mavrothal wrote:Here is 2.3.6
Thanks. But it fails unloading SFS. Next is my patch.

Code: Select all

# diff sfs_load236 sfs_load
2322c2322,2324
<     [ "$FILENAME" = "$DISTRO_FDRVSFS" ] && confirm --ok-cancel "$(gettext "'$FILENAME' contains additional firmware that maybe needed. Are you sure you want to remove it?")" || finish
---
>     if [ "$FILENAME" = "$DISTRO_FDRVSFS" ]; then
>       confirm --ok-cancel "$(gettext "'$FILENAME' contains additional firmware that maybe needed. Are you sure you want to remove it?")" || finish
>     fi
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
mavrothal
Posts: 3096
Joined: Mon 24 Aug 2009, 18:23

Re: sfs_load-2.3.6

#346 Post by mavrothal »

shinobar wrote:
mavrothal wrote:Here is 2.3.6
Thanks. But it fails unloading SFS. Next is my patch.

Code: Select all

# diff sfs_load236 sfs_load
2322c2322,2324
<     [ "$FILENAME" = "$DISTRO_FDRVSFS" ] && confirm --ok-cancel "$(gettext "'$FILENAME' contains additional firmware that maybe needed. Are you sure you want to remove it?")" || finish
---
>     if [ "$FILENAME" = "$DISTRO_FDRVSFS" ]; then
>       confirm --ok-cancel "$(gettext "'$FILENAME' contains additional firmware that maybe needed. Are you sure you want to remove it?")" || finish
>     fi
Strange.
I just tried it again in Slacko64 6.0.8.1 both pupmodes 5 and 12 and works OK to unload the fdrv both when you manually load it and when loads at boot with pfix=fw_drv.
But sure, proper if/then is better that a single test condition.

You may want to give it a couple more days of testing and then you release 2.4 :wink:
== [url=http://www.catb.org/esr/faqs/smart-questions.html]Here is how to solve your[/url] [url=https://www.chiark.greenend.org.uk/~sgtatham/bugs.html]Linux problems fast[/url] ==

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

sfs_load-2.3.7

#347 Post by shinobar »

#20151028 v2.3.7: Warning SFS in /tmp at pupmod 5 and unloading fdrv sfs (mavrothal), desktops under /usr/local (shinobar)
sfs_load-2.3.7.pet
Download: http://shino.pos.to/party/bridge.cgi?puppy/opt/

Please test and report.
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
ASRI éducation
Posts: 3197
Joined: Sat 09 May 2009, 12:10
Location: France
Contact:

Re: sfs_load-2.3.7

#348 Post by ASRI éducation »

shinobar wrote:#20151028 v2.3.7
Hello shinobar.
Glad to see that you are present.
sfs_load is a very important script. And we obviously need you to continue its development.
Regards,
Projet ASRI éducation => [url=http://asri-education.org/]Association[/url] | [url=http://forum.asri-education.org/]Forum[/url] | [url=http://dl01.asri-education.org/]Dépôt[/url] | [url=http://kids.asri-education.org/]Espace kids[/url]

User avatar
Hotdog
Posts: 134
Joined: Fri 30 Sep 2011, 03:15
Location: Georgia USA

#349 Post by Hotdog »

Gentlemen, the work that you are doing with this excellent utility is much appreciated. I have used Shinobar's SFS-load on-the-fly (v2.3.2) with never a glitch in Lucid 5.2.8 full install. My current installation is Lucid 5.2.8.7 (Super Lucid 004), also full install. To test the newer SFS-load on-the-fly, should I used the Puppy's "Remove builtin packages" utility to remove the current SFS-load on-the-fly first?
[i]Puppy 5.2.8.7, Full Install[/i]

User avatar
Hotdog
Posts: 134
Joined: Fri 30 Sep 2011, 03:15
Location: Georgia USA

#350 Post by Hotdog »

I'll answer my own question here for the benefit of anyone else who might need it. I first used Gnewpet (from http://murga-linux.com/puppy/viewtopic.php?t=75437 ) to make a .pet file of the builtin package so it could be reinstalled if desired. Then it was Menu -> Setup -> Remove builtin packages -> SFS_load to take out the 2.3.2 version. And, then install the 2.3.7 version.

I had used the original SFS-load on-the-fly to load the gThumb image viewer. After loading, gThumb works as expected but neither SFS-load on-the-fly nor the package manager lists gThumb. I wanted to see if the newer SFS-load on-the-fly might detect the gThumb SFS but it does not. However, running SFS-load on-the-fly from the command line like:

Code: Select all

sfs_load -LP2_GThumb-2.11.2.1.sfs
does remove gThumb properly. The menu entry was cleared with "fixmenus".
[i]Puppy 5.2.8.7, Full Install[/i]

Post Reply