I have been working on this over the last week or so to make it more suitable for an official puppy release. Most of the changes are things that were accounted for but commented out in the code or things suggested in this thread. Apologies to jrb for duplicating some of his efforts.
Bug fixes
* fix unloading and unmounting loop devices if loading the sfs fails
* fix issue with symlinks to sfs files whose target don't exists
* fix issue where /dev/loop1n loop2n and loop3n were being excluded from selection
New features/changes
* testing for aufs before proceeding
* mounting sfs to /mnt/.sfs_file_name instead of /mnt/sfs_file_name
* provides better explanation of the 'cdrom warning'
* creating new loop devices as needed (must be supported by the kernel).
* support for post-install scripts.
* if no post install script is included in the sfs perform some default post-install actions.
Misc
* reorganised, optimised and cleaned up code.
* packaged as a dotpet with load_sfs moved to the more standard /usr/local/bin/ instead or /usr/sbin. rox openwith is included also.
* tested in puppy 4.12
TODO
* Determine if sfs file is located external storage media and warn user.
* restartwm without restarting xserver
Post-install (post-loading) scripts
The post-install scripts is a hidden file with the same name as the sfs, without extension. Eg if you have a sfs
Wine-1.1.14_412.sfs your post-install file would be
.Wine-1.1.14_412 and your directory structure for the sfs may look something
Code: Select all
Wine-1.1.14_412
|-- .Wine-1.1.14_412
|-- usr/
|-- root/
|-- etc/
If the post-install script is absent, load_sfs inspects the contents of the sfs and performs some post-install operations as needed. These include, making fonts, libraries and kernel modules accessible and running fixmenus. restartwm is also in the script but commented out since it also restarts xwindows.