DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2009-01-11 05:28:11

TonyT
Member
Registered: 2008-12-29
Posts: 12

Optware installation script for FFP 0.5

After reading the Optware Wiki Page I wrote the attached optware.sh script that works with FFP 0.5 that will install and configure optware. I'd appreciate any feedback to make it better. If it proves to be useful to others, and more importantly works for others:-), then it could be added to the Wiki.

To use it:

1. Install ffp 0.5 (see FFP Wiki Page)
2. Copy the optware.sh script to /ffp/start/ and make it executable
3. Reboot the DNS-323
4. Check the ffp.log on Volume_1 to see that it installed successfully

I have used it on my DNS-321 and it seems to install successfully, but I have been unable to use ipkg, I think because of library issues (see Topic)

-Tony


Attachments:
Attachment Icon optware.sh, Size: 8,055 bytes, Downloads: 1,664

Offline

 

#2 2009-01-15 21:42:12

Marijom
Member
From: Sweden
Registered: 2007-07-06
Posts: 54

Re: Optware installation script for FFP 0.5

the "/mnt/HD_a2/ffp/etc/profile.d/optware.sh" are missing logic for symbolic link


if [ -L /opt ]; then

Offline

 

#3 2009-01-15 21:58:03

mastervol
Member
Registered: 2008-09-06
Posts: 81

Re: Optware installation script for FFP 0.5

did you set the path to optware in /ffp/etc/profile??


DNS-323     F/W: 1.06  H/W: ??  ffp: 0.5  Drives (normal mode): 1 x 1,5 TB Seagate SATA II ST31500341AS, 1 x 250 GB Western Digital SATA I

Offline

 

#4 2009-01-15 23:23:10

Marijom
Member
From: Sweden
Registered: 2007-07-06
Posts: 54

Re: Optware installation script for FFP 0.5

I added this in /mnt/HD_a2/ffp/etc/profile.d/optware.sh

if [ -L /opt ]; then
    PATH=/opt/bin:$PATH
    if [ $(/ffp/bin/id -u) -eq 0 ]; then
    PATH=/opt/sbin:$PATH
    fi
    export PATH
fi

as the /opt is a symbolic linked

Last edited by Marijom (2009-01-15 23:24:38)

Offline

 

#5 2009-01-16 07:43:34

TonyT
Member
Registered: 2008-12-29
Posts: 12

Re: Optware installation script for FFP 0.5

The PATH gets set in the file that optware.sh creates and puts in /ffp/etc/profile.d . With ffp 0.5 /ffp/etc/profile "sources" the files in /ffp/etc/profile.d so there is no need to actually change /ffp/etc/profile . After optware.sh has created /ffp/etc/profile.d/optware.sh , any future login shells created will "source" it and so the PATH will be set.

I don't think that a separate test is require in /ffp/etc/profile.d/optware.sh for checking if it is a symbolic link. If the link links to a directory then -d will still report that it is a directory. For me I have a link and it seems to work:

Code:

root@HTTB_1_NAS:~# ls -l /opt
lrwxrwxrwx    1 root     root           19 Jan 16 05:11 /opt -> /mnt/HD_a2/ipkg/opt
root@HTTB_1_NAS:~# if [ -d "/opt" ] ; then
> echo "Dir"
> else
> echo "Not Dir"
> fi
Dir
root@HTTB_1_NAS:~#

Could you try optware.sh without those lines and confirm it does set the PATH. For me when I telnet in after optware.sh has installed the PATH *is* set:

Code:

root@HTTB_1_NAS:~# echo $PATH
/opt/sbin:/opt/bin:/ffp/sbin:/usr/sbin:/sbin:/ffp/bin:/usr/bin:/bin
root@HTTB_1_NAS:~#

Last edited by TonyT (2009-01-16 08:12:31)

Offline

 

#6 2009-03-03 13:39:31

zelduy
Member
Registered: 2009-02-28
Posts: 9

Re: Optware installation script for FFP 0.5

how's the script? doesthe ipkg works now??
if it doesnt is there any fix for it to run it??

Offline

 

#7 2009-03-07 12:12:15

pkdick
Member
Registered: 2009-01-29
Posts: 5

Re: Optware installation script for FFP 0.5

Hello,

I am a linux beginner, so I just follow indicated advice to configure my DNS-323 (fw 1.06). I have so installed ffp 0.5 without a glitch.

I just tried to install the optware.sh script, but I get the following error message during the installation:

*     Retrieving optware packages currently available:
        /mnt/HD_a2/ipkg/opt/bin/ipkg update
/mnt/HD_a2/ipkg/opt/bin/ipkg: can't load library 'libipkg.so.0'
*     Optware packages available for installation:
        /mnt/HD_a2/ipkg/opt/bin/ipkg list
/mnt/HD_a2/ipkg/opt/bin/ipkg: can't load library 'libipkg.so.0'

Then the use of ipkg does not work as it should as it is not "found": what is wrong ?

Thank you in advance for your support.

Offline

 

#8 2009-03-08 06:14:01

bzhou
Member
Registered: 2008-02-15
Posts: 171

Re: Optware installation script for FFP 0.5

