Dmitry Morozhnikov wrote:
Hello, all.
Today i`m released fuseiso version 20051029, first version which support
zisofs, and thus ready to be used for klik purposes. Status: works for me. I
need help with testing it before any kind of public announcement.
Url: http://ubiz.ru/dm/fuseiso-20051029.tar.bz2
Related zAppRun can be found at http://ubiz.ru/dm/zAppRun
Bugs: it is currently too slow.
Please help for the glory of klik system! :-)
I've having some success with this and fusecram ...
Attached is an alternative patch to zAppRun I just wrote to the current
kanotix zAppRun ... it basically tries to use the fuse's but if they
fail to mount (or it can't see the wrapper in the mount) it just pops up
an error while continuing on to do things the normal way.
It removes the dependency on file again for detecting types of images
... why? Note below the iso images are not reported as such by file,
kanotix 0504 rc13 :-(
/isosrc/klik/nzb_0.1.2-1.cmg: Linux Compressed ROM
File System data, little endian size 14737408 version #2 sorted_dirs CRC
0xb63bd508, edition 0, 7764 blocks, 205 files
/isosrc/klik/ooo2-1.9.125-novell.cmg:
/isosrc/klik/ooo2_rc1.cmg:
May be useful to others?
Niall
--- /home/knoppix/.zAppRun.safe 2005-10-29 02:58:49.678365000 +0100
+++ /home/knoppix/.zAppRun 2005-10-29 04:16:15.292697750 +0100
@@ -111,14 +111,14 @@
esac
# determine which filesystem is used as .cmg
-file $CMG | grep ": data" >/dev/null && FS=squashfs # who knows a better way
to recognize it?
-file $CMG | grep "Compressed ROM" >/dev/null && FS=cramfs
-file $CMG | grep "ISO 9660" >/dev/null && FS=iso9660
+[ "$(head -c 4 $CMG)" = "sqsh" ] && FS="squashfs"
+[ "$(head -c 4 $CMG)" = "E=Í(" ] && FS="cramfs" && [ -n "$(which fusecram)" ]
&& FUSE="fusecram"
+[ "$(head -c 32774 $CMG | tail -c 5)" = "CD001" ] && FS="iso9660" && [ -n
"$(which fuseiso)" ] && FUSE="fuseiso"
if [ -n "$FS" ]
then
# Find the first available space in /mnt/app
- NUMBERS="7 6 5 4 3 2 1"
+ NUMBERS="7 6 5 4 3 2 1"
for NUMBER in $NUMBERS
do
[ -e "/mnt/app/$NUMBER" ] || MNTNUM=$NUMBER
@@ -163,29 +163,55 @@
mysu "$SUDESC" $SUCMD
fi
- (mkdir -p $MOUNT && ln -s $CMG $MOUNT/image) || (MNTAPP=fail && rmdir $MOUNT
>/dev/null 2>/dev/null)
- if [ -n "$MNTAPP" ]
+ if [ -n "$FUSE" ]
then
- derror "Klik was unable to make the neccessary changes in /mnt/app.
-Have you (as root) created /mnt/app and made it writable by all klik users?"
- exit 1
+ SAFEFUSE="$FUSE"
+ FUSEMNT="$HOME/fuse/$(basename $CMG)"
+ mkdir -p $FUSEMNT
+ $FUSE $CMG $FUSEMNT || FUSE=""
+derror "Hello, pause, $FUSE, $FUSEMNT"
+ if [ -n "$FUSE" ]
+ then
+ if [ -x "$FUSEMNT/wrapper" ]
+ then
+ MOUNT="$FUSEMNT"
+ else
+ FUSE=""
+ fusermount -u $FUSEMNT
+ fi
+ fi
+ if [ -z "$FUSE" ]
+ then
+ rmdir $FUSEMNT
+ derror "Sorry but your Fuse mount (by $SAFEFUSE) failed, falling back to
normal mounting" &
+ fi
fi
- if [ -n "$(cat /etc/fstab | grep app/7)" ]
+ if [ -z "$FUSE" ]
then
- mount $MOUNT || MOUNTSTAT="Unable to mount $MOUNT"
- else
- rm $MOUNT/image
- rmdir $MOUNT
- derror "Failed to make the changes to /etc/fstab, did you supply the
correct password?"
- exit 1
- fi
+ (mkdir -p $MOUNT && ln -s $CMG $MOUNT/image) || (MNTAPP=fail && rmdir
$MOUNT >/dev/null 2>/dev/null)
+ if [ -n "$MNTAPP" ]
+ then
+ derror "Klik was unable to make the neccessary changes in /mnt/app.
+Have you (as root) created /mnt/app and made it writable by all klik users?"
+ exit 1
+ fi
- if [ ! -x $MOUNT/wrapper ]
- then
- rm $MOUNT/image
- rmdir $MOUNT
- derror "You seem to be unable to mount .cmg images correctly.
+ if [ -n "$(cat /etc/fstab | grep app/7)" ]
+ then
+ mount $MOUNT || MOUNTSTAT="Unable to mount $MOUNT"
+ else
+ rm $MOUNT/image
+ rmdir $MOUNT
+ derror "Failed to make the changes to /etc/fstab, did you supply the
correct password?"
+ exit 1
+ fi
+
+ if [ ! -x $MOUNT/wrapper ]
+ then
+ rm $MOUNT/image
+ rmdir $MOUNT
+ derror "You seem to be unable to mount .cmg images correctly.
You can setup your /etc/fstab to allow users to mount .cmg images.
To prepare your fstab:
@@ -200,14 +226,15 @@
/mnt/app/6/image /mnt/app/6 cramfs,iso9660 user,noauto,ro,loop,exec 0 0
/mnt/app/7/image /mnt/app/7 cramfs,iso960 user,noauto,ro,loop,exec 0 0
#######################################################################"
+ exit 1
+ fi
+ fi
+ else
+ # NOTE: exit now cause our cmg isn't mounted
+ derror "$CMG does not appear to be either a squashfs, iso9660 or a cramfs
file"
exit 1
fi
-else
- # NOTE: exit now cause our cmg isn't mounted
- derror "$CMG does not appear to be either a squashfs, iso9660 or a cramfs
file"
- exit 1
-fi
-
+
#
# execute the wrapper
# the wrapper should take care to keep running until its app closes
@@ -225,8 +252,14 @@
# kill all child processes
kill $(pidof -x -o %PPID) 2>/dev/null
-
- # unmount and clean up
+
+
+# unmount and clean up
+if [ -n "$FUSE" ]
+then
+ fusermount -u $MOUNT
+ rmdir $MOUNT
+else
if [ -n "$(cat /etc/fstab | grep app/7)" ]
then
umount $MOUNT
@@ -235,4 +268,4 @@
fi
rm -f $MOUNT/cramfs
rm -r $MOUNT/
-
+fi
\ No newline at end of file
_______________________________________________
klik-devel mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/klik-devel