[SOLVED]lzm2xzm problem

Post here if you are a new Porteus member and you're looking for some help.
Post Reply
Black ninja
Black ninja
Posts: 62
Joined: 18 Jan 2011, 15:51
Location: internet

[SOLVED]lzm2xzm problem

Post#1 by feng » 04 Jun 2011, 16:38

i create a directory /porteus/crashman_lzm
where i collette .lzm files created by crashman

and then, i tried to run the command lzm2xzm to covert the files

things happened, the script dead since the directory contain of "lzm"

Code: Select all

bash-4.1# lzm2xzm flash_player_10_2.lzm
Parallel unsquashfs: Using 1 processor
1 inodes (47 blocks) to write

[================================================================\] 47/47 100%
created 1 files
created 5 directories
created 0 symlinks
created 0 devices
created 0 fifos
Could not create destination file: No such file or directory
error building compressed image

this is the list of converted modules...


the command lzm2xzm worked fine after i rename the directory
from "crashman_lzm" to "crashman".
Last edited by feng on 05 Jun 2011, 14:02, edited 1 time in total.

Full of knowledge
Full of knowledge
Posts: 1872
Joined: 02 Jan 2011, 11:33
Location: italy

Re: lzm2xzm problem

Post#2 by beny » 04 Jun 2011, 18:03

wrong syntax feng, you can write lzm2xzm flash_player_10_2.lzm flash_player_10_2.xzm and i think that work

User avatar
Moderator Team
Moderator Team
Posts: 5619
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland

Re: lzm2xzm problem

Post#3 by fanthom » 05 Jun 2011, 07:29

i have replaced 'sed' with 'cut' and now is ok.

Code: Select all

# script by fanthom

# Switch to root
if [ "$DISPLAY" ]; then
   if [ `whoami` != "root" ]; then
      xterm -T "Please enter root's password below" -e su -c "/opt/porteus-scripts/lzm2xzm $1"
   if [ `whoami` != "root" ]; then
      echo "Please enter root's password below"
      su -c "/opt/porteus-scripts/lzm2xzm $1"

# Variables
e=`tput sgr0`

# Let's start
if [ "$1" = "" ]; then
echo && echo -e "${r}need a lzm module or folder containing lzm's as an argument

$0 /mnt/sda2/porteus_modules
$0 /root/module.sq4.lzm
$0 /root/module.lzm"$e

if [ -d "$1" ]; then cd $1; fi

for x in `ls $1 | grep .lzm`; do
    path=`readlink -f $x`
    name=`echo $path | rev | cut -d/ -f1 | cut -d. -f2- | rev`
    dest=`echo $path | rev | cut -d/ -f2- | rev`
    typ=`file $x | grep "endian"`
    if [ -n $typ ] > /dev/null 2>&1; then
        unsquashfs3 -d /tmp/$name$$ $path
        unsquashfs -d /tmp/$name$$ $path
    dir2xzm /tmp/$name$$ $dest/$name.xzm
    rm -r /tmp/$name$$
    echo $dest/$name.xzm >> /tmp/list

echo && echo -e "${c}this is the list of converted modules..."$e
echo && cat /tmp/list
rm /tmp/list
thanks for bug report.

"wrong syntax feng, you can write lzm2xzm flash_player_10_2.lzm flash_player_10_2.xzm and i think that work"
this is not necessary as only suffix (lzm to xzm) changes, the rest stays the same.
Please add [Solved] to your thread title if the solution was found.

Post Reply