Optware ipkg only looks for libipkg.so.0 at /opt/lib, so you should either symlink or bind mount /mnt/HD_a2/ipkg/opt to /opt.

Offline

 

#9 2009-03-08 13:01:31

pkdick
Member
Registered: 2009-01-29
Posts: 5

Re: Optware installation script for FFP 0.5

Hello,

As written in the Optware wiki, I put the following commands within the optware.sh script (by changing the OPTWARE_USE_SYMBOLIC_LINK key to "0"  and adding the export command:

mkdir -p /opt
mount --bind /mnt/HD_a2/ipkg/opt /opt
export PATH=/opt/bin:/opt/sbin:$PATH

Then I could type "ipkg list" and "ipkg update" with success!
I tried to install sabnzbdplus with "ipkg install sabnzbdplus": all files were downloaded but after a reboot of my DNS-323 but none of them were found running with a TOP command...

Again I have very limited LINUX knowledge and it seems that there is something wrong with the optware.sh script: it seems that there plenty of extensions ready to be used for the DNS-323, but that they are only available for "EXPERTS" and not for "BEGINNERS" like me...

Offline

 

#10 2009-03-08 17:15:59

TonyT
Member
Registered: 2008-12-29
Posts: 12

Re: Optware installation script for FFP 0.5

I wrote a script to do the install. If it works for others I can add it to the Wiki. Let me know:

  http://dns323.kood.org/forum/viewtopic.php?id=3609

-Tony

Offline

 

#11 2009-03-08 18:41:25

pkdick
Member
Registered: 2009-01-29
Posts: 5

Re: Optware installation script for FFP 0.5

Hello,

That is the problem: I installed your script straight and it did not work (as I tried to explain in my previous posts)... I have no idea why.

Offline

 

#12 2009-03-13 10:00:16

pkdick
Member
Registered: 2009-01-29
Posts: 5

Re: Optware installation script for FFP 0.5

Hello again,

Reading different threads, I found that using SSH rather than Telnet, the Optware script would work: I tried that (getting the same error messages that I indicated in my previous posts), but now it seems to work ! NSLU2 Software can install, but now I need some advice on how to configure them.

For example LightHttp installs nicely, but I do not know what to set-up then (as it is explained in the DNS-323 wiki or using other configuration parameters ?): I would be grateful if someone could help me !

Thank you in advance

Offline

 

#13 2009-08-30 23:35:01

dhakouanim
New member
Registered: 2009-08-30
Posts: 2

Re: Optware installation script for FFP 0.5

What are you trying to do ? PHP + MySQL + LightTPD ?

pkdick wrote:

Hello again,

Reading different threads, I found that using SSH rather than Telnet, the Optware script would work: I tried that (getting the same error messages that I indicated in my previous posts), but now it seems to work ! NSLU2 Software can install, but now I need some advice on how to configure them.

For example LightHttp installs nicely, but I do not know what to set-up then (as it is explained in the DNS-323 wiki or using other configuration parameters ?): I would be grateful if someone could help me !

Thank you in advance

Offline

 

#14 2010-03-20 08:43:21

haim
Member
Registered: 2010-01-13
Posts: 83

Re: Optware installation script for FFP 0.5

Just a note to say I had to hard code the ipkg file name in the script for it to work.  Other than that its fine.
Not sure why the fetching of which ipkg file didn't work, my script ability is rubbish so was only able to find the problem and hack hack hack it away.

On a side note, the dns official add-on for firefly also wants to use /opt off the Volume_1 directory and this ends with the optware lib folder being deleted on reboot.  However I can't get optware to work using a different named link folder i.e. /opt -> /optware
I could only find references in your script, but afterwards it still can't find libs so there must be somewhere else.

Offline

 

#15 2011-05-12 23:06:27

jhtopping
Member
From: Ohio, USA
Registered: 2011-05-08
Posts: 10

Re: Optware installation script for FFP 0.5

TonyT, thank you for the optware.sh script.  By using it I was able the get optware operational on my test DNS-323 system which has F/W 1.10b7 installed.  I then attempted to install optware on my primary DNS-323  (F/W 1.09) and received the "can't load library 'libipkg.so.0'" twice in the ffp.log.  In my somewhat limited experience this is usually a case where the $PATH is not set properly.

I have compared the $PATH variables and they are identical on both systems.  Obviously I am missing something.  Any suggestions would be appreciated.

Offline

 

#16 2011-05-12 23:30:28

karlrado
Member
Registered: 2009-12-07
Posts: 229

Re: Optware installation script for FFP 0.5

Do you have the firefly plug-in turned on for your 1.09 system?
If so, see http://dns323.kood.org/forum/viewtopic.php?id=5513


DNS-323 FW 1.07 : 2 1TB WD Caviar Green SATA : fun_plug: utelnet + optware (no ffp)

Offline

 

#17 2011-05-13 00:17:09

jhtopping
Member
From: Ohio, USA
Registered: 2011-05-08
Posts: 10

Re: Optware installation script for FFP 0.5

Thank you for the quick and correct reply.  At one point I added Firefly but had it disabled and have not thought much about it.  Disabled is not deleted.  I have deleted the addon and rebooted the server.  All looks well.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB