Home   |  Sitemap
Transfer and Execution of Scripts
FTP File Transfer
Scripts can be downloaded to the EtherPAD using ftp. The scripts must be saved in the EtherPAD /user directory. This option is explained in more detail below. The scripts listed in the text file StartScripts will be started at EtherPAD bootup. (Only one script name per line is permitted.)

Telnet
Scripts can also be started using Telnet and using the script command. This option is explained in more detail below.

Web Browser
Scripts can be embedded in HTML files and downloaded to the EtherPAD using FTP. Any request for these files or pages will execute the script. The script embedded in the HTML has to be enclosed in "<%" and "%>". Text not so enclosed will be regarded as HTML and not executed as a script. Refer to sections and examples on HTML on page 59. This option is explained in more detail below.

Downloading a Script to your EtherPAD using FTP
Type the following from your PC Command Prompt.
'FTP [EtherPAD IP Address]'

You will see the following


Enter user 'root' and password 'xxx' (Or the values you have changed these parameters to)


The EtherPAD will log you on.


Typing 'help' will display a list of available commands.


Type 'cd user' and enter


As an example use Test.scr as a script file that you have created and saved to C:\Sanscript.


Type 'put c:/sanscript/test.scr' and enter.
The Script file will be downloaded into the EtherPAD via FTP.




Type 'dir' and enter.
Confirm that the file you downloaded is in the EtherPAD /user directory.


Type 'Quit' and enter when the file transfer is complete.

Executing a Script on your EtherPAD using Telnet
Establish a telnet session to your EtherPAD in the following way.


Enter your username and password. The defaults are: username 'root', password 'xxx'.


The EtherPAD will log you in. Type 'help' and enter to view the telnet command set.


Type 'Help scripting' and enter to view the Scripting command set.


Executing the Script
Your script can now be executed or halted using the available command set.

script filename - execute the script
run filename - execute the script in the background
list - list the running scripts and their process id's
stop process id - attempt to kill a script
optimise filename - generate an optimised version of a script
dir - display a directory listing of user files (/user directory)

Executing the Script at EtherPAD boot-up
Create a Text file and save it as StartScripts. Enter the name of each script you want to be executed at EtherPAD bootup on a separate line.


StartScripts now needs to be downloaded to the EtherPAD /user directory using one of the methods explained above. Note that the filenames are case sensitive.

               Copyright © SAN People 2005
Serial-to-Ethernet Devices