NSLU2-Linux
view · edit · print · history

Puppy.PuppyCron History

Hide minor edits - Show changes to markup

May 18, 2006, at 07:49 AM by tonymy01 -- fixed ftpd-topfield to read better
Changed lines 29-30 from:

Old info: ftpd-topfield makes all this redundant now, (keeping this info here for historical purposes).

to:

The ipkg "ftpd-topfield" makes all the below redundant now, (keeping this info here for historical purposes).

July 09, 2005, at 01:48 AM by tonymy01 --
Changed lines 1-2 from:

New information that makes the whole communicating from a PC thru the SLUG to the Toppy a lot less painful!

to:

New information that makes the whole communicating from a PC thru the SLUG to the Toppy a lot less painful, puppycron is now redundant.

Added line 22:
Changed lines 29-30 from:

Old info: ftpd-topfield makes all this redundant now, see below (keeping this info here for historical purposes).

to:

Old info: ftpd-topfield makes all this redundant now, (keeping this info here for historical purposes).

July 09, 2005, at 01:46 AM by tonymy01 --
Changed lines 1-2 from:

New edit makes all this redundant now, see below (keeping this info here for historical purposes).

to:

New information that makes the whole communicating from a PC thru the SLUG to the Toppy a lot less painful!

Thanks to the good work started by Peter with puppy, and now MSteveB? with lib-topfield and now ftp-topfield, we now have ftpd-topfield, a far far simpler way of transferring files to/from the Toppy than with commandline etc. If you have a SLUG, simply

  ipkg update
  ipkg install ftpd-topfield

This installs an ftp daemon (you will have to remove the script that initiates the normal ftpd above, and kill the normal ftpd process) that allows communication with the toppy using anonymous FTP.

So now you no longer have to setup all the directories and transfer points to get TED/TEDS working to the Toppy either.

And, not only this, you can now run a FTP client with GUI on your remote machine (PC/whatever), access the IP address of the SLUG, and have a nice FTP drag&drop gui access of the Toppy filesystem, which is far better than Altair!

Things to be careful of:

Don't have any keepalives setup for your client, as if the client attempts to communicate via the slug when the Toppy is powered down (or rebooting), you end up with a 2nd ftpd-topfield process which hangs up ftp communications until you kill it off in the slug (probably more with rebooting than with powered down). If this happens, telnet/SSH into the slug and type:

  ps -ef

and look for the second ftpd-topfield process. It should be proceded by a number, simply type:

  kill number

and this will get ftpd-topfield working properly again. If you have an FTP client session open with the Topfield and, say, run TED/TEDS, TED/TEDS will hang up until you close the FTP client session. This is due to the single threaded connection to the Toppy.

