SFS - How does it work?

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
prit1
Posts: 542
Joined: Fri 04 Jan 2008, 00:10
Location: Los Angeles

SFS - How does it work?

#1 Post by prit1 »

I have never created an SFS and hence the questions.

From what I read on puppylinux.com website, SFS is the top layer and any file in this layer will override (not physically) the same file in any other layer.

Based on the above understanding, I created an SFS and many files worked as expected. But the below 3 files did not.

1 - /root/.xinitrc - My version in the SFS was not used. Instead the already existing version was used.

2 - /root/Choices/ROX-Filer/PuppyPin - The wallpaper in the SFS version was picked up correctly. The SFS version had no icons on the desktop. But when the SFS was loaded, all the default icons appeared.

3 - /etc/windowmanager - I had changed this to icewm in the SFS. But even after loading the SFS, it continued to go to jwm. And this file was unchanged.

Can anyone explain what is going on? Or please correct me if my understanding is not right.

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#2 Post by MU »

files in the savefile (pup_save.2fs) always have a higher priority.
You can find them in /initrd/pup_rw/

There acctually is no way to workaround this, as this could break the users settings.
So to change those, you will have to write a script/dialog, that offers to overwrite them (creating backups maybe).

Concerning the Pinboard-icons:
this is done by Barrys approach, to add/remove icons to the desktop.
That script creates backups of puppypin, and restores them.
imho this approach is problematic, right because of the issues you have.

In Muppy I deactivated this I think, but don't remember, where.
I think it was /usr/sbin/fixpuppypin.

Another approach to add icons I posted here:
http://www.murga-linux.com/puppy/viewtopic.php?p=180206

This script could be run by a "sfs-observer" script.
That would check for a configfile in the SFS, and then add them to the pinboard using my script.
It would create a config-file, of what it added.
If the sfs would be removed, the icons from this configfile could be removed (if they were not used by another sfs/config either).

I'd like to write such a tool for Muppy, but had no time yet.
Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
prit1
Posts: 542
Joined: Fri 04 Jan 2008, 00:10
Location: Los Angeles

#3 Post by prit1 »

@MU:

Thanks for the quick reply.

I guess, I will just have to add a script that can be run after the SFS is loaded that can change the required files, lines.

Also thank you for the easy dir2sfs script. This is what I used to create the SFS.
[url=http://macpup.org][b]Macpup - The beauty of linux[/b][/url] [b] | [/b] [url=http://pritlog.com/][b]Pritlog - Simple blog app[/b][/url]

User avatar
prit1
Posts: 542
Joined: Fri 04 Jan 2008, 00:10
Location: Los Angeles

#4 Post by prit1 »

Here is another question. But about pet files.

Suppose I have /root/.xinitrc in a pet file - this would overwrite the existing .xinitrc file - right?

Also, what will happen when this pet is un-installed? Is there anyway to get back the original .xinitrc file?
[url=http://macpup.org][b]Macpup - The beauty of linux[/b][/url] [b] | [/b] [url=http://pritlog.com/][b]Pritlog - Simple blog app[/b][/url]

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#5 Post by MU »

>Suppose I have /root/.xinitrc in a pet file - this would overwrite the existing .xinitrc file - right?

yes.

>Also, what will happen when this pet is un-installed? Is there anyway to get back the original .xinitrc file?

No.
Also here,you had to add a script, that backups/restores.
I think pets can include a postinstall.sh file (or similar), that is executed after installation.
Here you could run such actions.
Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
prit1
Posts: 542
Joined: Fri 04 Jan 2008, 00:10
Location: Los Angeles

#6 Post by prit1 »

Thanks again Mark. I remember there is a Pinstall script that gets executed after the pet installation. But I dont know if there is a script that can be executed when the pet is being un-installed.
[url=http://macpup.org][b]Macpup - The beauty of linux[/b][/url] [b] | [/b] [url=http://pritlog.com/][b]Pritlog - Simple blog app[/b][/url]

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#7 Post by MU »

:D
This is an optional script that you would have to create yourself. Very few PET packages need this. Ditto for the post-uninstall script.
http://puppylinux.com/development/createpet.htm
Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

Post Reply