xbenjii / torrentexpander

Automatically exported from code.google.com/p/torrentexpander
0 stars 0 forks source link

dirname: invalid option -- 'b' on openmediavault (debian based) #81

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. run the script for first time on OpenMediaVault (debian based)
2.
3.

What is the expected output? What do you see instead?

expected no errors

what i saw:
transmission@nas:/media/fac202db-49d5-4dba-92b0-bee63109d140/bittorrent$ . 
./torrentexpander.sh -c
dirname: invalid option -- 'b'
Try `dirname --help' for more information.
touch: cannot touch `/torrentexpander_settings.ini': Permission denied
cat: /torrentexpander_settings.ini: No such file or directory

of course i get the permission denied as it can't touch in the root dir

What version of the product are you using? On what operating system?

version 020
Linux nas 2.6.32-5-amd64 #1 SMP Sun Sep 23 10:07:46 UTC 2012 x86_64 GNU/Linux
OpenMediaVault 0.1.17

Please provide any additional information below.

After investigating this issue it seems that you have to change the following 
in your script.

change
PRG="`dirname "$PRG"`/$link"
to
PRG="`dirname -- "$PRG"`/$link"

and change
script_path=`dirname "$PRG"`
to
script_path=`dirname -- "$PRG"`

Then the program started fine.

Original issue reported on code.google.com by arturo.d...@gmail.com on 3 Feb 2013 at 4:59

GoogleCodeExporter commented 8 years ago
sorry typo in the OMV version its 0.4.17 the latest at this moment

Original comment by arturo.d...@gmail.com on 3 Feb 2013 at 5:00

GoogleCodeExporter commented 8 years ago
Thanks for finding this workaround
I'll toy with it this weekend and see if it works on other platforms.

Addictedtoscreens

Original comment by addicted...@gmail.com on 27 Feb 2013 at 7:43

GoogleCodeExporter commented 8 years ago
Hi Arturo
Fix tested on debian, OS X and a few other OSes and included in release 195
Thank you for providing it

Addictedtoscreens

Original comment by addicted...@gmail.com on 3 Mar 2013 at 6:47