I am using the "SmartFTP?" client, version 1.5 has a small problem (well, ftpd-topfield is reporting unix but then sending "\" pathnames, triggering the issue) that the SmartFTP? Author has fixed just for me ;-), new download here: http://www.smartftp.com/get/SFTPDev.exe


Old info: ftpd-topfield makes all this redundant now, see below (keeping this info here for historical purposes).

Changed lines 104-128 from:

New information that makes the above redundant, and the whole communicating from a PC thru the SLUG to the Toppy a lot less painful!

Thanks to the good work started by Peter with puppy, and now MSteveB? with lib-topfield and now ftp-topfield, we now have ftpd-topfield, a far far simpler way of transferring files to/from the Toppy than with commandline etc. If you have a SLUG, simply

  ipkg update
  ipkg install ftpd-topfield

This installs an ftp daemon (you will have to remove the script that initiates the normal ftpd above, and kill the normal ftpd process) that allows communication with the toppy using anonymous FTP.

So now you no longer have to setup all the directories and transfer points to get TED/TEDS working to the Toppy either.

And, not only this, you can now run a FTP client with GUI on your remote machine (PC/whatever), access the IP address of the SLUG, and have a nice FTP drag&drop gui access of the Toppy filesystem, which is far better than Altair!

Things to be careful of:

Don't have any keepalives setup for your client, as if the client attempts to communicate via the slug when the Toppy is powered down (or rebooting), you end up with a 2nd ftpd-topfield process which hangs up ftp communications until you kill it off in the slug (probably more with rebooting than with powered down). If this happens, telnet/SSH into the slug and type:

  ps -ef

and look for the second ftpd-topfield process. It should be proceded by a number, simply type:

  kill number

and this will get ftpd-topfield working properly again.

I am using the "SmartFTP?" client, and also had to turn off the "-a" and "-l" options for listing the ftp directory, the ftpd doesn't support these flags (in fact, it gives the correct response without them).

to:
May 30, 2005, at 01:10 PM by tonymy01 --
Changed line 92 from:

Don't have any keepalives setup for your client, as if the client attempts to communicate via the slug when the Toppy is powered down (or rebooting), you end up with a 2nd ftpd-topfield process which hangs up ftp communications until you kill it off in the slug.

to:

Don't have any keepalives setup for your client, as if the client attempts to communicate via the slug when the Toppy is powered down (or rebooting), you end up with a 2nd ftpd-topfield process which hangs up ftp communications until you kill it off in the slug (probably more with rebooting than with powered down).

Added lines 99-101:

I am using the "SmartFTP?" client, and also had to turn off the "-a" and "-l" options for listing the ftp directory, the ftpd doesn't support these flags (in fact, it gives the correct response without them).

May 30, 2005, at 05:12 AM by tonymy01 --
Changed lines 79-80 from:

Thanks to the good work started by Peter with puppy, we now have ftpd-topfield, a far far simpler way of transferring files to/from the Toppy than with commandline etc. Simply

to:

Thanks to the good work started by Peter with puppy, and now MSteveB? with lib-topfield and now ftp-topfield, we now have ftpd-topfield, a far far simpler way of transferring files to/from the Toppy than with commandline etc. If you have a SLUG, simply

Changed lines 88-89 from:

And, not only this, you can now run a FTP client with GUI on your remote machine (PC/whatever), access the IP address of the SLUG, and have a nice FTP drag&drop gui access of the Toppy filesystem, which is better than Altair!

to:

And, not only this, you can now run a FTP client with GUI on your remote machine (PC/whatever), access the IP address of the SLUG, and have a nice FTP drag&drop gui access of the Toppy filesystem, which is far better than Altair!

May 30, 2005, at 05:08 AM by tonymy01 --
Changed lines 84-85 from:

This installs an ftp daemon (you will have to remove the script that initiates the normal ftpd above, and kill the normal ftpd process) that communicates with the toppy using anonymous FTP.

to:

This installs an ftp daemon (you will have to remove the script that initiates the normal ftpd above, and kill the normal ftpd process) that allows communication with the toppy using anonymous FTP.

Changed lines 88-89 from:

And, not only this, you can now run a GUI client on your remote machine (PC/whatever), access the IP address of the SLUG, and have a nice FTP drag&drop gui access of the Toppy filesystem, which is better than Altair!

to:

And, not only this, you can now run a FTP client with GUI on your remote machine (PC/whatever), access the IP address of the SLUG, and have a nice FTP drag&drop gui access of the Toppy filesystem, which is better than Altair!

Changed line 92 from:

Don't have any keepalives setup for your client, as if the client attempts to communicate via the slug when the Toppy is powered down (or rebooting), you end up with a 2nd ftpd-topfield process which hangs up communications until you kill it off in the slug.

to:

Don't have any keepalives setup for your client, as if the client attempts to communicate via the slug when the Toppy is powered down (or rebooting), you end up with a 2nd ftpd-topfield process which hangs up ftp communications until you kill it off in the slug.

Added line 98:
Deleted lines 100-101:

regards

May 30, 2005, at 05:04 AM by tonymy01 --
Changed line 59 from:
  [@SHELL=/bin/sh
to:
  SHELL=/bin/sh
Changed lines 67-69 from:
  0-55/5 * * * * root /opt/bin/puppycron &>/dev/null@] 
to:
  0-55/5 * * * * root /opt/bin/puppycron &>/dev/null 
May 30, 2005, at 05:03 AM by tonymy01 --
Changed lines 33-48 from:
 #!/bin/sh
 cd /share/hdd/data/topfield/EPG
 if ps | grep -v grep | grep -q "puppy "; then
 else
  if /opt/bin/puppy -qc cancel; then
   for i in *.tgd
   do echo $i ;
     if test -e $i ; then
      /opt/bin/puppy -qc cancel ; /opt/bin/puppy -qc cancel ; /opt/bin/puppy -qc put $i \\EPG\\$i
      rm $i
     fi
   done
   sleep 5
   if /opt/bin/puppy -qc dir EPG |grep -q epg_timers.tsv ; then
    /opt/bin/puppy -qc get 'EPG\epg_timers.tsv' epg_timers.tsv
    chmod 777 epg_timers.tsv
to:
  #!/bin/sh
  cd /share/hdd/data/topfield/EPG
  if ps | grep -v grep | grep -q "puppy "; then
  else
   if /opt/bin/puppy -qc cancel; then
    for i in *.tgd
    do echo $i ;
      if test -e $i ; then
       /opt/bin/puppy -qc cancel ; /opt/bin/puppy -qc cancel ; /opt/bin/puppy -qc put $i \\EPG\\$i
       rm $i
      fi
    done
    sleep 5
    if /opt/bin/puppy -qc dir EPG |grep -q epg_timers.tsv ; then
     /opt/bin/puppy -qc get 'EPG\epg_timers.tsv' epg_timers.tsv
     chmod 777 epg_timers.tsv
    fi
    if /opt/bin/puppy -qc dir EPG |grep -q epg_upload.log ; then
     /opt/bin/puppy -qc get 'EPG\epg_upload.log' epg_upload.log
    chmod 777 epg_upload.log
    fi
Deleted lines 54-57:
   if /opt/bin/puppy -qc dir EPG |grep -q epg_upload.log ; then
    /opt/bin/puppy -qc get 'EPG\epg_upload.log' epg_upload.log
   chmod 777 epg_upload.log
   fi
Changed lines 56-57 from:
 fi
to:
Changed lines 59-69 from:
 
SHELL=/bin/sh
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
 MAILTO=""
 HOME=/
 # ---------- ---------- Default is Empty ---------- ---------- #
 0 0-23/8 * * * root /usr/sbin/CheckDiskFull &>/dev/null
 0 0 * * * root /usr/sbin/WatchDog &>/dev/null
 1 * * * * root /usr/sbin/hwclock -s &>/dev/null
 0-55/5 * * * * root /opt/bin/puppycron &>/dev/null
to:
  
SHELL=/bin/sh
  PATH=/sbin:/bin:/usr/sbin:/usr/bin
  MAILTO=""
  HOME=/
  # ---------- ---------- Default is Empty ---------- ---------- #
  0 0-23/8 * * * root /usr/sbin/CheckDiskFull &>/dev/null
  0 0 * * * root /usr/sbin/WatchDog &>/dev/null
  1 * * * * root /usr/sbin/hwclock -s &>/dev/null
  0-55/5 * * * * root /opt/bin/puppycron &>/dev/null
Added line 85:
Added line 87:
Added line 91:
May 30, 2005, at 05:01 AM by tonymy01 --
Changed line 33 from:
 [@#!/bin/sh
to:
 #!/bin/sh
Changed lines 55-56 from:
 fi@]
to:
 fi
Changed lines 76-78 from:
to:

New information that makes the above redundant, and the whole communicating from a PC thru the SLUG to the Toppy a lot less painful!

May 30, 2005, at 04:59 AM by tonymy01 --
Changed lines 79-82 from:

ipkg update ipkg install ftpd-topfield

This installs an ftp daemon (you will have to kill the script that initiates the normal ftpd above, and kill the normal ftpd) that communicates with the toppy using anonymous FTP.

to:
  ipkg update
  ipkg install ftpd-topfield

This installs an ftp daemon (you will have to remove the script that initiates the normal ftpd above, and kill the normal ftpd process) that communicates with the toppy using anonymous FTP.

Changed line 89 from:

ps -ef

to:
  ps -ef
Changed line 91 from:

kill number

to:
  kill number
May 30, 2005, at 04:57 AM by tonymy01 -- added ftpd-topfield information
Added lines 1-2:

New edit makes all this redundant now, see below (keeping this info here for historical purposes).

Added lines 76-95:

Thanks to the good work started by Peter with puppy, we now have ftpd-topfield, a far far simpler way of transferring files to/from the Toppy than with commandline etc. Simply ipkg update ipkg install ftpd-topfield

This installs an ftp daemon (you will have to kill the script that initiates the normal ftpd above, and kill the normal ftpd) that communicates with the toppy using anonymous FTP. So now you no longer have to setup all the directories and transfer points to get TED/TEDS working to the Toppy either. And, not only this, you can now run a GUI client on your remote machine (PC/whatever), access the IP address of the SLUG, and have a nice FTP drag&drop gui access of the Toppy filesystem, which is better than Altair!

Things to be careful of: Don't have any keepalives setup for your client, as if the client attempts to communicate via the slug when the Toppy is powered down (or rebooting), you end up with a 2nd ftpd-topfield process which hangs up communications until you kill it off in the slug. If this happens, telnet/SSH into the slug and type: ps -ef and look for the second ftpd-topfield process. It should be proceded by a number, simply type: kill number and this will get ftpd-topfield working properly again. Cheers

February 27, 2005, at 11:48 PM by tonymy01 --
Changed lines 10-11 from:

I maybe found mistake in the above, with an unslung SLUG, the file to edit is actually /opt/etc/inetd.conf Try /opt/etc/inetd.conf, if this gives probs, then try /etc/inetd.conf... (it gets very confusing, as some stuff in the default locations is only valid as the SLUG is booting, then the unslung directories like /opt/foo (foo=whatever) appear to be valid at some point after boot.

to:

I maybe found a mistake in the above, with an unslung SLUG, the file to edit is actually /opt/etc/inetd.conf

Added line 12:

Try /opt/etc/inetd.conf, if this gives probs, then try /etc/inetd.conf... (it gets very confusing, as some stuff in the default locations is only valid as the SLUG is booting, then the unslung directories like /opt/foo (foo=whatever including bin,etc,lib etcetc) appear to be valid at some point after boot.

Changed lines 14-15 from:

or you could put a diversion script in /unslung called rc.xinetd and put the following lines in:

to:

or I have seen this method documented in one or two wiki's- you could put a diversion script in /unslung called rc.xinetd and put the following lines in:

February 24, 2005, at 09:03 AM by tonymy01 --
Added lines 10-12:

I maybe found mistake in the above, with an unslung SLUG, the file to edit is actually /opt/etc/inetd.conf Try /opt/etc/inetd.conf, if this gives probs, then try /etc/inetd.conf... (it gets very confusing, as some stuff in the default locations is only valid as the SLUG is booting, then the unslung directories like /opt/foo (foo=whatever) appear to be valid at some point after boot.

February 21, 2005, at 12:07 AM by peteru --
Changed lines 1-71 from:

Describe PuppyCron here.

to:

I use this script I called "puppycron" to copy tgd files to the Topfield that have been ftp uploaded by "TED" or "TEDS" (it also gets the log and tsv out the toppy too). So you will also need to download an ftpd to allow the ftp to operate.

http://www.nslu2-linux.org/wiki/HowTo/SetupFtpd

Add this line to /etc/inetd.conf

 ftp stream tcp nowait root /bin/ftpd ftpd

or you could put a diversion script in /unslung called rc.xinetd and put the following lines in:

 #!/bin/sh
 if ( [ ! -f /etc/inetd.conf ] || !(grep ftpd /etc/inetd.conf -q) ) then
       echo "ftp stream tcp nowait root /bin/ftpd ftpd" >> /etc/inetd.conf
 fi
 return 1

Edit your /etc/passwd file to ensure the anonymous ftp user is allowed access to the correct directory:

 ftp:x:14:50:FTP User:/share/hdd/data/topfield:

Create the puppycron script, and put it into /opt/bin (also, you should chmod +x the file to make it executable)

 #!/bin/sh
 cd /share/hdd/data/topfield/EPG
 if ps | grep -v grep | grep -q "puppy "; then
 else
  if /opt/bin/puppy -qc cancel; then
   for i in *.tgd
   do echo $i ;
     if test -e $i ; then
      /opt/bin/puppy -qc cancel ; /opt/bin/puppy -qc cancel ; /opt/bin/puppy -qc put $i \\EPG\\$i
      rm $i
     fi
   done
   sleep 5
   if /opt/bin/puppy -qc dir EPG |grep -q epg_timers.tsv ; then
    /opt/bin/puppy -qc get 'EPG\epg_timers.tsv' epg_timers.tsv
    chmod 777 epg_timers.tsv
   fi
   if /opt/bin/puppy -qc dir EPG |grep -q epg_upload.log ; then
    /opt/bin/puppy -qc get 'EPG\epg_upload.log' epg_upload.log
   chmod 777 epg_upload.log
   fi
  fi
 fi

Edit your /etc/crontab file so the script can occur regularly:

 SHELL=/bin/sh
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
 MAILTO=""
 HOME=/
 # ---------- ---------- Default is Empty ---------- ---------- #
 0 0-23/8 * * * root /usr/sbin/CheckDiskFull &>/dev/null
 0 0 * * * root /usr/sbin/WatchDog &>/dev/null
 1 * * * * root /usr/sbin/hwclock -s &>/dev/null
 0-55/5 * * * * root /opt/bin/puppycron &>/dev/null 

(will launch puppycron every 5 mins, will therefore every 5mins look for new files to upload, and download the tsv/log file)

Create your EPG etc directories off the /share/hdd/data/topfield directory and make sure they have permissions for the ftp user to read and write to them. And enjoy the TED/TEDS connectivity and features that windows users have, all via the SLUG running puppy to get long distance access to your Topfield (with TED/TEDs running on a remote windows PC which will ftp into the slug, if you setup TED/TEDS according).

regards Tony

view · edit · print · history · Last edited by tonymy01.
Based on work by tonymy01.
Originally by peteru.
Page last modified on May 18, 2006, at 07:49 AM