Error with ISO unpack script

Come up with a useful post-processing script? Share it here!
Post Reply
kallek
Newbie
Newbie
Posts: 21
Joined: January 8th, 2011, 5:22 pm

Error with ISO unpack script

Post by kallek »

I found this script for "unpacking" iso-files after download is finished:

Code: Select all

#!/bin/sh

cd "$1"
mkdir unpack
cd unpack
# pwd

7z x ../*.iso
7z x ../*.ISO

7z x ../*/*.iso
7z x ../*/*.ISO
I'm trying to run it on my QNAP NAS but get the following error: "7-Zip cannot find the code that works with archives".

Sabnzbd is installed with the sherpa-script. Do I have to install something else to make it work?
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: Error with ISO unpack script

Post by sander »

"7-Zip cannot find the code that works with archives" ... when I google that, it's all about 7zip on Windows ...

So: where are you running 7z on?
kallek
Newbie
Newbie
Posts: 21
Joined: January 8th, 2011, 5:22 pm

Re: Error with ISO unpack script

Post by kallek »

sander wrote: April 4th, 2019, 12:19 pm "7-Zip cannot find the code that works with archives" ... when I google that, it's all about 7zip on Windows ...

So: where are you running 7z on?
I'm running the script on the Qnap NAS so 7zip is also running on the NAS. I found this thread with someone getting the same error on a QNAP:

https://forum.qnap.com/viewtopic.php?t=119147

I will try to call 7zip by it's full path as suggested in that post.
User avatar
OneCD
Hero Member
Hero Member
Posts: 557
Joined: March 4th, 2017, 3:47 pm

Re: Error with ISO unpack script

Post by OneCD »

@kallek, you might also check which 7zips are available. It seems QTS Busybox contains one version, but you should also have an Entware version installed. The order they are found depends on your $PATH. The 'default' is the first one found.

Code: Select all

type -a 7z
Which one is shown first?
Stuff I like: Apache bash cron DD-WRT Debian DNSMasq Entware FireFox GitHub ImageMagick Kate KDE LibreELEC Netrunner NFS NVIDIA OpenVPN Orvibo-S20 pfSense Python Raspberry-Pi RAID SABnzbd Transmission Usenet VirtualBox Watcher3 XFCE
kallek
Newbie
Newbie
Posts: 21
Joined: January 8th, 2011, 5:22 pm

Re: Error with ISO unpack script

Post by kallek »

OneCD wrote: April 5th, 2019, 1:15 am @kallek, you might also check which 7zips are available. It seems QTS Busybox contains one version, but you should also have an Entware version installed. The order they are found depends on your $PATH. The 'default' is the first one found.

Code: Select all

type -a 7z
Which one is shown first?
When I run type - 7z I get:

Code: Select all

7z is /usr/local/sbin/7z

7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,4 CPUs x64
If I run the script with the full path it kind of works but I get a warning about "There are data after the end of archive".

I'm trying to unpack a bluray iso but all I get is some strange files. Guess it unpacks some hidden partition with metadata, not visable to Windows. Maybe 7zip doesn't work very well with bluray isos.
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: Error with ISO unpack script

Post by sander »

If you want, you can share the NZB with me, so that I try on my Linux.
User avatar
OneCD
Hero Member
Hero Member
Posts: 557
Joined: March 4th, 2017, 3:47 pm

Re: Error with ISO unpack script

Post by OneCD »

I've just had a look at the p7zip IPKG installed via Entware. It's identical to the version installed with QTS except the Entware version is executed with '7za'.

Sorry, I'm out of ideas. :(
Stuff I like: Apache bash cron DD-WRT Debian DNSMasq Entware FireFox GitHub ImageMagick Kate KDE LibreELEC Netrunner NFS NVIDIA OpenVPN Orvibo-S20 pfSense Python Raspberry-Pi RAID SABnzbd Transmission Usenet VirtualBox Watcher3 XFCE
Post Reply