sfs_load-2.4 on-the-fly

Miscellaneous tools
Post Reply
Message
Author
amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#121 Post by amigo »

When you open a terminal it will be running whatever shell your default is set to. If you then start another shell, it will remain running until you type 'exit' whiuch returns you to the original shell.

There can be a great difference between /bin/sh and /bin/bash -even if /bin/sh is a link to /bin/bash. Running bash called as /bin/sh yupports *some* bash extennsions which are not supported by 'real' sh. if /bin/sh is really ash, or dash, or busybox ash/lash/hash/mash, then expect even more differences. None of the above are really 'sh' as it was in the old days -ash and dash support more features and any of the busybox versions will most likely support less. busybox ash is not the same as ash.

The point is, for consistency, you need to use the shebang for the exact shell which supports the code you are writing. If you use '#!/bin/sh' as the shebang, don't assume that /bin/sh will be bash and act like bash-as-sh. if you really want to use /bin/sh, then you'll have to check all of your syntay to make sure it works with whatever /bin/sh really is. Once again, if you call bash as 'bash' it will (obviously) support all the bash features which were compiled into it. But, if you run bash as 'sh', it will only support a small sub-set of the bash extensions.

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

Load and go

#122 Post by shinobar »

mhanifpriatama wrote:Just report. I try in my lucid puppy 520, fresh frugal install. And run.
I would be very happy if can click once, then run the program directly.
Like at http://portablelinuxapps.org
If the sfs is properly prepaired, you can right-click the sfs and select 'sfs_load'. After loading succeed, the launcher offers to run the program.
Try the gimp sfs for an example.
http://www.murga-linux.com/puppy/viewtopic.php?t=61584
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#123 Post by 01micko »

Hi shino (good to see you are ok :) )

What about an adjustment to the run action for an sfs.. depending upon sfs_load's existence?

/root/Choices/MIME-types/application_x-squashfs-image

Code: Select all

#! /bin/sh
. /etc/rc.d/BOOTCONFIG
FILE="`basename $1`"
IN_USE=`echo $LASTUNIONRECORD|grep "$FILE"`
[ "$IN_USE" != "" ]&& xmessage -bg orange -c -timeout 5 "$FILE 
is already in use by Puppy" && exit
MOUNTED=`mount|grep "$FILE"`
[ "$MOUNTED" != "" ]&& exec filemnt "$1"
if [ -x /usr/sbin/sfs_load ];then 
 xmessage -bg green -c -buttons "View only:10,Load to Use:11,Exit:12" "Would you like to mount 
 $FILE
 for viewing read only or 
 mount for use with sfs_load?"
 case "$?" in
 10) exec filemnt "$1" ;;
 11) sfs_load "$1" ;;
 12) exit ;;
 esac
 else
 exec filemnt "$1"
fi
Of course you could use Xdialog or gtkdialog if you wish.

Cheers

EDIT: On further thought, if this were to be an approach, then really /usr/sbin/filemnt should get the rewrite.
Puppy Linux Blog - contact me for access

User avatar
lithpr
Posts: 86
Joined: Thu 10 Mar 2011, 06:33

very cool!

#124 Post by lithpr »

This is fantastic. works flawless under 2.5.4, as far as i can tell. Thank you!

Lithpr

mhanifpriatama
Posts: 60
Joined: Sat 22 Jan 2011, 07:50

#125 Post by mhanifpriatama »

Shinobar :
If the sfs is properly prepaired,
Ohh, what is that? I don't know that.
Sorry.
All of sfs files must properly prepaired?

