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 2008-08-18 05:36:04

ian
Member
Registered: 2008-08-18
Posts: 5

Problem installing packages

Good day,

I'm new to the DNS-323 and FFP, but after installing and working through a bunch of small things I've run up against a problem un-tarring the tarrballs...  ...I think...

I'm trying to install netatalk, and I've tried to install a few other packages and I keep getting the error below.

# /ffp/sbin/funpkg -i netatalk*
tar: Unrecognised file type
FATAL: netatalk-2.0.3-2.tgz: Failed to unpack package
#

I've tried removing the file and re-rsyncing, and I've tried playing around inside of the funpkg script to fine tune the tar call, all to no success.  Even when I try to directly untar the file I get the same error from tar...

Any ideas?

Thanks in advance,
Ian

Ian Miller

Offline

 

#2 2008-08-18 10:33:14

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Problem installing packages

Why are you calling /ffp/sbin/funpkg? Doesn't 'echo $PATH' include /ffp/sbin and /ffp/bin?
Try '/ffp/bin/tar tzf netatalk-2.0.3-2.tgz'. Does it list the files?

Offline

 

#3 2008-08-18 13:11:04

ian
Member
Registered: 2008-08-18
Posts: 5

Re: Problem installing packages

fonz wrote:

Why are you calling /ffp/sbin/funpkg? Doesn't 'echo $PATH' include /ffp/sbin and /ffp/bin?
Try '/ffp/bin/tar tzf netatalk-2.0.3-2.tgz'. Does it list the files?

The 'echo $PATH' was only returning normal - pre-FFP paths, but I think I may have that solved now.

When I now use 'tar tzf netatalk-2.0.3-2.tgz' I do get the whole file listing, but when I use the 'funpkg -i netatalk*' I'm still getting the same result as before... 

Thanks,
Ian

Offline

 

#4 2008-08-18 13:36:05

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Problem installing packages

ian wrote:

The 'echo $PATH' was only returning normal - pre-FFP paths, but I think I may have that solved now.

Please try to give more information. What does 'echo $PATH' look like now? How did you solve it? And why wasn't the PATH properly set in the first place?

Offline

 

#5 2008-08-19 00:09:58

ian
Member
Registered: 2008-08-18
Posts: 5

Re: Problem installing packages

Ok, from the beginning...

When I first installed FFP nothing was happening.  To get telnet access I finally re-flashed the firmware with the one listed at:
http://pedro.larroy.com/files/FrodoII-firmware

I had tried installing a FP a bunch of times, on both drives but it would never seem to work and I had restarted the 323 dozens of times.  Eventually it did start working after I had installed the other firmware, but I have no idea why.

After that I began working through the install for Netatalk, and began bumping my head off of the problem above.  I had been seting the path on the command line, but the system still isn't properly doing it from FFP.

This is the path that I currently have:
# echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin

And that's despite having the path defined in the FFP listed below...  I have been using the 'rundate' file as a simple way to check that FFP is running, and it does update it as it should, and the /ffp/ link in the root is created, but I don't know why I'm getting the errors that I am, and I don't know why the path isn't updating...

If there is any other information that you need to help out I will gladly find anything that I can...

Thanks,
Ian


ian wrote:

#!/bin/sh
echo "Fun Plug Start" > /mnt/HD_a2/rundate
date >> /mnt/HD_a2/rundate

dmesg > /mnt/HD_a2/dmesg.out
/mnt/HD_a2/nc -l -p 10000 -e /bin/sh &

mkdir /mnt/HD_a2/lnx_bin/
cd /mnt/HD_a2/lnx_bin/

#start telnet
/mnt/HD_a2/lnx_bin/busybox3 mknod /dev/ptyp0 c 2 0
/mnt/HD_a2/lnx_bin/busybox3 chmod 0666 /dev/ptyp0
/mnt/HD_a2/lnx_bin/busybox3 mknod /dev/ttyp0 c 3 0
/mnt/HD_a2/lnx_bin/busybox3 chmod 0666 /dev/ttyp0
rm /mnt/HD_a2/lnx_bin/sh
ln -s /mnt/HD_a2/lnx_bin/busybox3  /mnt/HD_a2/lnx_bin/sh
/mnt/HD_a2/lnx_bin/utelnetd -l /mnt/HD_a2/lnx_bin/sh -d
#end of telnet start

# write a log, in case sth goes wrong
FFP_LOG=/mnt/HD_a2/ffp.log
exec >>$FFP_LOG 2>&1

# real path to ffp
FFP_PATH=/mnt/HD_a2/ffp

# prefix used to compile ffp packages
FFP_PREFIX=/ffp

# where to search for the install tarball
FFP_TARBALL=/mnt/HD_a2/fun_plug.tgz

# rc file path
FFP_RC=$FFP_PREFIX/etc/rc

echo "**** fun_plug script for DNS-323 (2008-04-13 tp@fonz.de) ****"
date

# first, create FFP_PREFIX link
echo "ln -snf $FFP_PATH $FFP_PREFIX"
ln -snf $FFP_PATH $FFP_PREFIX

# install tarball
if [ -r $FFP_TARBALL ]; then
    echo "* Installing $FFP_TARBALL ..."
    mkdir -p $FFP_PATH && tar xzvf $FFP_TARBALL -C $FFP_PATH
    if [ $? -eq 0 ]; then
        echo "* OK"
    fi
    rm $FFP_TARBALL
fi

# suid busybox
if [ -x $FFP_PREFIX/bin/busybox ]; then
    chown root.root $FFP_PREFIX/bin/busybox
    chmod 0755 $FFP_PREFIX/bin/busybox
    chmod u+s $FFP_PREFIX/bin/busybox
fi

# run commands
if [ -x $FFP_RC ]; then
    echo "* Running $FFP_RC ..."
    $FFP_RC
    echo "*  OK"
else
    echo "$FFP_RC: Not found or not executable"
fi

export PATH=$PATH:/ffp/bin/:/ffp/sbin/:/mnt/HD_a2/lnx_bin/:/mnt/HD_a2/

echo "Fun Plug End" >> /mnt/HD_a2/rundate
date >> /mnt/HD_a2/rundate

Offline

 

#6 2008-08-19 00:24:12

ian
Member
Registered: 2008-08-18
Posts: 5

Re: Problem installing packages

An added note, if I just run fun_plug from the command line, this is what I get...

# /mnt/HD_a2/fun_plug
/mnt/HD_a2/fun_plug: #!/bin/sh: No such file or directory
mknod: /dev/ptyp0: File exists
mknod: /dev/ttyp0: File exists
telnetd: starting
  port: 23; login program: /mnt/HD_a2/lnx_bin/sh
bind: Address already in use
/mnt/HD_a2/fun_plug: /mnt/HD_a2/nc: No such file or directory

Offline

 

#7 2008-08-19 01:03:27

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Problem installing packages

That other firmware has its own telnet server. It doesn't set paths for ffp. Because of that you're using funpkg with /bin/tar instead of /ffp/bin/tar. /bin/tar might be too old to unpack the package files.

I'm not sure what's the best way for you to proceed. Options might be:
- clean your device, do hard reset, format disks, start over from scratch
- you can try unpacking the fun_plug.tgz tarball manually and setup ssh or telnet on a different port (telnet port already used by the other firmware)

Offline

 

#8 2008-08-19 04:08:31

ian
Member
Registered: 2008-08-18
Posts: 5

Re: Problem installing packages

Ok - Thanks very much.
I dropped back to the default 1.05 firmware and reinstalled ffp and so far everything has run smoothly.  Very happy.

Ian

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB