FFP fails install 4.1.102.29716

Mijzelf
Posts: 6207
Joined: Mon Jun 16, 2008 10:45 am

Re: FFP fails install 4.1.102.29716

Post by Mijzelf » Tue Sep 30, 2014 4:27 pm

Can you try this one?

Code: Select all

#!/bin/sh

RELDIR=$( dirname $0 )
cd $RELDIR
CURDIR=$( pwd )

mountpoint=""

while read line
do
        current=$( echo $line | cut -d ' ' -f 2 )
        
        if echo $CURDIR | grep ^${current} >/dev/null
        then
                echo $current fits
                if [ ${#mountpoint} -lt ${#current} ] ; then
                        mountpoint=$current
                fi
        else
                echo $current doesn\'t fit
        fi
done </proc/mounts

echo $mountpoint is best fitting

ejbauza
Posts: 7
Joined: Thu Oct 09, 2014 2:42 pm

Re: FFP fails install 4.1.102.29716

Post by ejbauza » Thu Oct 09, 2014 3:56 pm

Mijzelf wrote:Can you try this one?

Code: Select all

#!/bin/sh

RELDIR=$( dirname $0 )
cd $RELDIR
CURDIR=$( pwd )

mountpoint=""

while read line
do
        current=$( echo $line | cut -d ' ' -f 2 )
        
        if echo $CURDIR | grep ^${current} >/dev/null
        then
                echo $current fits
                if [ ${#mountpoint} -lt ${#current} ] ; then
                        mountpoint=$current
                fi
        else
                echo $current doesn\'t fit
        fi
done </proc/mounts

echo $mountpoint is best fitting
Dear Mijzelf,the output is as follows:

/ fits
/initrd doesn't fit
/ fits
/boot doesn't fit
/mnt/apps doesn't fit
/mnt/etc doesn't fit
/etc doesn't fit
/oem doesn't fit
/proc doesn't fit
/proc/bus/usb doesn't fit
/proc/fs/nfsd doesn't fit
/sys doesn't fit
/dev doesn't fit
/dev/pts doesn't fit
/mnt/system doesn't fit
/mnt/pools/A/A0 doesn't fit
/nfs/Documents doesn't fit
/nfs/Movies doesn't fit
/nfs/Music doesn't fit
/nfs/SharedMedia doesn't fit
/nfs/Pictures doesn't fit
/nfs/Torrent doesn't fit
/ is best fitting

Mijzelf
Posts: 6207
Joined: Mon Jun 16, 2008 10:45 am

Re: FFP fails install 4.1.102.29716

Post by Mijzelf » Thu Oct 09, 2014 4:41 pm

Hm. Best fit against what? I surely didn't think deep enough.

Code: Select all

#!/bin/sh

RELDIR=$( dirname $0 )
cd $RELDIR
CURDIR=$( pwd )

mountpoint=""

while read line
do
        current=$( echo $line | cut -d ' ' -f 2 )
       
        if echo $CURDIR | grep ^${current} >/dev/null
        then
                echo $current fits
                if [ ${#mountpoint} -lt ${#current} ] ; then
                        mountpoint=$current
                fi
        else
                echo $current doesn\'t fit
        fi
done </proc/mounts

echo $mountpoint is best fit against $CURDIR
The desired output is something like '/mnt/pools/A/A0 is best fit against /mnt/pools/A/A0/Documents', or something like that. I *hope* the script was testing against /ffp, which is not a mountpoint.

/Edit: Can you see in your older logfiles (/ffp/log/ffp.log.n) that ffp is shutdown cleanly?

ejbauza
Posts: 7
Joined: Thu Oct 09, 2014 2:42 pm

Re: FFP fails install 4.1.102.29716

Post by ejbauza » Thu Oct 09, 2014 7:39 pm

Mijzelf wrote:Hm. Best fit against what? I surely didn't think deep enough.

Code: Select all

#!/bin/sh

RELDIR=$( dirname $0 )
cd $RELDIR
CURDIR=$( pwd )

mountpoint=""

while read line
do
        current=$( echo $line | cut -d ' ' -f 2 )
       
        if echo $CURDIR | grep ^${current} >/dev/null
        then
                echo $current fits
                if [ ${#mountpoint} -lt ${#current} ] ; then
                        mountpoint=$current
                fi
        else
                echo $current doesn\'t fit
        fi
done </proc/mounts

echo $mountpoint is best fit against $CURDIR
The desired output is something like '/mnt/pools/A/A0 is best fit against /mnt/pools/A/A0/Documents', or something like that. I *hope* the script was testing against /ffp, which is not a mountpoint.

/Edit: Can you see in your older logfiles (/ffp/log/ffp.log.n) that ffp is shutdown cleanly?
Hi Mijzelf,

Sorry for my little knowledge on the subject. Again the script output:

/ fits
/initrd doesn't fit
/ fits
/boot doesn't fit
/mnt/apps doesn't fit
/mnt/etc doesn't fit
/etc doesn't fit
/oem doesn't fit
/proc doesn't fit
/proc/bus/usb doesn't fit
/proc/fs/nfsd doesn't fit
/sys doesn't fit
/dev doesn't fit
/dev/pts doesn't fit
/mnt/system doesn't fit
/mnt/pools/A/A0 doesn't fit
/nfs/Documents doesn't fit
/nfs/Movies doesn't fit
/nfs/Music doesn't fit
/nfs/SharedMedia doesn't fit
/nfs/Pictures doesn't fit
/nfs/Torrent doesn't fit
/nfs/prueba doesn't fit
/ is best fit against /ffp

Log:

Thu Oct 9 12:40:41 VET 2014: Executing ffp-starter.sh version 20140922 with command start.
Rotate logfiles
mv /mnt/pools/A/A0/prueba/var/log/ffp.log /mnt/pools/A/A0/prueba/var/log/ffp.1.log
Create /ffp symlink...done
The actual start:
* /ffp/start/SERVERS.sh inactive
* /ffp/start/portmap.sh inactive
* /ffp/start/nfsd.sh inactive
* /ffp/start/LOGIN.sh inactive
* /ffp/start/telnetd.sh ...
Starting /ffp/sbin/telnetd -l /ffp/bin/sh
* /ffp/start/sshd.sh inactive
* /ffp/start/rsyncd.sh inactive
* /ffp/start/plexmediaserver.sh inactive
* /ffp/start/kickwebs.sh inactive
* /ffp/start/lighttpd.sh inactive
* /ffp/start/inetd.sh inactive
* /ffp/start/fp_master.sh inactive
Change shell for root&admin...done
Add ffp shell to /etc/shells...done
Thu Oct 9 12:40:43 VET 2014: Done

Mijzelf
Posts: 6207
Joined: Mon Jun 16, 2008 10:45 am

Re: FFP fails install 4.1.102.29716

Post by Mijzelf » Fri Oct 10, 2014 8:41 am

Can you repeat that test when you explicitly execute the script from /mnt/pools/A/A0/<ffp-share>/ instead of /ffp/?

And it seems ffp is not stopped on shutdown. Then there would have been a line 'Stopping /ffp/sbin/telnetd'. So either I made a mistake in my stopscript, or the NAS doesn't follow the Debian way of shutting down.

ejbauza
Posts: 7
Joined: Thu Oct 09, 2014 2:42 pm

Re: FFP fails install 4.1.102.29716

Post by ejbauza » Fri Oct 10, 2014 2:14 pm

Mijzelf wrote:Can you repeat that test when you explicitly execute the script from /mnt/pools/A/A0/<ffp-share>/ instead of /ffp/?

And it seems ffp is not stopped on shutdown. Then there would have been a line 'Stopping /ffp/sbin/telnetd'. So either I made a mistake in my stopscript, or the NAS doesn't follow the Debian way of shutting down.
Mijzelf,

root@IomegaEZ:/mnt/pools/A/A0/Probando# sh prueba.sh
/ fits
/initrd doesn't fit
/ fits
/boot doesn't fit
/mnt/apps doesn't fit
/mnt/etc doesn't fit
/etc doesn't fit
/oem doesn't fit
/proc doesn't fit
/proc/bus/usb doesn't fit
/proc/fs/nfsd doesn't fit
/sys doesn't fit
/dev doesn't fit
/dev/pts doesn't fit
/mnt/system doesn't fit
/mnt/pools/A/A0 fits
/nfs/Documents doesn't fit
/nfs/Movies doesn't fit
/nfs/Music doesn't fit
/nfs/SharedMedia doesn't fit
/nfs/Pictures doesn't fit
/nfs/Torrent doesn't fit
/nfs/Probando doesn't fit
/mnt/pools/A/A0 is best fit against /mnt/pools/A/A0/Probando

Mijzelf
Posts: 6207
Joined: Mon Jun 16, 2008 10:45 am

Re: FFP fails install 4.1.102.29716

Post by Mijzelf » Fri Oct 10, 2014 8:09 pm

Good. I built a new version ffp-starter-20141010.zip. If you exchange the script, the new one should create a symlink /mnt/HD_a2, which points to the data partition where ffp is installed.

ejbauza
Posts: 7
Joined: Thu Oct 09, 2014 2:42 pm

Re: FFP fails install 4.1.102.29716

Post by ejbauza » Fri Oct 10, 2014 8:46 pm

Mijzelf wrote:Good. I built a new version ffp-starter-20141010.zip. If you exchange the script, the new one should create a symlink /mnt/HD_a2, which points to the data partition where ffp is installed.

Thank Mijzelf,

I just have to change the script? Need some tests for me to verify that ffp is not stopped correctly?

/Edit: the problem may be related to the file permissions?

-rwxr--r-- 1 root root 85 Oct 9 10:20 K01ffp
lrwxrwxrwx 1 root root 20 Jul 9 11:56 K20iscsi-scst -> ../init.d/iscsi-scst
lrwxrwxrwx 1 root root 20 Jul 9 11:56 K20nfs-common -> ../init.d/nfs-common

Mijzelf
Posts: 6207
Joined: Mon Jun 16, 2008 10:45 am

Re: FFP fails install 4.1.102.29716

Post by Mijzelf » Sat Oct 11, 2014 10:08 am

Changing the script is enough to get the new functionality. Although the symlink will only be created after a reboot.

About the shutdown, I don't know. Your log proves that the script was not executed on shutdown.

Can you rename it to S00ffp, and copy it to /etc/rc0.d, and retry?

Code: Select all

cd /etc/rc6.d
mv K01ffp S00ffp
cp -a S00ffp ../rc0.d/

ejbauza
Posts: 7
Joined: Thu Oct 09, 2014 2:42 pm

Re: FFP fails install 4.1.102.29716

Post by ejbauza » Wed Oct 15, 2014 10:47 pm

Mijzelf wrote:Changing the script is enough to get the new functionality. Although the symlink will only be created after a reboot.

About the shutdown, I don't know. Your log proves that the script was not executed on shutdown.

Can you rename it to S00ffp, and copy it to /etc/rc0.d, and retry?

Code: Select all

cd /etc/rc6.d
mv K01ffp S00ffp
cp -a S00ffp ../rc0.d/
Mijzelf

Still not working. Try a little research myself on the operation of the Init Scripts and the result was the device can not start:

From what I understand my only option for now is Rebuild the firmware using that USB stick?

Post Reply