I'm fall-in-love to fresh frugal install and remastering.
Maybe we can create a standard of sfs file? Or, create a new file type, that similar to portable applications?
I use portable things (some worked, some didn't), but there're a lot of pet's packages that can convert to sfs easily.
Do not mind me, if being too demanding.

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

sfs_load-1.0

#126 Post by shinobar »

15 Mar 2011: sfs_load-1.0: again PUPMODE=5/6/77
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

stu90

#127 Post by stu90 »

Hi shinobar,
Terrible events over in your part of the world hope you, your family and friends are ok?

Thanks for update - will test 1.0 after dinner.

Also had this message? when testing an .sfs on 0.9

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

Failed to unload

#128 Post by shinobar »

Fortunately my area and my family is safe. Thank you stu90.
stu90 wrote:Also had this message? when testing an .sfs on 0.9
It is normal. Unloading does not always succeed. You sometime need to reboot PC.
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

#129 Post by mavrothal »

v1.0 works fine in pupmode=6 on my end again. v1.0 indeed :D
One thing though that all sfs_load pets have (from v0.3 onwards that I used) is that have wrong folder permissions (777) for most folders and files. specifically

Code: Select all

drwxrwxrwx 3 root root 4096 2011-01-28 18:01 root
drwxrwxrwx 4 root root 4096 2011-01-28 17:55 usr
drwxrwxrwx 2 root root 4096 2011-02-23 16:30 sbin
drwxrwxrwx 6 root root 4096 2011-02-03 19:42 share
-rwxrwxrwx 1 root root 65941 2011-03-15 20:00 sfs_load
drwxrwxrwx 2 root root 4096 2011-01-28 17:56 applications
drwxrwxrwx 3 root root 4096 2011-01-29 17:17 doc
drwxrwxrwx 2 root root 4096 2011-01-30 15:36 pixmaps
-rwxrwxrwx 1 root root 201 2011-01-30 15:37 SFS-Load.desktop
drwxrwxrwx 3 root root 4096 2011-01-28 17:54 nls
drwxrwxrwx 2 root root 4096 2011-03-15 20:05 sfs_load
-rwxrwxrwx 1 root root 605 2011-02-01 13:04 squashfs-image.png
So after installing the pet your filesystem permissions are a bit messed up.
Puppy does run as root but we do not need to go that far :P
== [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-1.1

#130 Post by shinobar »

small bugfixes:
# 17 Mar 2011 v1.1: load/unload under PUPMODE=5, launcher
Thanks mavrothal. The permissions are fixed.
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

gcmartin

Re: finding whiteout

#131 Post by gcmartin »

Q5sys wrote:
Shep wrote:
Q5sys wrote:Um... I'm not understanding the reason ...
What benefits are there to ...
I think this would be a matter of programmer/scripter preference. I, on several, occasions in the past have wanted to do this same thing (which I have done many times in *.bat executables in Microsoft).

A benefit is that I can "fire" off a parallel task while my mainline task continues, separately. Or, I may want to post in a secondary window some result(s) that I would NOT want in my main window. These are just 2 examples of benefit that I can think of.

Hope this helps

gcmartin

64bit use

#132 Post by gcmartin »

Shinobar, I have not tried it, but should I expect "sfs_load-1.1 on-the-fly" to work in FATDOG?
Edited: Can think of any reason why this would NOT work on 64bit FATDOG?

Thanks in advance

User avatar
`f00
Posts: 807
Joined: Thu 06 Nov 2008, 19:13
Location: the Western Reserve

#133 Post by `f00 »

Might only be me and my trifling, but sfs_load-1.1 has some issues in macpup520 (and perhaps mp511 as well, but that one is a ram issue with too much junk in the savefiles, add a measly ~60mb of sfses and RAMFULL for that liveCDmulti :shrug: ). Now, it did work in w511,NOP (both Xvesa and Xorg in different usb savefiles), but unfortunately the savefiles corrupted .. possibly due to my trying to bypass NOP's somewhat odd shutdown ui (seriously don't care for that ui at all but I thought I was okay with Exit to Prompt->reboot .. apparently not but that's for savefile-config thread detailing).

Anyhow, a camera-pic (image-link @647k) of mp520 on reboot/fail for what it's worth - maybe a conflict between etc/init.d/sfs_load and bootmanager? As noted on pic, the sfses did not load on-the-fly and I thought it a bit unusual to have to specify to bootmanager to load what I'd imagined already loaded by sfs_load. Perhaps an unload of the sfses in sfs_load and then a load of them via bootmanager? Have to bonk the last savedir but just odd that bootmanager and sfs_load in mp520 have that 'failure to communicate' as it were. Oh well, it is lupu-based so :| (sure is tiresome having them fail or mess up on no apparent schedule with liveCDmulti or CDboot+usbsave, though) but that's ok since sfs_load works like a charm on my old w020 (liveCDmulti with a 'lucky 13' savedirs and still going strong :lol: )

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#134 Post by sc0ttman »

Firstly, sorry I have not read the whole thread..

But, did you incorporate a function similar to the 'pinstall.sh' function that we have with PET files? Because when loading certain SFS files, they require extra work, as the pinstall is not normally executed...

As I see it, seaside, you and goingnuts have all made good SFS work...

It would be great to see all 3 of you incorporate the execution of any "pinstall.sh" scripts found in the root of the SFS when it is loaded on the fly.. Then the pinstall could be optionally removed - unless that causes some problems.

I think this may be a good idea, as more OTF SFS loading will catch on, I am sure of it... Also many SFS files were convereted for PET files originally... The vbox SFS around, for example...

I have posted this to seaside, on the SFS-Exec thread as well, hope people dont mind
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

HiDeHo
Posts: 311
Joined: Wed 16 Mar 2011, 09:57

#135 Post by HiDeHo »

Hi does this work in the latest puplets lupu series, wary, and quirky. also does it allow more sfs files to be added to the os as the default bootmanager can only load 6 sometiems i want more.

lighthouse pup can losd 40 and it also has sfs combiner installed both in teh base

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#136 Post by sc0ttman »

1.1 does not work for me in puppy 4.2, it fails at line 1180, cos the $PUPSFS variable seems not to be set correctly.. I think it is empty.
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#137 Post by 8-bit »

I have been using sfs_load-0.1 in Puppy Lucid 520 and I have noticed that my selections to load are ignored on a reboot.
Some load, but others do not.
Since I have 1.22gig free in my pupsave, should this be happening?
Also, do I have to unload all my SFS selections before updating to version 1.1?

Inquiring minds want to know.

I am back with news, I uninstalled the older version of sfs_load-0.1 and installed the latest.
All of my selected SFS files loaded except one.
It was reported as being in the que, but not loaded.
Evidently, my 3 gigs of memory is not enough to load it since I also have a LOT of PETs installed taking up memory.
What brought me to this point was the fact that my kernel source and devx SFS fiiles were in my load list, but devx, although all the files for it appeared in the tree was failing to respond to "make" and "gcc".
Now at least if I see some SFS is shown as being in the que, but not loaded, I know I just did not have room for it along with the other SFS files that were loaded.

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

sfs_load-1.1.1.pet

#138 Post by shinobar »

Updated sfs_load-1.1.1.pet. Get from the top of this topic.
22 Sep 2011 v1.1.1: free(busybox) version compatible

If you are using v1.1 with no problem, you need not upgrade to v1.1.1.
The version 1.1.1 is a fix for incompatible busybox on some pupplets.
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#139 Post by 01micko »

shino, thanks for the update mate :)

I have been using 1.1 for awhile in slacko very successfully.

1.1.1 is going straight in.

<ot>Just to draw your attention, some stuff as you know is updated in gtkdialog. Slacko is going with the cutting edge version (for better or worse :lol: ), but I will let you know there is syntax that should be corrected for some icons in some of your apps. (does not affect sfs_load, I think grub4dos-config it does)
Ref:<-- http://www.murga-linux.com/puppy/viewto ... 753#558753
</ot>
[edit, actually it's only an "input file stock" error for gtkdialog-info]

Sorry about OT!

Cheers Mick :)
Puppy Linux Blog - contact me for access

mories
Posts: 70
Joined: Mon 21 Dec 2009, 12:51

sfs_load start

#140 Post by mories »

shinobar wrote:
I cannot understand what is the problem.
At boot, 'sfs_load start' is excuted and it may search unloaded sfs in case some is registered but not loaded. Otherwise sfs_load does nothing.
'sfs_load start' at the function mountpart() mount the partition and set UNMOUNTME
.....
UNMOUNTME=""
mount $OPT /dev/$PART /mnt/$MPART || return
UNMOUNTME=/dev/$PART
MNTPNT=/mnt/$MPART

but do not unmount the partition after.
I work in PUPMODE=5

Post Reply